Custom Base Images

이 문서는 REST API를 사용합니다. 자세한 내용은 API를 위한 인증 페이지를 참조하십시오.

Create a Custom Base Image from an existing container project

post

In order to create a custom base image, you first need to import your base images into Snyk. You can do this through the CLI, UI, or API.

This endpoint marks an image as a custom base image. This means that the image will get added to the pool of images from which Snyk can recommend base image upgrades.

Note, after the first image in a repository gets added, a versioning schema cannot be passed in this endpoint. To update the versioning schema, the PATCH endpoint must be used.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Query parameters
versionstringRequired

Requested API version

Example: 2021-06-04Pattern: ^(wip|work-in-progress|experimental|beta|((([0-9]{4})-([0-1][0-9]))-((3[01])|(0[1-9])|([12][0-9]))(~(wip|work-in-progress|experimental|beta))?))$
Body
Responses
post
/custom_base_images

Get a custom base image collection

get

Get a list of custom base images with support for ordering and filtering. Either the org_id or group_id parameters must be set to authorize successfully. If sorting by version, the repository filter is required.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Query parameters
versionstringRequired

Requested API version

Example: 2021-06-04Pattern: ^(wip|work-in-progress|experimental|beta|((([0-9]{4})-([0-1][0-9]))-((3[01])|(0[1-9])|([12][0-9]))(~(wip|work-in-progress|experimental|beta))?))$
starting_afterstringOptional

Return the page of results immediately after this cursor

Example: v1.eyJpZCI6IjEwMDAifQo=
ending_beforestringOptional

Return the page of results immediately before this cursor

Example: v1.eyJpZCI6IjExMDAifQo=
limitinteger · int32 · min: 10 · max: 100Optional

Number of results to return per page

Default: 10Example: 10
project_idstring · uuidOptional

The ID of the container project that the custom base image is based off of.

org_idstring · uuidOptional

The organization ID of the custom base image

group_idstring · uuidOptional

The group ID of the custom base image

repositorystringOptional

The image repository

tagstringOptional

The image tag

include_in_recommendationsbooleanOptional

Whether this image should be recommended as a base image upgrade

sort_bystring · enumOptional

Which column to sort by. If sorting by version, the versioning schema is used.

Possible values:
sort_directionstring · enumOptional

Which direction to sort

Default: ASCPossible values:
Responses
200

Returns custom base images

application/vnd.api+json
get
/custom_base_images

Update a custom base image

patch

Updates a custom base image's attributes

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
custombaseimage_idstring · uuidRequired

Unique identifier for custom base image

Query parameters
versionstringRequired

Requested API version

Example: 2021-06-04Pattern: ^(wip|work-in-progress|experimental|beta|((([0-9]{4})-([0-1][0-9]))-((3[01])|(0[1-9])|([12][0-9]))(~(wip|work-in-progress|experimental|beta))?))$
Body
Responses
200

Returns the updated custom base image

application/vnd.api+json
patch
/custom_base_images/{custombaseimage_id}

Get a custom base image

get

Get a custom base image

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
custombaseimage_idstring · uuidRequired

Unique identifier for custom base image

Query parameters
versionstringRequired

Requested API version

Example: 2021-06-04Pattern: ^(wip|work-in-progress|experimental|beta|((([0-9]{4})-([0-1][0-9]))-((3[01])|(0[1-9])|([12][0-9]))(~(wip|work-in-progress|experimental|beta))?))$
Responses
200

Returns a custom base image

application/vnd.api+json
get
/custom_base_images/{custombaseimage_id}

Delete a custom base image

delete

Delete a custom base image resource. (the related container project is unaffected)

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
custombaseimage_idstring · uuidRequired

Unique identifier for custom base image

Query parameters
versionstringRequired

Requested API version

Example: 2021-06-04Pattern: ^(wip|work-in-progress|experimental|beta|((([0-9]{4})-([0-1][0-9]))-((3[01])|(0[1-9])|([12][0-9]))(~(wip|work-in-progress|experimental|beta))?))$
Responses
delete
/custom_base_images/{custombaseimage_id}

No content

Last updated