IacSettings

This document uses the REST API. For more details, see the Authentication for API page.

Update the Infrastructure as Code Settings for an org

Update the Infrastructure as Code Settings for an org.

PATCHhttps://api.snyk.io/rest/orgs/{org_id}/settings/iac
Path parameters
org_id*string (uuid)

The id of the org whose Infrastructure as Code settings are getting updated

Query parameters
Body
dataOrgIacSettingsRequest (object)

The Infrastructure as Code settings for an org.

Response

The Infrastructure as Code Settings of the org were updated.

Headers
Body
data*OrgIacSettingsResponse (object)

The Infrastructure as Code settings for an org.

jsonapi*JsonApi (object)
links*Links (object)
Request
const response = await fetch('https://api.snyk.io/rest/orgs/{org_id}/settings/iac?version=text', {
    method: 'PATCH',
    headers: {
      "Content-Type": "application/vnd.api+json"
    },
    body: JSON.stringify({}),
});
const data = await response.json();
Response
{
  "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.

Get the Infrastructure as Code Settings for an org.

GEThttps://api.snyk.io/rest/orgs/{org_id}/settings/iac
Path parameters
org_id*string (uuid)

The id of the org whose Infrastructure as Code settings are requested.

Query parameters
Response

The Infrastructure as Code Settings of the org.

Headers
Body
data*OrgIacSettingsResponse (object)

The Infrastructure as Code settings for an org.

jsonapi*JsonApi (object)
links*Links (object)
Request
const response = await fetch('https://api.snyk.io/rest/orgs/{org_id}/settings/iac?version=text', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
{
  "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

Update the Infrastructure as Code Settings for a group.

PATCHhttps://api.snyk.io/rest/groups/{group_id}/settings/iac
Path parameters
group_id*string (uuid)

The id of the group whose Infrastructure as Code settings are getting updated

Query parameters
Body
dataGroupIacSettingsRequest (object)

The Infrastructure as Code settings for a group.

Response

The Infrastructure as Code Settings of the group were updated.

Headers
Body
data*GroupIacSettingsResponse (object)

The Infrastructure as Code settings for a group.

jsonapi*JsonApi (object)
links*Links (object)
Request
const response = await fetch('https://api.snyk.io/rest/groups/{group_id}/settings/iac?version=text', {
    method: 'PATCH',
    headers: {