SastSettings
Enable/Disable the Snyk Code settings for an org
Authorizations
Path parameters
org_idstring · uuidRequired
The id of the org for which we want to update the Snyk Code setting
Query parameters
versionstringRequiredExample:
Requested API version
2021-06-04
Pattern: ^(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
201
The SAST settings for the org are being updated
application/vnd.api+json
400
Bad Request: A parameter provided as a part of the request was invalid.
application/vnd.api+json
401
Unauthorized: the request requires an authentication token.
application/vnd.api+json
403
Forbidden: the request requires an authentication token with more or different permissions.
application/vnd.api+json
404
Not Found: The resource being operated on could not be found.
application/vnd.api+json
500
Internal Server Error: An error was encountered while attempting to process the request.
application/vnd.api+json
patch
PATCH /rest/orgs/{org_id}/settings/sast HTTP/1.1
Host: api.snyk.io
Authorization: Bearer YOUR_SECRET_TOKEN
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
Authorizations
Path parameters
org_idstring · uuidRequired
The id of the org for which we want to retrieve the SAST settings
Query parameters
versionstringRequiredExample:
Requested API version
2021-06-04
Pattern: ^(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
The SAST settings for the org are being retrieved
application/vnd.api+json
400
Bad Request: A parameter provided as a part of the request was invalid.
application/vnd.api+json
401
Unauthorized: the request requires an authentication token.
application/vnd.api+json
403
Forbidden: the request requires an authentication token with more or different permissions.
application/vnd.api+json
404
Not Found: The resource being operated on could not be found.
application/vnd.api+json
500
Internal Server Error: An error was encountered while attempting to process the request.
application/vnd.api+json
get
GET /rest/orgs/{org_id}/settings/sast HTTP/1.1
Host: api.snyk.io
Authorization: Bearer YOUR_SECRET_TOKEN
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?