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

patch

Update the Infrastructure as Code Settings for an org.

Authorizations
Path parameters
org_idstring · uuidrequired

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

Query parameters
versionstringrequired

Requested API version

Example: 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
dataobjectoptional

The Infrastructure as Code settings for an org.

Responses
curl -L \
  --request PATCH \
  --url 'https://api.snyk.io/rest/orgs/{org_id}/settings/iac?version=text' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --header 'Content-Type: application/vnd.api+json' \
  --data '{
    "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.

get

Get the Infrastructure as Code Settings for an org.

Authorizations
Path parameters
org_idstring · uuidrequired

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

Query parameters
versionstringrequired

Requested API version

Example: 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
curl -L \
  --url 'https://api.snyk.io/rest/orgs/{org_id}/settings/iac?version=text' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "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

patch

Update the Infrastructure as Code Settings for a group.

Authorizations
Path parameters
group_idstring · uuidrequired

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

Query parameters
versionstringrequired

Requested API version

Example: 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
dataobjectoptional

The Infrastructure as Code settings for a group.

Responses
curl -L \
  --request PATCH \
  --url 'https://api.snyk.io/rest/groups/{group_id}/settings/iac?version=text' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --header 'Content-Type: application/vnd.api+json' \
  --data '{
    "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

get

Get the Infrastructure as Code Settings for a group.

Authorizations
Path parameters
group_idstring · uuidrequired

The id of the group whose Infrastructure as Code settings are requested

Query parameters
versionstringrequired

Requested API version

Example: 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
curl -L \
  --url 'https://api.snyk.io/rest/groups/{group_id}/settings/iac?version=text' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "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?