SastSettings
Enable/Disable the Snyk Code settings for an org
Required permissions
-
View Organization (org.read) -
Edit Organization (org.edit)
API key value must be prefixed with "Token ".
The id of the org for which we want to update the Snyk Code setting
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))?))$The SAST settings for the org are being updated
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.
PATCH /rest/orgs/{org_id}/settings/sast?version=text HTTP/1.1
Host: api.snyk.io
Authorization: YOUR_API_KEY
Content-Type: application/vnd.api+json
Accept: */*
Content-Length: 103
{
"data": {
"attributes": {
"sast_enabled": true
},
"id": "123e4567-e89b-12d3-a456-426614174000",
"type": "text"
}
}{
"data": {
"attributes": {
"autofix_enabled": true,
"sast_enabled": true
},
"id": "123e4567-e89b-12d3-a456-426614174000",
"type": "text"
},
"jsonapi": {
"version": "1.0"
},
"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"
}
}Retrieves the SAST settings for an org
Required permissions
View Organization (org.read)
API key value must be prefixed with "Token ".
The id of the org for which we want to retrieve the SAST settings
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))?))$The SAST settings for the org are being retrieved
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}/settings/sast?version=text HTTP/1.1
Host: api.snyk.io
Authorization: YOUR_API_KEY
Accept: */*
{
"data": {
"attributes": {
"autofix_enabled": true,
"sast_enabled": true
},
"id": "123e4567-e89b-12d3-a456-426614174000",
"type": "text"
},
"jsonapi": {
"version": "1.0"
},
"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?

