# OCI has

> Tag 2: the server asks the client whether it holds an image, by digest; the client 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 client does not hold it.

Canonical: https://protocol.diverge.network/2.3.0/endpoints/containers-agents-run/server/oci-has/
Specification revision: 2.3.0

The server opens this channel when it would obtain the image of the
request from the client, before it asks for anything of the image.

- **When.** Between the request and the deploy.
- **The request.** The tag byte `2` followed by the digest as JSON. [Request](/2.3.0/endpoints/containers-agents-run/server/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 client holds the
  image under, and the channel response finish. [Response](/2.3.0/endpoints/containers-agents-run/server/oci-has/response/)
  states the sequence.
- **Whether to ask.** The server asks only when it would obtain the
  image from the client. A server that obtains the image from a
  source of its own does not open this channel, and a client is not
  told where the image came from.
