Image Sources

Endpoints related to managing image sources.

List Image Sources

Requires the images-sources-view capability.

SecuritybearerAuth and hubAuth
Request
query Parameters
meta
Array of strings

A comma separated list of meta values. Meta values will show up under a resource's meta field. In the case of applying a meta to a collection of resources, each resource will have it's own relevant meta data. In some rare cases, meta may not apply to individual resources, and may appear in the root document. These will be clearly labeled.

Items Value: "images_count"
include
Array of strings

A comma separated list of include values. Included resources will show up under the root document's include field, with the key being the id of the included resource. In the case of applying an include to a collection of resources, if two resources share the same include, it will only appear once in the return.

Items Enum: "creators" "integrations"
object

Filter Field

The filter field is a key-value object, where the key is what you would like to filter, and the value is the value you're filtering for.

sort
Array of strings

An array of sort values. To sort descending, put a - in front of the value, e.g. -id.

object

In a list return, the data associated with the page number and size returned. 20 results per page, page 2 would be page[size]=20&page[number]=2

Responses
200

Returns a list of Image Sources.

default

General error response from the platform

get/v1/images/sources
Response samples
application/json
{
  • "data": [
    ],
  • "includes": {
    }
}

Create Image Source

Requires the images-sources-manage capability.

SecuritybearerAuth and hubAuth
Request
Request Body schema: application/json

Parameters for creating an Image Source.

name
string

A name for the Image Source.

identifier
string (Identifier)

A human-readable identifier used to refer to a resource, where using the official ID may be inconvenient. The identifier is automatically tokenized from the name/relevant field of the resource if one is not provided. For example, a container named "My Container" will have the identifier of my-container and is automatically created by the platform.

The identifier does not have to be unique.

object or null
type
required
string (ImageSourceType)

The type of images in this source.

Enum: "stack-build" "direct" "bucket"
required
DockerHubOrigin (object) or DockerFileOrigin (object) or DockerRegistryOrigin (object) or OciRegistryOrigin (object) or CycleUploadOrigin (object) or CycleSourceOrigin (object) or NoneOrigin (object) (ImageOrigin)
object

User defined information about the Image Source.

Responses
201

Returns an Image Source.

default

General error response from the platform

post/v1/images/sources
Request samples
application/json
{
  • "name": "string",
  • "identifier": "string",
  • "builder": {
    },
  • "type": "stack-build",
  • "origin": {
    },
  • "about": {
    }
}
Response samples
application/json
{
  • "data": {
    }
}

Get Image Source

Requires the images-sources-view capability.

SecuritybearerAuth and hubAuth
Request
path Parameters
sourceId
required
string

The ID of the Image Source.

query Parameters
meta
Array of strings

A comma separated list of meta values. Meta values will show up under a resource's meta field. In the case of applying a meta to a collection of resources, each resource will have it's own relevant meta data. In some rare cases, meta may not apply to individual resources, and may appear in the root document. These will be clearly labeled.

Items Value: "images_count"
include
Array of strings

A comma separated list of include values. Included resources will show up under the root document's include field, with the key being the id of the included resource. In the case of applying an include to a collection of resources, if two resources share the same include, it will only appear once in the return.

Items Enum: "creators" "integrations"
Responses
200

Returns an Image Source.

default

General error response from the platform

get/v1/images/sources/{sourceId}
Response samples
application/json
{
  • "data": {
    },
  • "includes": {
    }
}

Update Image Source

Requires the images-sources-manage capability.

SecuritybearerAuth and hubAuth
Request
path Parameters
sourceId
required
string

The ID of the Image Source.

Request Body schema: application/json

Parameters for updating an image source.

name
string

A name for the image source.

DockerHubOrigin (object) or DockerFileOrigin (object) or DockerRegistryOrigin (object) or OciRegistryOrigin (object) or CycleUploadOrigin (object) or CycleSourceOrigin (object) or NoneOrigin (object) (ImageOrigin)
object or null
object

User defined information about the image source.

Responses
200

Returns an Image Source.

default

General error response from the platform

patch/v1/images/sources/{sourceId}
Request samples
application/json
{
  • "name": "string",
  • "origin": {
    },
  • "builder": {
    },
  • "about": {
    }
}
Response samples
application/json
{
  • "data": {
    }
}

Delete Image Source

Requires the images-sources-manage capability.

SecuritybearerAuth and hubAuth
Request
path Parameters
sourceId
required
string

The ID of the Image Source.

Responses
202

Returns a Job Descriptor.

default

General error response from the platform

delete/v1/images/sources/{sourceId}
Response samples
application/json
{
  • "data": {
    }
}