# OCI has

> Tag 2: the client asks the server whether it holds an image for the client, by digest; the server answers with exactly one channel response, the byte 0, or the byte 1 followed by a repository path, and the channel response finish; a finish that no response precedes states that the server does not hold it for the client.

Canonical: https://protocol.diverge.network/2.3.0/endpoints/images-oci/client/oci-has/
Specification revision: 2.3.0

The client opens this channel to ask whether the server holds an
image for it, before it asks for anything of the image.

- **The request.** The tag byte `2` followed by the digest as JSON.
  [Request](/2.3.0/endpoints/images-oci/client/oci-has/request/) states its form.
- **The response.** Exactly one channel response, the byte `0`, or
  the byte `1` followed by the repository path the server holds the
  image under, and the channel response finish.
  [Response](/2.3.0/endpoints/images-oci/client/oci-has/response/) states the sequence.
- **Held for the client.** The server answers `1` only for an image
  it holds for the client, as [images::oci](/2.3.0/endpoints/images-oci/)
  states: an image the client built on it. An image another client
  built, and an image the server holds on its own account, are
  answered `0`.
