### GET /api/v1/plans Source: https://cloud.ibm.com/apidocs/container-registry.json Get plans for the targeted account. ```markdown ### Parameters - **Account** (string, header, required): The unique ID for your IBM Cloud account. ### Responses #### 200 - Success. **Plan** - **plan** (string) #### 400 - A required header is missing. Correct the request and try again. **RequestError** - **code** (string) - **message** (string) - **rc** (integer (int64)) - **request-id** (string) #### 500 - response **RequestError** - **code** (string) - **message** (string) - **rc** (integer (int64)) - **request-id** (string) #### 503 - response **RequestError** - **code** (string) - **message** (string) - **rc** (integer (int64)) - **request-id** (string) ### Example Usage ```bash curl -X GET "https://icr.io/api/v1/plans" ``` ``` -------------------------------- ### GET /api/v1/settings Source: https://cloud.ibm.com/apidocs/container-registry.json Get account settings for the targeted account. ```markdown ### Parameters - **Account** (string, header, required): The unique ID for your IBM Cloud account. ### Responses #### 200 - Success **AccountSettings** - **platform_metrics** (boolean): Opt in to IBM Cloud Container Registry publishing platform metrics #### 400 - A required header is missing. Correct the request and try again. **RequestError** - **code** (string) - **message** (string) - **rc** (integer (int64)) - **request-id** (string) #### 500 - response **RequestError** - **code** (string) - **message** (string) - **rc** (integer (int64)) - **request-id** (string) #### 503 - response **RequestError** - **code** (string) - **message** (string) - **rc** (integer (int64)) - **request-id** (string) ### Example Usage ```bash curl -X GET "https://icr.io/api/v1/settings" ``` ``` -------------------------------- ### GET /api/v1/trash Source: https://cloud.ibm.com/apidocs/container-registry.json List all images that are in the trash can. ```markdown ### Parameters - **Account** (string, header, required): The unique ID for your IBM Cloud account. - **namespace** (string, query, optional): Limit results to trash can images in the given namespace only. ### Responses #### 200 - Success **TrashList** #### 400 - A required header is missing. Correct the request and try again. **RequestError** - **code** (string) - **message** (string) - **rc** (integer (int64)) - **request-id** (string) #### 401 - You are not authorized to view the requested resource, or your IBM Cloud bearer token is invalid. Correct the request and try again. **RequestError** - **code** (string) - **message** (string) - **rc** (integer (int64)) - **request-id** (string) #### 403 - No namespaces exist for this account, or you are not authorized to view any namespaces for this account in this region. Create a namespace, or ensure that the IAM access policy for this account grants you Reader access to at least one namespace. You must have access to at least one namespace so that you can list the contents of the trash can **RequestError** - **code** (string) - **message** (string) - **rc** (integer (int64)) - **request-id** (string) #### 404 - No namespaces were found for the targeted account. Add a namespace or target a different account **RequestError** - **code** (string) - **message** (string) - **rc** (integer (int64)) - **request-id** (string) #### 500 - response **RequestError** - **code** (string) - **message** (string) - **rc** (integer (int64)) - **request-id** (string) #### 503 - response **RequestError** - **code** (string) - **message** (string) - **rc** (integer (int64)) - **request-id** (string) ### Example Usage ```bash curl -X GET "https://icr.io/api/v1/trash?namespace=string" ``` ``` -------------------------------- ### GET /api/v1/images/{image}/manifest Source: https://cloud.ibm.com/apidocs/container-registry.json Get the manifest for a container image in the private registry. ```markdown ### Parameters - **Account** (string, header, required): The unique ID for your IBM Cloud account. - **image** (string, path, required): The full IBM Cloud registry path to the image that you want to inspect. Run `ibmcloud cr images` or call the `GET /images/json` endpoint to review images that are in the registry. ### Responses #### 200 - Success **ImageManifest** #### 400 - A required header is missing. Correct the request and try again. **RequestError** - **code** (string) - **message** (string) - **rc** (integer (int64)) - **request-id** (string) #### 401 - You are not authorized to view the requested resource, or your IBM Cloud bearer token is invalid. Correct the request and try again. **RequestError** - **code** (string) - **message** (string) - **rc** (integer (int64)) - **request-id** (string) #### 403 - You do not have authorization to access the specified namespace. **RequestError** - **code** (string) - **message** (string) - **rc** (integer (int64)) - **request-id** (string) #### 404 - The specified image was not found. Check the spelling of the specified image. **RequestError** - **code** (string) - **message** (string) - **rc** (integer (int64)) - **request-id** (string) #### 500 - response **RequestError** - **code** (string) - **message** (string) - **rc** (integer (int64)) - **request-id** (string) #### 503 - response **RequestError** - **code** (string) - **message** (string) - **rc** (integer (int64)) - **request-id** (string) ### Example Usage ```bash curl -X GET "https://icr.io/api/v1/images/{image}/manifest" ``` ``` -------------------------------- ### GET /api/v1/auth Source: https://cloud.ibm.com/apidocs/container-registry.json Get authorization options for the targeted account. ```markdown ### Parameters - **Account** (string, header, required): The unique ID for your IBM Cloud account. ### Responses #### 200 - Success **AuthOptions** - **iam_authz** (boolean): Enable role based authorization when authenticating with IBM Cloud IAM - **private_only** (boolean): Restrict account to only be able to push and pull images over private connections #### 400 - A required header is missing. Correct the request and try again. **RequestError** - **code** (string) - **message** (string) - **rc** (integer (int64)) - **request-id** (string) #### 500 - response **RequestError** - **code** (string) - **message** (string) - **rc** (integer (int64)) - **request-id** (string) #### 503 - response **RequestError** - **code** (string) - **message** (string) - **rc** (integer (int64)) - **request-id** (string) ### Example Usage ```bash curl -X GET "https://icr.io/api/v1/auth" ``` ``` -------------------------------- ### GET /api/v1/quotas Source: https://cloud.ibm.com/apidocs/container-registry.json Get quotas for the targeted account. ```markdown ### Parameters - **Account** (string, header, required): The unique ID for your IBM Cloud account. ### Responses #### 200 - Success. **Quota** - **limit** (object) - **storage_bytes** (integer (int64)): Storage quota or usage in bytes. The value -1 denotes "Unlimited". - **traffic_bytes** (integer (int64)): Traffic quota or usage in bytes. The value -1 denotes "Unlimited". - **store** (integer): Storage quota in bytes. The value of Max Uint64 (18446744073709551615) denotes "Unlimited". - **traffic** (integer): Traffic quota or usage in bytes. The value of Max Uint64 (18446744073709551615) denotes "Unlimited". - **usage** (object) #### 400 - A required header is missing. Correct the request and try again. **RequestError** - **code** (string) - **message** (string) - **rc** (integer (int64)) - **request-id** (string) #### 500 - response **RequestError** - **code** (string) - **message** (string) - **rc** (integer (int64)) - **request-id** (string) #### 503 - response **RequestError** - **code** (string) - **message** (string) - **rc** (integer (int64)) - **request-id** (string) ### Example Usage ```bash curl -X GET "https://icr.io/api/v1/quotas" ``` ``` -------------------------------- ### GET /api/v1/images Source: https://cloud.ibm.com/apidocs/container-registry.json List all images in namespaces in a targeted IBM Cloud account. ```markdown ### Parameters - **Account** (string, header, required): The unique ID for your IBM Cloud account. - **namespace** (string, query, optional): Lists images that are stored in the specified namespace only. Query multiple namespaces by specifying this option for each namespace. If this option is not specified, images from all namespaces in the specified IBM Cloud account are listed. - **includeIBM** (boolean, query, optional): Includes IBM-provided public images in the list of images. If this option is not specified, private images are listed only. If this option is specified more than once, the last parsed setting is the setting that is used. - **includePrivate** (boolean, query, optional): Includes private images in the list of images. If this option is not specified, private images are listed. If this option is specified more than once, the last parsed setting is the setting that is used. - **includeManifestLists** (boolean, query, optional): Includes tags that reference multi-architecture manifest lists in the image list. If this option is not specified, tagged manifest lists are not shown in the list. If this option is specified more than once, the last parsed setting is the setting that is used. - **vulnerabilities** (boolean, query, optional): Displays Vulnerability Advisor status for the listed images. If this option is specified more than once, the last parsed setting is the setting that is used. - **repository** (string, query, optional): Lists images that are stored in the specified repository, under your namespaces. Query multiple repositories by specifying this option for each repository. If this option is not specified, images from all repos are listed. ### Responses #### 200 - Success - Array of RemoteAPIImage #### 400 - A required header is missing. Correct the request and try again. **RequestError** - **code** (string) - **message** (string) - **rc** (integer (int64)) - **request-id** (string) #### 401 - You are not authorized to view the requested resource, or your IBM Cloud bearer token is invalid. Correct the request and try again. **RequestError** - **code** (string) - **message** (string) - **rc** (integer (int64)) - **request-id** (string) #### 403 - You do not have access to the specified namespace. Choose another namespace. **RequestError** - **code** (string) - **message** (string) - **rc** (integer (int64)) - **request-id** (string) #### 404 - No namespaces were found for the targeted account. Add a namespace or target a different account. Alternatively, specify the option to include IBM-provided public images. **RequestError** - **code** (string) - **message** (string) - **rc** (integer (int64)) - **request-id** (string) #### 500 - response **RequestError** - **code** (string) - **message** (string) - **rc** (integer (int64)) - **request-id** (string) #### 503 - response **RequestError** - **code** (string) - **message** (string) - **rc** (integer (int64)) - **request-id** (string) ### Example Usage ```bash curl -X GET "https://icr.io/api/v1/images?namespace=string&includeIBM=true&includePrivate=true&includeManifestLists=true&vulnerabilities=true&repository=string" ``` ``` -------------------------------- ### POST /api/v1/retentions/analyze Source: https://cloud.ibm.com/apidocs/container-registry.json Analyze a retention policy, and get a list of what would be deleted by it. ```markdown ### Parameters - **Account** (string, header, required): The unique ID for your IBM Cloud account. ### Request Body **Content-Type:** application/json - **account** (string): Account associated with the policy. - **images_per_repo** (integer (int64)): Determines how many images are retained in each repository when the retention policy is processed. The value -1 denotes 'Unlimited' (all images are retained). - **namespace** (string) (required): The namespace to which the retention policy is attached. - **retain_untagged** (boolean): Determines whether untagged images are retained when the retention policy is processed. The value is false by default, which means that  untagged images can be deleted when the policy runs. ### Responses #### 200 - Success. **PolicyAnalysis** #### 400 - Supplied input was not valid. Correct the request and try again. **RequestError** - **code** (string) - **message** (string) - **rc** (integer (int64)) - **request-id** (string) #### 500 - response **RequestError** - **code** (string) - **message** (string) - **rc** (integer (int64)) - **request-id** (string) #### 503 - response **RequestError** - **code** (string) - **message** (string) - **rc** (integer (int64)) - **request-id** (string) ### Example Usage ```bash curl -X POST "https://icr.io/api/v1/retentions/analyze" \ -H "Content-Type: application/json" \ -d '{ "account": "string", "images_per_repo": "0", "namespace": "string", "retain_untagged": "true" }' ``` ``` -------------------------------- ### GET /api/v1/namespaces/details Source: https://cloud.ibm.com/apidocs/container-registry.json Retrieves details, such as resource group, for all your namespaces in the targeted registry. ```markdown ### Parameters - **Account** (string, header, required): The unique ID for your IBM Cloud account. ### Responses #### 200 - Success **NamespaceDetailsList** - Array of NamespaceDetails #### 400 - A required header is missing. Correct the request and try again. **RequestError** - **code** (string) - **message** (string) - **rc** (integer (int64)) - **request-id** (string) #### 401 - You are not authorized to view the requested resource, or your IBM Cloud bearer token is invalid. Correct the request and try again. **RequestError** - **code** (string) - **message** (string) - **rc** (integer (int64)) - **request-id** (string) #### 500 - response **RequestError** - **code** (string) - **message** (string) - **rc** (integer (int64)) - **request-id** (string) #### 503 - response **RequestError** - **code** (string) - **message** (string) - **rc** (integer (int64)) - **request-id** (string) ### Example Usage ```bash curl -X GET "https://icr.io/api/v1/namespaces/details" ``` ``` -------------------------------- ### GET /api/v1/messages Source: https://cloud.ibm.com/apidocs/container-registry.json Return any published system messages. ```markdown ### Responses #### 200 - Success. #### 204 - There are no messages to display. Empty response body #### 400 - A required header is missing. Correct the request and try again. **RequestError** - **code** (string) - **message** (string) - **rc** (integer (int64)) - **request-id** (string) #### 500 - response **RequestError** - **code** (string) - **message** (string) - **rc** (integer (int64)) - **request-id** (string) #### 503 - response **RequestError** - **code** (string) - **message** (string) - **rc** (integer (int64)) - **request-id** (string) ### Example Usage ```bash curl -X GET "https://icr.io/api/v1/messages" ``` ``` -------------------------------- ### GET /api/v1/namespaces Source: https://cloud.ibm.com/apidocs/container-registry.json List authorized namespaces in the targeted IBM Cloud account. ```markdown ### Parameters - **Account** (string, header, required): The unique ID for your IBM Cloud account. ### Responses #### 200 - Success **namespaces** - Array of string #### 400 - A required header is missing. Correct the request and try again. **RequestError** - **code** (string) - **message** (string) - **rc** (integer (int64)) - **request-id** (string) #### 401 - You are not authorized to view the requested resource, or your IBM Cloud bearer token is invalid. Correct the request and try again. **RequestError** - **code** (string) - **message** (string) - **rc** (integer (int64)) - **request-id** (string) #### 500 - response **RequestError** - **code** (string) - **message** (string) - **rc** (integer (int64)) - **request-id** (string) #### 503 - response **RequestError** - **code** (string) - **message** (string) - **rc** (integer (int64)) - **request-id** (string) ### Example Usage ```bash curl -X GET "https://icr.io/api/v1/namespaces" ``` ``` -------------------------------- ### GET /api/v1/retentions/{namespace} Source: https://cloud.ibm.com/apidocs/container-registry.json Get the retention policy for the specified namespace. ```markdown ### Parameters - **Account** (string, header, required): The unique ID for your IBM Cloud account. - **namespace** (string, path, required): Gets the retention policy for the specified namespace. ### Responses #### 200 - Success. **RetentionPolicy** - **account** (string): Account associated with the policy. - **images_per_repo** (integer (int64)): Determines how many images are retained in each repository when the retention policy is processed. The value -1 denotes 'Unlimited' (all images are retained). - **namespace** (string) (required): The namespace to which the retention policy is attached. - **retain_untagged** (boolean): Determines whether untagged images are retained when the retention policy is processed. The value is false by default, which means that  untagged images can be deleted when the policy runs. #### 400 - Supplied input was not valid. Correct the request and try again. **RequestError** - **code** (string) - **message** (string) - **rc** (integer (int64)) - **request-id** (string) #### 403 - You do not have access to the specified namespace. Choose another namespace. **RequestError** - **code** (string) - **message** (string) - **rc** (integer (int64)) - **request-id** (string) #### 500 - response **RequestError** - **code** (string) - **message** (string) - **rc** (integer (int64)) - **request-id** (string) #### 503 - response **RequestError** - **code** (string) - **message** (string) - **rc** (integer (int64)) - **request-id** (string) ### Example Usage ```bash curl -X GET "https://icr.io/api/v1/retentions/{namespace}" ``` ``` -------------------------------- ### GET /api/v1/images/{image}/json Source: https://cloud.ibm.com/apidocs/container-registry.json Inspect a container image in the private registry. ```markdown ### Parameters - **Account** (string, header, required): The unique ID for your IBM Cloud account. - **image** (string, path, required): The full IBM Cloud registry path to the image that you want to inspect. Run `ibmcloud cr images` or call the `GET /images/json` endpoint to review images that are in the registry. ### Responses #### 200 - Success **ImageInspection** - **Architecture** (string): The processor architecture used to build this image, and required to run it - **Author** (string): The author of the image - **Comment** (string): A plain text description of the image - **Config** (object): The configuration data about a container. - **ArgsEscaped** (boolean): True if command is already escaped (Windows specific) - **AttachStderr** (boolean): If true, standard error is attached - **AttachStdin** (boolean): If true, standard input is attached, which makes possible user interaction - **AttachStdout** (boolean): If true, standard output is attached - **Cmd** (array (string)): Command that is run when starting the container - **Domainname** (string): The FQDN for the container - **Entrypoint** (array (string)): Entrypoint to run when starting the container - **Env** (array (string)): List of environment variables to set in the container - **ExposedPorts** (object): A list of exposed ports in a format [123:{},456:{}] - **Healthcheck** (object) - **Interval** (integer (int64)): A Duration represents the elapsed time between two instants as an int64 nanosecond count. - **Retries** (integer (int64)): The number of consecutive failures needed to consider a container as unhealthy. Zero means inherit. - **Test** (array (string)): The test to perform to check that the container is healthy. An empty slice means to inherit the default. The options are: {} : inherit healthcheck {"NONE"} : disable healthcheck {"CMD", args...} : exec arguments directly {"CMD-SHELL", command} : run command with system's default shell - **Timeout** (integer (int64)): A Duration represents the elapsed time between two instants as an int64 nanosecond count. - **Hostname** (string): The host name of the container - **Image** (string): Name of the image as it was passed by the operator (eg. could be symbolic) - **Labels** (object): List of labels set to this container - **MacAddress** (string): The MAC Address of the container - **NetworkDisabled** (boolean): If true, containers are not given network access - **OnBuild** (array (string)): ONBUILD metadata that were defined on the image Dockerfile https://docs.docker.com/engine/reference/builder/#onbuild - **OpenStdin** (boolean): Open stdin - **Shell** (array (string)): Shell for shell-form of RUN, CMD, ENTRYPOINT - **StdinOnce** (boolean): If true, close stdin after the 1 attached client disconnects - **StopSignal** (string): Signal to stop a container - **StopTimeout** (integer (int64)): Timeout (in seconds) to stop a container - **Tty** (boolean): Attach standard streams to a tty, including stdin if it is not closed - **User** (string): The user that will run the command(s) inside the container - **Volumes** (object): List of volumes (mounts) used for the container - **WorkingDir** (string): Current working directory (PWD) in the command will be launched - **Container** (string): The ID of the container which created this image - **ContainerConfig** (object): The configuration data about a container. - **Created** (string): The unix timestamp for the date when the image was created - **DockerVersion** (string): The Docker version used to build this image - **Id** (string): The image ID - **ManifestType** (string): Media type of the manifest for the image - **Os** (string): The operating system family used to build this image, and required to run it - **OsVersion** (string): The version of the operating system used to build this image - **Parent** (string): The ID of the base image for this image - **RootFS** (object): RootFS contains information about the root filesystem of a container image - **BaseLayer** (string): Descriptor for the base layer in the image - **Layers** (array (string)): Descriptors for each layer in the image - **Type** (string): The type of filesystem - **Size** (integer (int64)): The size of the image in bytes - **VirtualSize** (integer (int64)): The sum of the size of each layer in the image in bytes #### 400 - A required header is missing. Correct the request and try again. **RequestError** - **code** (string) - **message** (string) - **rc** (integer (int64)) - **request-id** (string) #### 401 - You are not authorized to view the requested resource, or your IBM Cloud bearer token is invalid. Correct the request and try again. **RequestError** - **code** (string) - **message** (string) - **rc** (integer (int64)) - **request-id** (string) #### 403 - You do not have authorization to access the specified namespace. **RequestError** - **code** (string) - **message** (string) - **rc** (integer (int64)) - **request-id** (string) #### 404 - The specified image was not found. Check the spelling of the specified image. **RequestError** - **code** (string) - **message** (string) - **rc** (integer (int64)) - **request-id** (string) #### 500 - response **RequestError** - **code** (string) - **message** (string) - **rc** (integer (int64)) - **request-id** (string) #### 503 - response **RequestError** - **code** (string) - **message** (string) - **rc** (integer (int64)) - **request-id** (string) ### Example Usage ```bash curl -X GET "https://icr.io/api/v1/images/{image}/json" ``` ``` -------------------------------- ### GET /api/v1/retentions Source: https://cloud.ibm.com/apidocs/container-registry.json List retention policies for all namespaces in the targeted IBM Cloud account. ```markdown ### Parameters - **Account** (string, header, required): The unique ID for your IBM Cloud account. ### Responses #### 200 - Success. **RetentionPolicyList** #### 500 - response **RequestError** - **code** (string) - **message** (string) - **rc** (integer (int64)) - **request-id** (string) #### 503 - response **RequestError** - **code** (string) - **message** (string) - **rc** (integer (int64)) - **request-id** (string) ### Example Usage ```bash curl -X GET "https://icr.io/api/v1/retentions" ``` ``` -------------------------------- ### POST /api/v1/trash/{image}/restore Source: https://cloud.ibm.com/apidocs/container-registry.json Restore an image from the trash can. ```markdown ### Parameters - **Account** (string, header, required): The unique ID for your IBM Cloud account. - **image** (string, path, required): The name of the image that you want to restore, in the format <REPOSITORY>:<TAG>. Run `ibmcloud cr trash-list` or call the `GET /trash/json` endpoint to review images that are in the trash. ### Responses #### 200 - Success Empty response body #### 400 - There was a problem with the input. Correct the request and try again. **RequestError** - **code** (string) - **message** (string) - **rc** (integer (int64)) - **request-id** (string) #### 403 - You do not have push authorization to the specified namespace. **RequestError** - **code** (string) - **message** (string) - **rc** (integer (int64)) - **request-id** (string) #### 404 - Image not found. **RequestError** - **code** (string) - **message** (string) - **rc** (integer (int64)) - **request-id** (string) #### 409 - The tagged image already exists. **RequestError** - **code** (string) - **message** (string) - **rc** (integer (int64)) - **request-id** (string) #### 500 - response **RequestError** - **code** (string) - **message** (string) - **rc** (integer (int64)) - **request-id** (string) ### Example Usage ```bash curl -X POST "https://icr.io/api/v1/trash/{image}/restore" ``` ``` -------------------------------- ### Schema: NamespaceDetails Source: https://cloud.ibm.com/apidocs/container-registry.json Details of a namespace ```markdown ## Schema: NamespaceDetails Details of a namespace **Type:** object - **account** (string): The IBM Cloud account that owns the namespace. - **created_date** (string): The creation date of the namespace. - **crn** (string): If the namespace is assigned to a resource group, the IBM Cloud CRN representing the namespace. - **name** (string) - **resource_created_date** (string): The date that the namespace was assigned to a resource group. - **resource_group** (string): The ID of the resource group to which the namespace is assigned. - **updated_date** (string): The date that the namespace was last updated. ``` -------------------------------- ### POST /api/v1/images/tags Source: https://cloud.ibm.com/apidocs/container-registry.json Create a new tag in a private registry that refers to an existing image in the same region. If the fromimage has Red Hat® signatures and the toimage is in a different repository, those signatures are copied to that repository. ```markdown ### Parameters - **Account** (string, header, required): The unique ID for your IBM Cloud account. - **fromimage** (string, query, required): The name of the image that you want to create a new tag for, in the format <REPOSITORY>:<TAG>. Run `ibmcloud cr images` or call the `GET /images/json` endpoint to review images that are in the registry. - **toimage** (string, query, required): The new tag for the image, in the format <REPOSITORY>:<TAG>. ### Responses #### 201 - Success Empty response body #### 400 - There was a problem with the input. Correct the request and try again. **RequestError** - **code** (string) - **message** (string) - **rc** (integer (int64)) - **request-id** (string) #### 401 - You are not authorized to view the requested resource, or your IBM Cloud bearer token is invalid. Correct the request and try again. **RequestError** - **code** (string) - **message** (string) - **rc** (integer (int64)) - **request-id** (string) #### 403 - You do not have authorization to access the specified namespace. **RequestError** - **code** (string) - **message** (string) - **rc** (integer (int64)) - **request-id** (string) #### 500 - response **RequestError** - **code** (string) - **message** (string) - **rc** (integer (int64)) - **request-id** (string) ### Example Usage ```bash curl -X POST "https://icr.io/api/v1/images/tags?fromimage=string&toimage=string" ``` ``` -------------------------------- ### Schema: Tags Source: https://cloud.ibm.com/apidocs/container-registry.json A list of tags for an image. ```markdown ## Schema: Tags A list of tags for an image. **Type:** array - Array of string ``` -------------------------------- ### Schema: VulnerabilityStatus Source: https://cloud.ibm.com/apidocs/container-registry.json Summary of vulnerability status ```markdown ## Schema: VulnerabilityStatus Summary of vulnerability status **Type:** string ``` -------------------------------- ### Schema: Plan Source: https://cloud.ibm.com/apidocs/container-registry.json The plan for the targeted IBM Cloud account ```markdown ## Schema: Plan The plan for the targeted IBM Cloud account **Type:** object - **plan** (string) ``` -------------------------------- ### Schema: Trash Source: https://cloud.ibm.com/apidocs/container-registry.json Details of the tags and days until expiry ```markdown ## Schema: Trash Details of the tags and days until expiry **Type:** object - **daysUntilExpiry** (integer (int64)) - **tags** (array (string)) ``` -------------------------------- ### Schema: ImageDigestTags Source: https://cloud.ibm.com/apidocs/container-registry.json A map of tags to Vulnerability Advisor reports ```markdown ## Schema: ImageDigestTags A map of tags to Vulnerability Advisor reports **Type:** object ``` -------------------------------- ### PUT /api/v1/namespaces/{name} Source: https://cloud.ibm.com/apidocs/container-registry.json Add a namespace to the targeted IBM Cloud account. ```markdown ### Parameters - **Account** (string, header, required): The unique ID for your IBM Cloud account. - **X-Auth-Resource-Group** (string, header, optional): The ID of the resource group to which you want to add the namespace. - **name** (string, path, required): The name of the namespace that you want to create. ### Responses #### 200 - The namespace is already assigned to your IBM Cloud account. **Namespace** - **namespace** (string) #### 201 - The namespace was successfully added to your IBM Cloud account. **Namespace** - **namespace** (string) #### 400 - A required header is missing or invalid. Correct the request and try again. **RequestError** - **code** (string) - **message** (string) - **rc** (integer (int64)) - **request-id** (string) #### 401 - You are not authorized to view the requested resource, or your IBM Cloud bearer token is invalid. Correct the request and try again. **RequestError** - **code** (string) - **message** (string) - **rc** (integer (int64)) - **request-id** (string) #### 403 - The requested namespace is blocklisted. Correct the request and try again. **RequestError** - **code** (string) - **message** (string) - **rc** (integer (int64)) - **request-id** (string) #### 409 - The requested namespace is already in use. Request a different namespace. **RequestError** - **code** (string) - **message** (string) - **rc** (integer (int64)) - **request-id** (string) #### 500 - response **RequestError** - **code** (string) - **message** (string) - **rc** (integer (int64)) - **request-id** (string) #### 503 - response **RequestError** - **code** (string) - **message** (string) - **rc** (integer (int64)) - **request-id** (string) ### Example Usage ```bash curl -X PUT "https://icr.io/api/v1/namespaces/{name}" ``` ``` -------------------------------- ### Schema: ListImageDigestOptions Source: https://cloud.ibm.com/apidocs/container-registry.json The input to the ImageDigestLists request ```markdown ## Schema: ListImageDigestOptions The input to the ImageDigestLists request **Type:** object - **exclude_tagged** (boolean): ExcludeTagged returns only untagged digests - **exclude_va** (boolean): ExcludeVA returns the digest list with no VA scan results - **include_ibm** (boolean): When true, API will return the IBM public images if they exist in the targeted region. - **repositories** (array (string)): Repositories in which to restrict the output. If left empty all images for the account will be returned. ``` -------------------------------- ### Schema: AccountSettings Source: https://cloud.ibm.com/apidocs/container-registry.json Account settings for the targeted IBM Cloud account ```markdown ## Schema: AccountSettings Account settings for the targeted IBM Cloud account **Type:** object - **platform_metrics** (boolean): Opt in to IBM Cloud Container Registry publishing platform metrics ``` -------------------------------- ### POST /api/v1/trash/{digest}/restoretags Source: https://cloud.ibm.com/apidocs/container-registry.json In the targeted region, restore a digest, and all of its tags in the same repository, from the trash. ```markdown ### Parameters - **Account** (string, header, required): The unique ID for your IBM Cloud account. - **digest** (string, path, required): The full IBM Cloud registry digest reference for the digest that you want to restore such as `icr.io/namespace/repo@sha256:a9be...`. Call the `GET /trash/json` endpoint to review digests that are in the trash and their tags in the same repository. ### Responses #### 200 - Success **RestoreResult** - **successful** (array (string)): Successful is a list of tags that were restored - **unsuccessful** (array (string)): Unsuccessful is a list of tags that were not restored because of a conflict #### 400 - There was a problem with the input. Correct the request and try again. **RequestError** - **code** (string) - **message** (string) - **rc** (integer (int64)) - **request-id** (string) #### 403 - You do not have push authorization to the specified namespace. **RequestError** - **code** (string) - **message** (string) - **rc** (integer (int64)) - **request-id** (string) #### 404 - Digest not found. **RequestError** - **code** (string) - **message** (string) - **rc** (integer (int64)) - **request-id** (string) #### 500 - response **RequestError** - **code** (string) - **message** (string) - **rc** (integer (int64)) - **request-id** (string) #### 503 - response **RequestError** - **code** (string) - **message** (string) - **rc** (integer (int64)) - **request-id** (string) ### Example Usage ```bash curl -X POST "https://icr.io/api/v1/trash/{digest}/restoretags" ``` ``` -------------------------------- ### PATCH /api/v1/settings Source: https://cloud.ibm.com/apidocs/container-registry.json Update settings for the targeted account. ```markdown ### Parameters - **Account** (string, header, required): The unique ID for your IBM Cloud account. ### Request Body **Content-Type:** application/json - **platform_metrics** (boolean): Opt in to IBM Cloud Container Registry publishing platform metrics ### Responses #### 204 - Success Empty response body #### 400 - A required header is missing or invalid. Correct the request and try again. **RequestError** - **code** (string) - **message** (string) - **rc** (integer (int64)) - **request-id** (string) #### 403 - You do not have access to perform the requested operation. You must have either Manager or Billing Manager roles on the targeted account to perform this action. **RequestError** - **code** (string) - **message** (string) - **rc** (integer (int64)) - **request-id** (string) #### 500 - response **RequestError** - **code** (string) - **message** (string) - **rc** (integer (int64)) - **request-id** (string) #### 503 - response **RequestError** - **code** (string) - **message** (string) - **rc** (integer (int64)) - **request-id** (string) ### Example Usage ```bash curl -X PATCH "https://icr.io/api/v1/settings" \ -H "Content-Type: application/json" \ -d '{ "platform_metrics": "true" }' ``` ``` -------------------------------- ### POST /api/v1/images/digests Source: https://cloud.ibm.com/apidocs/container-registry.json List all images by digest in namespaces in a targeted IBM Cloud account. ```markdown ### Parameters - **Account** (string, header, required): The unique ID for your IBM Cloud account. ### Request Body **Content-Type:** application/json - **exclude_tagged** (boolean): ExcludeTagged returns only untagged digests - **exclude_va** (boolean): ExcludeVA returns the digest list with no VA scan results - **include_ibm** (boolean): When true, API will return the IBM public images if they exist in the targeted region. - **repositories** (array (string)): Repositories in which to restrict the output. If left empty all images for the account will be returned. ### Responses #### 200 - Success **ImageDigestList** - Array of ImageDigest #### 400 - A required header is missing. Correct the request and try again. **RequestError** - **code** (string) - **message** (string) - **rc** (integer (int64)) - **request-id** (string) #### 401 - You are not authorized to view the requested resource, or your IBM Cloud bearer token is invalid. Correct the request and try again. **RequestError** - **code** (string) - **message** (string) - **rc** (integer (int64)) - **request-id** (string) #### 403 - You do not have access to the specified namespace. Choose another namespace. **RequestError** - **code** (string) - **message** (string) - **rc** (integer (int64)) - **request-id** (string) #### 404 - No namespaces were found for the targeted account. Add a namespace or target a different account. Alternatively, specify the option to include IBM-provided public images. **RequestError** - **code** (string) - **message** (string) - **rc** (integer (int64)) - **request-id** (string) #### 500 - response **RequestError** - **code** (string) - **message** (string) - **rc** (integer (int64)) - **request-id** (string) #### 503 - response **RequestError** - **code** (string) - **message** (string) - **rc** (integer (int64)) - **request-id** (string) ### Example Usage ```bash curl -X POST "https://icr.io/api/v1/images/digests" \ -H "Content-Type: application/json" \ -d '{ "exclude_tagged": "true", "exclude_va": "true", "include_ibm": "true", "repositories": [ "string" ] }' ``` ```