Asset
The endpoint allows for partial updates to an asset's attributes.
Required permissions
Edit Group Details (group.edit)
API key value must be prefixed with "Token ".
Unique identifier for the Asset
Group ID
Requested API version
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))?))$Asset updated 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.
PATCH /rest/groups/{group_id}/assets/{asset_id}?version=text HTTP/1.1
Host: api.snyk.io
Authorization: YOUR_API_KEY
Content-Type: application/vnd.api+json
Accept: */*
Content-Length: 253
{
"data": {
"attributes": {
"class": {
"display_name": "A",
"locked": true,
"rank": 1
},
"labels": {
"add": [
"text"
],
"remove": [
"text"
]
},
"tags": {
"add": {
"ANY_ADDITIONAL_PROPERTY": "text"
},
"remove": [
"text"
]
}
},
"id": "123e4567-e89b-12d3-a456-426614174000",
"type": "repository"
}
}{
"data": {
"attributes": {
"app_context": {},
"archived": true,
"base_image": "text",
"browse_url": "https://example.com",
"class": {
"display_name": "A",
"locked": true,
"rank": 1
},
"coverage_controls": [
{
"category": "security",
"gap": true,
"issues_count": {
"critical": 1,
"high": 2,
"low": 0,
"medium": 0
},
"last_scan": "2023-10-10T08:00:00Z",
"name": "control1"
}
],
"created_at": "2025-11-12T16:07:11.115Z",
"default_branch_name": "main",
"developers": [
{
"discovered_by": "github",
"email": "[email protected]",
"url": "https://github.com/johndoe",
"username": "johndoe"
}
],
"file_path": "text",
"image_digests": [
"text"
],
"image_id": "text",
"image_registries": [
"text"
],
"image_repositories": [
"text"
],
"image_tags": [
"text"
],
"labels": [
"text"
],
"languages": {
"ANY_ADDITIONAL_PROPERTY": 1
},
"name": "text",
"removed_reasons": [
{
"reason": "deleted-profile",
"removed_at": "2025-11-12T16:07:11.115Z"
}
],
"repository_freshness": "Ynl0ZXM=",
"repository_url": "text",
"risk_factors": [
"text"
],
"sources": [
"text"
],
"tags": {
"ANY_ADDITIONAL_PROPERTY": "text"
},
"updated_at": "2025-11-12T16:07:11.115Z"
},
"id": "123e4567-e89b-12d3-a456-426614174000",
"relationships": {
"assets": {
"links": {
"related": "text"
}
},
"organizations": {
"data": [
{
"attributes": {
"name": "text"
},
"id": "text",
"type": "text"
}
]
},
"projects": {
"links": {
"related": "text"
}
}
},
"removed": true,
"type": "repository"
},
"jsonapi": {
"version": "text"
},
"links": {
"self": "https://example.com/api/this_resource"
}
}Get an Asset by its ID
Required permissions
View Groups (group.read)
API key value must be prefixed with "Token ".
Unique identifier for the Asset
Group ID
Requested API version
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))?))$Asset found
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.
GET /rest/groups/{group_id}/assets/{asset_id}?version=text HTTP/1.1
Host: api.snyk.io
Authorization: YOUR_API_KEY
Accept: */*
{
"data": {
"attributes": {
"app_context": {},
"archived": true,
"base_image": "text",
"browse_url": "https://example.com",
"class": {
"display_name": "A",
"locked": true,
"rank": 1
},
"coverage_controls": [
{
"category": "security",
"gap": true,
"issues_count": {
"critical": 1,
"high": 2,
"low": 0,
"medium": 0
},
"last_scan": "2023-10-10T08:00:00Z",
"name": "control1"
}
],
"created_at": "2025-11-12T16:07:11.115Z",
"default_branch_name": "main",
"developers": [
{
"discovered_by": "github",
"email": "[email protected]",
"url": "https://github.com/johndoe",
"username": "johndoe"
}
],
"file_path": "text",
"image_digests": [
"text"
],
"image_id": "text",
"image_registries": [
"text"
],
"image_repositories": [
"text"
],
"image_tags": [
"text"
],
"labels": [
"text"
],
"languages": {
"ANY_ADDITIONAL_PROPERTY": 1
},
"name": "text",
"removed_reasons": [
{
"reason": "deleted-profile",
"removed_at": "2025-11-12T16:07:11.115Z"
}
],
"repository_freshness": "Ynl0ZXM=",
"repository_url": "text",
"risk_factors": [
"text"
],
"sources": [
"text"
],
"tags": {
"ANY_ADDITIONAL_PROPERTY": "text"
},
"updated_at": "2025-11-12T16:07:11.115Z"
},
"id": "123e4567-e89b-12d3-a456-426614174000",
"relationships": {
"assets": {
"links": {
"related": "text"
}
},
"organizations": {
"data": [
{
"attributes": {
"name": "text"
},
"id": "text",
"type": "text"
}
]
},
"projects": {
"links": {
"related": "text"
}
}
},
"removed": true,
"type": "repository"
},
"jsonapi": {
"version": "text"
},
"links": {
"self": "https://example.com/api/this_resource"
}
}List asset projects with pagination
Required permissions
View Groups (group.read)
API key value must be prefixed with "Token ".
Group ID
Unique identifier for the Asset
Return records after the record identified by cursor position starting_after
Return records before the record identified by cursor position ending_before
Number of records to return
10Requested API version
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))?))$Assets found
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.
GET /rest/groups/{group_id}/assets/{asset_id}/relationships/projects?version=text HTTP/1.1
Host: api.snyk.io
Authorization: YOUR_API_KEY
Accept: */*
{
"data": [
{
"attributes": {
"issues_counts": {
"critical": 1,
"high": 1,
"low": 1,
"medium": 1
},
"last_scan": "text",
"name": "text",
"organization_id": "text",
"organization_name": "text",
"project_type": "text",
"target_file": "text",
"target_id": "text",
"target_reference": "text",
"test_surface": "text",
"url": "text"
},
"id": "123e4567-e89b-12d3-a456-426614174000",
"type": "project"
}
],
"jsonapi": {
"version": "text"
},
"links": {
"first": "https://example.com/api/resource",
"last": "https://example.com/api/resource",
"next": "https://example.com/api/resource",
"prev": "https://example.com/api/resource",
"related": "https://example.com/api/resource",
"self": "https://example.com/api/resource"
}
}List related assets with pagination
Required permissions
View Groups (group.read)
API key value must be prefixed with "Token ".
Group ID
Unique identifier for the Asset
Return records after the record identified by cursor position starting_after
Return records before the record identified by cursor position ending_before
Number of records to return
10Requested API version
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))?))$Filter by asset type
Related assets found
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.
GET /rest/groups/{group_id}/assets/{asset_id}/relationships/assets?version=text HTTP/1.1
Host: api.snyk.io
Authorization: YOUR_API_KEY
Accept: */*
{
"data": [
{
"attributes": {
"app_context": {},
"archived": true,
"base_image": "text",
"browse_url": "https://example.com",
"class": {
"display_name": "A",
"locked": true,
"rank": 1
},
"coverage_controls": [
{
"category": "security",
"gap": true,
"issues_count": {
"critical": 1,
"high": 2,
"low": 0,
"medium": 0
},
"last_scan": "2023-10-10T08:00:00Z",
"name": "control1"
}
],
"created_at": "2025-11-12T16:07:11.115Z",
"default_branch_name": "main",
"developers": [
{
"discovered_by": "github",
"email": "[email protected]",
"url": "https://github.com/johndoe",
"username": "johndoe"
}
],
"file_path": "text",
"image_digests": [
"text"
],
"image_id": "text",
"image_registries": [
"text"
],
"image_repositories": [
"text"
],
"image_tags": [
"text"
],
"labels": [
"text"
],
"languages": {
"ANY_ADDITIONAL_PROPERTY": 1
},
"name": "text",
"removed_reasons": [
{
"reason": "deleted-profile",
"removed_at": "2025-11-12T16:07:11.115Z"
}
],
"repository_freshness": "Ynl0ZXM=",
"repository_url": "text",
"risk_factors": [
"text"
],
"sources": [
"text"
],
"tags": {
"ANY_ADDITIONAL_PROPERTY": "text"
},
"updated_at": "2025-11-12T16:07:11.115Z"
},
"id": "123e4567-e89b-12d3-a456-426614174000",
"relationships": {
"assets": {
"links": {
"related": "text"
}
},
"organizations": {
"data": [
{
"attributes": {
"name": "text"
},
"id": "text",
"type": "text"
}
]
},
"projects": {
"links": {
"related": "text"
}
}
},
"removed": true,
"type": "repository"
}
],
"jsonapi": {
"version": "text"
},
"links": {
"first": "https://example.com/api/resource",
"last": "https://example.com/api/resource",
"next": "https://example.com/api/resource",
"prev": "https://example.com/api/resource",
"related": "https://example.com/api/resource",
"self": "https://example.com/api/resource"
}
}List Assets with filters
Required permissions
View Groups (group.read)
API key value must be prefixed with "Token ".
Group ID
Requested API version
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))?))$Empty body
Assets found
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/groups/{group_id}/assets/search?version=text HTTP/1.1
Host: api.snyk.io
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 88
{
"query": {
"attributes": {
"attribute": "type",
"operator": "equal",
"values": [
"repository"
]
}
}
}{
"data": [
{
"attributes": {
"app_context": {},
"archived": true,
"base_image": "text",
"browse_url": "https://example.com",
"class": {
"display_name": "A",
"locked": true,
"rank": 1
},
"coverage_controls": [
{
"category": "security",
"gap": true,
"issues_count": {
"critical": 1,
"high": 2,
"low": 0,
"medium": 0
},
"last_scan": "2023-10-10T08:00:00Z",
"name": "control1"
}
],
"created_at": "2025-11-12T16:07:11.115Z",
"default_branch_name": "main",
"developers": [
{
"discovered_by": "github",
"email": "[email protected]",
"url": "https://github.com/johndoe",
"username": "johndoe"
}
],
"file_path": "text",
"image_digests": [
"text"
],
"image_id": "text",
"image_registries": [
"text"
],
"image_repositories": [
"text"
],
"image_tags": [
"text"
],
"labels": [
"text"
],
"languages": {
"ANY_ADDITIONAL_PROPERTY": 1
},
"name": "text",
"removed_reasons": [
{
"reason": "deleted-profile",
"removed_at": "2025-11-12T16:07:11.115Z"
}
],
"repository_freshness": "Ynl0ZXM=",
"repository_url": "text",
"risk_factors": [
"text"
],
"sources": [
"text"
],
"tags": {
"ANY_ADDITIONAL_PROPERTY": "text"
},
"updated_at": "2025-11-12T16:07:11.115Z"
},
"id": "123e4567-e89b-12d3-a456-426614174000",
"relationships": {
"assets": {
"links": {
"related": "text"
}
},
"organizations": {
"data": [
{
"attributes": {
"name": "text"
},
"id": "text",
"type": "text"
}
]
},
"projects": {
"links": {
"related": "text"
}
}
},
"removed": true,
"type": "repository"
}
],
"jsonapi": {
"version": "text"
},
"links": {
"first": "https://example.com/api/resource",
"last": "https://example.com/api/resource",
"next": "https://example.com/api/resource",
"prev": "https://example.com/api/resource",
"related": "https://example.com/api/resource",
"self": "https://example.com/api/resource"
}
}Last updated
Was this helpful?

