For the complete documentation index, see llms.txt. This page is also available as Markdown.

Assignments

Snyk API reference for the Assignments endpoints, including request parameters and response schemas

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

Create bulk assignments for rule extensions

post

Assign published rule extensions with Group or Organization scope.

Required permissions

  • group.rule_extension.edit
Authorizations
AuthorizationstringRequired

API key value must be prefixed with "Token ".

Path parameters
group_idstring · uuidRequired

Unique identifier for group in request path

Example: b667f176-df52-4b0a-9954-117af6b05ab7
Query parameters
versionstringRequired

Requested API version

Example: 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))?))$
Body
Responses
204

Assignments for rule extension successfully created.

post/groups/{group_id}/rule_extensions/assignments
POST /rest/groups/{group_id}/rule_extensions/assignments?version=2021-06-04 HTTP/1.1
Host: api.snyk.io
Authorization: YOUR_API_KEY
Content-Type: application/vnd.api+json
Accept: */*
Content-Length: 651

{
  "data": [
    {
      "relationships": {
        "rule_extension": {
          "data": {
            "id": "a6fd4971-1d47-4684-a45d-7d0a372912e0",
            "type": "rule_extension"
          }
        },
        "scope": {
          "data": {
            "id": "758769f2-5b3a-41eb-b7c2-20bd785be49a",
            "type": "group"
          }
        }
      },
      "type": "assignments"
    },
    {
      "relationships": {
        "rule_extension": {
          "data": {
            "id": "758769f2-5b3a-41eb-b7c2-20bd785be49a",
            "type": "rule_extension"
          }
        },
        "scope": {
          "data": {
            "id": "de43030e-19a4-4636-9a31-78fcc1d5fe0c",
            "type": "org"
          }
        }
      },
      "type": "assignments"
    },
    {
      "relationships": {
        "rule_extension": {
          "data": {
            "id": "758769f2-5b3a-41eb-b7c2-20bd785be49a",
            "type": "rule_extension"
          }
        },
        "scope": {
          "data": {
            "id": "7d7d0d14-8b32-4f54-b378-7bd0b1130922",
            "type": "org"
          }
        }
      },
      "type": "assignments"
    }
  ]
}

No content

List all assignments for a group

get

Returns a paginated list of all rule extension assignments for the requested group.

Pagination: The starting_after and ending_before query parameters are mutually exclusive. Providing both will result in a 400 Bad Request response.

Filtering: The org_id and group_id query parameters are mutually exclusive. Providing both will result in a 400 Bad Request response.

Required permissions

  • group.rule_extension.read
Authorizations
AuthorizationstringRequired

API key value must be prefixed with "Token ".

Path parameters
group_idstring · uuidRequired

Unique identifier for group in request path

Example: b667f176-df52-4b0a-9954-117af6b05ab7
Query parameters
versionstringRequired

Requested API version

Example: 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))?))$
starting_afterstringOptional

Return the page of results immediately after this cursor

Example: v1.eyJpZCI6IjEwMDAifQo=
ending_beforestringOptional

Return the page of results immediately before this cursor

Example: v1.eyJpZCI6IjExMDAifQo=
limitinteger · int32 · min: 1 · max: 100Optional

Number of results to return per page

Default: 10Example: 10
rule_extension_idstring · uuid[] · max: 100Optional

Filter by rule extension IDs

Example: ["b667f176-df52-4b0a-9954-117af6b05ab7"]
org_idstring · uuidOptional

Filter by organization ID

Example: b667f176-df52-4b0a-9954-117af6b05ab7
group_idstring · uuidOptional

Filter by group ID

Example: b667f176-df52-4b0a-9954-117af6b05ab7
Responses
200

Returns a paginated list of assignments for the requested group.

application/vnd.api+json
get/groups/{group_id}/rule_extensions/assignments
GET /rest/groups/{group_id}/rule_extensions/assignments?version=2021-06-04 HTTP/1.1
Host: api.snyk.io
Authorization: YOUR_API_KEY
Accept: */*
{
  "data": [
    {
      "attributes": {
        "created_at": "2025-01-15T10:30:00Z",
        "created_by": "de43030e-19a4-4636-9a31-78fcc1d5fe0c"
      },
      "id": "a6fd4971-1d47-4684-a45d-7d0a372912e0",
      "relationships": {
        "rule_extension": {
          "data": {
            "id": "758769f2-5b3a-41eb-b7c2-20bd785be49a",
            "type": "rule_extension"
          }
        },
        "scope": {
          "data": {
            "id": "758769f2-5b3a-41eb-b7c2-20bd785be49a",
            "type": "group"
          }
        }
      },
      "type": "assignments"
    },
    {
      "attributes": {
        "created_at": "2025-01-16T14:45:00Z",
        "created_by": "de43030e-19a4-4636-9a31-78fcc1d5fe0c"
      },
      "id": "b7fe5082-2e58-5795-b56e-8e1b483023f1",
      "relationships": {
        "rule_extension": {
          "data": {
            "id": "758769f2-5b3a-41eb-b7c2-20bd785be49a",
            "type": "rule_extension"
          }
        },
        "scope": {
          "data": {
            "id": "de43030e-19a4-4636-9a31-78fcc1d5fe0c",
            "type": "org"
          }
        }
      },
      "type": "assignments"
    }
  ],
  "jsonapi": {
    "version": "1.0"
  },
  "links": {
    "next": "/groups/758769f2-5b3a-41eb-b7c2-20bd785be49a/rule_extensions/assignments?starting_after=eyJpZCI6IjIifQ==",
    "self": "/groups/758769f2-5b3a-41eb-b7c2-20bd785be49a/rule_extensions/assignments"
  }
}

Delete assignments for rule extensions

delete

Delete assignments for rule extensions with Group or Organization scope.

Required permissions

  • group.rule_extension.edit
Authorizations
AuthorizationstringRequired

API key value must be prefixed with "Token ".

Path parameters
group_idstring · uuidRequired

Unique identifier for group in request path

Example: b667f176-df52-4b0a-9954-117af6b05ab7
Query parameters
versionstringRequired

Requested API version

Example: 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))?))$
idstring · uuid[] · min: 1 · max: 100Optional

Filter by IDs

Example: b667f176-df52-4b0a-9954-117af6b05ab7
rule_extension_idstring · uuidOptional

Filter by rule extension ID

Example: b667f176-df52-4b0a-9954-117af6b05ab7
Responses
204

Assignments successfully deleted.

delete/groups/{group_id}/rule_extensions/assignments
DELETE /rest/groups/{group_id}/rule_extensions/assignments?version=2021-06-04 HTTP/1.1
Host: api.snyk.io
Authorization: YOUR_API_KEY
Accept: */*

No content

Last updated

Was this helpful?