Skip to main content

OciFile

A single file inside an OCI artifact โ€” for example, a bundle's README.md, a Terraform module's src/main.tf, or a Helm chart's templates/deployment.yaml. File names may include nested paths.

Use url to download the bytes; use mediaType to decide how to render them; use digest and size to verify integrity or to pull the file directly with an OCI client.

graphql
type OciFile {
name: String!
mediaType: String!
size: Int!
digest: String!
url: String!
}

Fieldsโ€‹

OciFile.nameย โ—ย String! non-null scalar {#name}โ€‹

The file's path within the artifact, including any directory segments (e.g., README.md, src/main.tf, helm/templates/deployment.yaml).

OciFile.mediaTypeย โ—ย String! non-null scalar {#media-type}โ€‹

Content type the publisher declared for this file (e.g., text/markdown, application/json, image/svg+xml, text/x-terraform). Use this to pick a renderer in your UI โ€” the response from url is always served as plain text for safety, so the consumer is responsible for interpreting the bytes.

OciFile.sizeย โ—ย Int! non-null scalar {#size}โ€‹

File size in bytes.

OciFile.digestย โ—ย String! non-null scalar {#digest}โ€‹

Content-addressable SHA-256 digest of the file (e.g., sha256:e3b0c44298fc1c14...). Stable across re-publishes of identical content; useful for integrity checks or pulling the file directly with an OCI client like oras.

OciFile.urlย โ—ย String! non-null scalar {#url}โ€‹

Authenticated URL to download this file. Requires an active session or API credentials, and repo:view on the OCI repository. The response is always served as text/plain (regardless of the file's mediaType) so it cannot execute scripts in a browser. To render the file, fetch the URL with credentials, read the bytes, and render them client-side according to mediaType. Direct embedding via <img> or <iframe> will not work.

Member Ofโ€‹

OciFilesPage object