IacSettings
Update the Infrastructure as Code Settings for an org.
Required permissions
Edit Organization (org.edit)
The id of the org whose Infrastructure as Code settings are getting updated
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))?))$
The Infrastructure as Code Settings of the org were 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/iac HTTP/1.1
Host: api.snyk.io
Authorization: YOUR_API_KEY
Content-Type: application/vnd.api+json
Accept: */*
Content-Length: 205
{
"data": {
"attributes": {
"custom_rules": {
"inherit_from_parent": "group",
"is_enabled": true,
"oci_registry_tag": "latest",
"oci_registry_url": "https://registry-1.docker.io/account/bundle"
}
},
"type": "iac_settings"
}
}
{
"data": {
"attributes": {
"custom_rules": {
"inherit_from_parent": "group",
"is_enabled": true,
"oci_registry_tag": "latest",
"oci_registry_url": "https://registry-1.docker.io/account/bundle",
"parents": {
"group": {
"custom_rules": {
"is_enabled": true,
"oci_registry_tag": "latest",
"oci_registry_url": "https://registry-1.docker.io/account/bundle"
},
"updated": "2021-11-12T10:31:06.026Z"
}
},
"updated": "2021-11-12T10:31:06.026Z"
}
},
"id": "ea536a06-0566-40ca-b96b-155568aa2027",
"type": "iac_settings"
},
"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"
}
}
Get the Infrastructure as Code Settings for an org.
Required permissions
View Organization (org.read)
The id of the org whose Infrastructure as Code settings are requested.
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))?))$
The Infrastructure as Code Settings of the org.
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/iac HTTP/1.1
Host: api.snyk.io
Authorization: YOUR_API_KEY
Accept: */*
{
"data": {
"attributes": {
"custom_rules": {
"inherit_from_parent": "group",
"is_enabled": true,
"oci_registry_tag": "latest",
"oci_registry_url": "https://registry-1.docker.io/account/bundle",
"parents": {
"group": {
"custom_rules": {
"is_enabled": true,
"oci_registry_tag": "latest",
"oci_registry_url": "https://registry-1.docker.io/account/bundle"
},
"updated": "2021-11-12T10:31:06.026Z"
}
},
"updated": "2021-11-12T10:31:06.026Z"
}
},
"id": "ea536a06-0566-40ca-b96b-155568aa2027",
"type": "iac_settings"
},
"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"
}
}
Update the Infrastructure as Code Settings for a group.
Required permissions
Edit IaC settings (group.iac.settings.edit)
The id of the group whose Infrastructure as Code settings are getting updated
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))?))$
The Infrastructure as Code Settings of the group were 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/groups/{group_id}/settings/iac HTTP/1.1
Host: api.snyk.io
Authorization: YOUR_API_KEY
Content-Type: application/vnd.api+json
Accept: */*
Content-Length: 175
{
"data": {
"attributes": {
"custom_rules": {
"is_enabled": true,
"oci_registry_tag": "latest",
"oci_registry_url": "https://registry-1.docker.io/account/bundle"
}
},
"type": "iac_settings"
}
}
{
"data": {
"attributes": {
"custom_rules": {
"is_enabled": true,
"oci_registry_tag": "latest",
"oci_registry_url": "https://registry-1.docker.io/account/bundle"
},
"updated": "2021-11-12T10:31:06.026Z"
},
"id": "ea536a06-0566-40ca-b96b-155568aa2027",
"type": "iac_settings"
},
"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"
}
}
Get the Infrastructure as Code Settings for a group.
Required permissions
View IaC settings (group.iac.settings.read)
The id of the group whose Infrastructure as Code settings are requested
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))?))$
The Infrastructure as Code Settings of the group.
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/groups/{group_id}/settings/iac HTTP/1.1
Host: api.snyk.io
Authorization: YOUR_API_KEY
Accept: */*
{
"data": {
"attributes": {
"custom_rules": {
"is_enabled": true,
"oci_registry_tag": "latest",
"oci_registry_url": "https://registry-1.docker.io/account/bundle"
},
"updated": "2021-11-12T10:31:06.026Z"
},
"id": "ea536a06-0566-40ca-b96b-155568aa2027",
"type": "iac_settings"
},
"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?