Assignments
Snyk API reference for the Assignments endpoints, including request parameters and response schemas
Assign published rule extensions with Group or Organization scope.
Required permissions
group.rule_extension.edit
API key value must be prefixed with "Token ".
Unique identifier for group in request path
b667f176-df52-4b0a-9954-117af6b05ab7Requested 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))?))$Assignments for rule extension successfully created.
Bad Request: one or more parameters are invalid. Check the input to match the expected format. See Snyk API
Unauthorized: the request requires an authentication token. See Revoke and regenerate a Snyk API token.
Forbidden: the request requires an authentication token with more or different permissions. Review token permissions and try again. See PAT permissions.
Not Found: The resource you are trying to access could not be found. Review the request and try again.
Conflict: The requested operation conflicts with the current state of the resource in some way.
Internal Server Error: An unexpected error was encountered while attempting to process the request. Try again. If the error still occurs, contact support.
POST /rest/groups/{group_id}/rule_extensions/assignments?version=2021-06-04 HTTP/1.1
Host: api.snyk.io
Authorization: YOUR_API_KEY
Content-Type: application/vnd.api+json
Accept: */*
Content-Length: 651
{
"data": [
{
"relationships": {
"rule_extension": {
"data": {
"id": "a6fd4971-1d47-4684-a45d-7d0a372912e0",
"type": "rule_extension"
}
},
"scope": {
"data": {
"id": "758769f2-5b3a-41eb-b7c2-20bd785be49a",
"type": "group"
}
}
},
"type": "assignments"
},
{
"relationships": {
"rule_extension": {
"data": {
"id": "758769f2-5b3a-41eb-b7c2-20bd785be49a",
"type": "rule_extension"
}
},
"scope": {
"data": {
"id": "de43030e-19a4-4636-9a31-78fcc1d5fe0c",
"type": "org"
}
}
},
"type": "assignments"
},
{
"relationships": {
"rule_extension": {
"data": {
"id": "758769f2-5b3a-41eb-b7c2-20bd785be49a",
"type": "rule_extension"
}
},
"scope": {
"data": {
"id": "7d7d0d14-8b32-4f54-b378-7bd0b1130922",
"type": "org"
}
}
},
"type": "assignments"
}
]
}No content
Returns a paginated list of all rule extension assignments for the requested group.
Pagination: The starting_after and ending_before query parameters are mutually exclusive. Providing both will result in a 400 Bad Request response.
Filtering: The org_id and group_id query parameters are mutually exclusive. Providing both will result in a 400 Bad Request response.
Required permissions
group.rule_extension.read
API key value must be prefixed with "Token ".
Unique identifier for group in request path
b667f176-df52-4b0a-9954-117af6b05ab7Requested 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))?))$Return the page of results immediately after this cursor
v1.eyJpZCI6IjEwMDAifQo=Return the page of results immediately before this cursor
v1.eyJpZCI6IjExMDAifQo=Number of results to return per page
10Example: 10Filter by rule extension IDs
["b667f176-df52-4b0a-9954-117af6b05ab7"]Filter by organization ID
b667f176-df52-4b0a-9954-117af6b05ab7Filter by group ID
b667f176-df52-4b0a-9954-117af6b05ab7Returns a paginated list of assignments for the requested group.
Bad Request: one or more parameters are invalid. Check the input to match the expected format. See Snyk API
Unauthorized: the request requires an authentication token. See Revoke and regenerate a Snyk API token.
Forbidden: the request requires an authentication token with more or different permissions. Review token permissions and try again. See PAT permissions.
Not Found: The resource you are trying to access could not be found. Review the request and try again.
Internal Server Error: An unexpected error was encountered while attempting to process the request. Try again. If the error still occurs, contact support.
GET /rest/groups/{group_id}/rule_extensions/assignments?version=2021-06-04 HTTP/1.1
Host: api.snyk.io
Authorization: YOUR_API_KEY
Accept: */*
{
"data": [
{
"attributes": {
"created_at": "2025-01-15T10:30:00Z",
"created_by": "de43030e-19a4-4636-9a31-78fcc1d5fe0c"
},
"id": "a6fd4971-1d47-4684-a45d-7d0a372912e0",
"relationships": {
"rule_extension": {
"data": {
"id": "758769f2-5b3a-41eb-b7c2-20bd785be49a",
"type": "rule_extension"
}
},
"scope": {
"data": {
"id": "758769f2-5b3a-41eb-b7c2-20bd785be49a",
"type": "group"
}
}
},
"type": "assignments"
},
{
"attributes": {
"created_at": "2025-01-16T14:45:00Z",
"created_by": "de43030e-19a4-4636-9a31-78fcc1d5fe0c"
},
"id": "b7fe5082-2e58-5795-b56e-8e1b483023f1",
"relationships": {
"rule_extension": {
"data": {
"id": "758769f2-5b3a-41eb-b7c2-20bd785be49a",
"type": "rule_extension"
}
},
"scope": {
"data": {
"id": "de43030e-19a4-4636-9a31-78fcc1d5fe0c",
"type": "org"
}
}
},
"type": "assignments"
}
],
"jsonapi": {
"version": "1.0"
},
"links": {
"next": "/groups/758769f2-5b3a-41eb-b7c2-20bd785be49a/rule_extensions/assignments?starting_after=eyJpZCI6IjIifQ==",
"self": "/groups/758769f2-5b3a-41eb-b7c2-20bd785be49a/rule_extensions/assignments"
}
}Delete assignments for rule extensions with Group or Organization scope.
Required permissions
group.rule_extension.edit
API key value must be prefixed with "Token ".
Unique identifier for group in request path
b667f176-df52-4b0a-9954-117af6b05ab7Requested 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 IDs
b667f176-df52-4b0a-9954-117af6b05ab7Filter by rule extension ID
b667f176-df52-4b0a-9954-117af6b05ab7Assignments successfully deleted.
Bad Request: one or more parameters are invalid. Check the input to match the expected format. See Snyk API
Unauthorized: the request requires an authentication token. See Revoke and regenerate a Snyk API token.
Forbidden: the request requires an authentication token with more or different permissions. Review token permissions and try again. See PAT permissions.
Internal Server Error: An unexpected error was encountered while attempting to process the request. Try again. If the error still occurs, contact support.
DELETE /rest/groups/{group_id}/rule_extensions/assignments?version=2021-06-04 HTTP/1.1
Host: api.snyk.io
Authorization: YOUR_API_KEY
Accept: */*
No content
Last updated
Was this helpful?

