ContainerRegistryImportPolicy
Creates an asynchronous dry run job to test a container registry import policy
Required permissions
Edit integrations (org.integration.edit)
API key value must be prefixed with "Token ".
Org ID
Container Registry Integration ID
Requested API version
2025-11-05Pattern: ^(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))?))$Dry run job created successfully
Bad Request: A parameter provided as a part of the request was invalid.
Unauthorized: the request requires an authentication token.
Forbidden: the request requires an authentication token with more or different permissions.
Not Found: The resource being operated on could not be found.
Conflict: The requested operation conflicts with the current state of the resource in some way.
Internal Server Error: An error was encountered while attempting to process the request.
POST /rest/orgs/{org_id}/container_import/{integration_id}/policy/dry_run?version=2025-11-05 HTTP/1.1
Host: api.snyk.io
Authorization: YOUR_API_KEY
Content-Type: application/vnd.api+json
Accept: */*
Content-Length: 220
{
"data": {
"attributes": {
"policy": {
"delete_images": true,
"import_policy": {
"name": "text",
"policy": {},
"sub_policies": [
{}
],
"type": "text"
},
"name": "text",
"schedule_frequency_hours": 1
}
},
"type": "container_registry_import_policy"
}
}{
"data": {
"attributes": {
"status": "pending"
},
"id": "123e4567-e89b-12d3-a456-426614174000",
"type": "dry_run_job"
},
"jsonapi": {
"version": "1.0"
},
"links": {
"self": "https://example.com/api/this_resource"
}
}Retrieves the status and results of a dry run job
Required permissions
Edit integrations (org.integration.edit)
API key value must be prefixed with "Token ".
Org ID
Container Registry Integration ID
Dry run job ID
Requested API version
2025-11-05Pattern: ^(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))?))$Dry run job retrieved successfully
Bad Request: A parameter provided as a part of the request was invalid.
Unauthorized: the request requires an authentication token.
Forbidden: the request requires an authentication token with more or different permissions.
Not Found: The resource being operated on could not be found.
Internal Server Error: An error was encountered while attempting to process the request.
GET /rest/orgs/{org_id}/container_import/{integration_id}/policy/dry_run/{job_id}?version=2025-11-05 HTTP/1.1
Host: api.snyk.io
Authorization: YOUR_API_KEY
Accept: */*
{
"data": {
"attributes": {
"completed_at": "2025-12-06T19:12:10.393Z",
"error_message": "text",
"policy": {
"delete_images": true,
"import_policy": {
"name": "text",
"policy": {},
"sub_policies": [
{}
],
"type": "text"
},
"name": "text",
"schedule_frequency_hours": 1
},
"result": {
"images_to_delete": [
{
"repository": "text",
"tags": [
{
"observed_at": "2025-12-06T19:12:10.393Z",
"tag": "text"
}
]
}
],
"images_to_import": [
{
"repository": "text",
"tags": [
{
"observed_at": "2025-12-06T19:12:10.393Z",
"tag": "text"
}
]
}
],
"total_images_processed": 1
},
"started_at": "2025-12-06T19:12:10.393Z",
"status": "pending"
},
"id": "123e4567-e89b-12d3-a456-426614174000",
"type": "dry_run_job"
},
"jsonapi": {
"version": "1.0"
},
"links": {
"self": "https://example.com/api/this_resource"
}
}Last updated
Was this helpful?

