Groups (v1)

This document uses the v1 API. For more details, see the v1 API.

List all tags in a group

get
Path parameters
groupIdstringrequired

The group ID. The API_KEY must have access admin to this group.

Example: 4a18d42f-0706-4ad0-b127-24078731fbed
Query parameters
perPagenumber · doubleoptional

The number of results to return (the default is 1000).

Example: 10
pagenumber · doubleoptional

The offset from which to start returning results from.

Example: 1
Header parameters
Content-Typestring · enumrequired
Example: application/json
Options: application/json
Responses
curl -L \
  --url 'https://api.snyk.io/v1/group/{groupId}/tags' \
  --header 'Content-Type: application/json'
{
  "tags": [
    {
      "key": "meta",
      "value": "Alfa"
    },
    {
      "key": "meta",
      "value": "Bravo"
    },
    {
      "key": "meta",
      "value": "Charlie"
    },
    {
      "key": "meta",
      "value": "Delta"
    },
    {
      "key": "meta",
      "value": "Echo"
    },
    {
      "key": "meta",
      "value": "Foxtrot"
    },
    {
      "key": "meta",
      "value": "Golf"
    },
    {
      "key": "meta",
      "value": "Hotel"
    },
    {
      "key": "meta",
      "value": "India"
    },
    {
      "key": "meta",
      "value": "Juliet"
    }
  ]
}

Delete tag from group

post
Path parameters
groupIdstringrequired

The group ID. The API_KEY must have access admin to this group.

Example: 4a18d42f-0706-4ad0-b127-24078731fbed
Body
all ofoptional

Responses
curl -L \
  --request POST \
  --url 'https://api.snyk.io/v1/group/{groupId}/tags/delete' \
  --header 'Content-Type: application/json' \
  --data '{
    "key": "",
    "value": "",
    "force": false
  }'
{
  "key": "",
  "value": "",
  "force": false
}

Update group settings

put
Path parameters
groupIdstringrequired

The group ID. The API_KEY must have admin access to this group.

Example: b61bc07c-27c6-42b3-8b04-0f228ed31a67
Body
all ofoptional

Responses
curl -L \
  --request PUT \
  --url 'https://api.snyk.io/v1/group/{groupId}/settings' \
  --header 'Content-Type: application/json' \
  --data '{
    "sessionLength": 50,
    "requestAccess": {
      "enabled": true
    }
  }'
{
  "sessionLength": 50,
  "requestAccess": {
    "enabled": true
  }
}

View group settings

get
Path parameters
groupIdstringrequired

The group ID. The API_KEY must have admin access to this group.

Example: b61bc07c-27c6-42b3-8b04-0f228ed31a67
Header parameters
Content-Typestring · enumrequired
Example: application/json
Options: application/json
Responses
curl -L \
  --url 'https://api.snyk.io/v1/group/{groupId}/settings' \
  --header 'Content-Type: application/json'
{
  "requestAccess": {
    "enabled": true
  },
  "sessionLength": 1
}

List all roles in a group

get
Path parameters
groupIdstringrequired

The group ID. The API_KEY must have READ access to this group.

Example: a060a49f-636e-480f-9e14-38e773b2a97f
Header parameters
Content-Typestring · enumrequired
Example: application/json
Options: application/json
Responses
curl -L \
  --url 'https://api.snyk.io/v1/group/{groupId}/roles' \
  --header 'Content-Type: application/json'
[
  {
    "name": "Org Collaborator",
    "description": "Collaborator",
    "publicId": "6525b356-a400-465f-b2e5-3eee1161e69f",
    "created": "2021-04-22T16:02:53.233Z",
    "modified": "2021-04-22T16:02:53.332Z"
  },
  {
    "name": "Org Admin",
    "description": "Admin",
    "publicId": "af047fef-69f3-4bd9-9760-8957ce0d2ece",
    "created": "2021-04-22T16:02:53.233Z",
    "modified": "2021-04-22T16:02:53.332Z"
  }
]

List all organizations in a group

get
Path parameters
groupIdstringrequired

The group ID. The API_KEY must have READ access to this group and LIST organizations access in this group.

Example: a060a49f-636e-480f-9e14-38e773b2a97f
Query parameters
perPagenumber · doubleoptional

The number of results to return (maximum is 100).

Example: 100
pagenumber · doubleoptional

For pagination - offset (from which to start returning results).

Example: 1
namestringoptional

Only organizations that have a name that starts with this value (case insensitive) will be returned.

Example: my
Header parameters
Content-Typestring · enumrequired
Example: application/json
Options: application/json
Responses
curl -L \
  --url 'https://api.snyk.io/v1/group/{groupId}/orgs' \
  --header 'Content-Type: application/json'
{
  "id": "a060a49f-636e-480f-9e14-38e773b2a97f",
  "name": "ACME Inc.",
  "url": "https://api.snyk.io/v1/group/0dfc509a-e7a9-48ef-9d39-649d6468fc09",
  "created": "2021-06-07T00:00:00.000Z",
  "orgs": [
    {
      "name": "myDefaultOrg",
      "id": "689ce7f9-7943-4a71-b704-2ba575f01089",
      "slug": "my-default-org",
      "url": "https://api.snyk.io/v1/org/default-org",
      "created": "2021-06-07T00:00:00.000Z"
    },
    {
      "name": "My Other Org",
      "id": "a04d9cbd-ae6e-44af-b573-0556b0ad4bd2",
      "slug": "my-other-org",
      "url": "https://api.snyk.io/v1/org/my-other-org",
      "created": "2021-06-07T00:00:00.000Z"
    }
  ]
}

Add a member to an organization within a group

post
Path parameters
groupIdstringrequired

The group ID. The API_KEY must have access admin to this group.

Example: 4a18d42f-0706-4ad0-b127-24078731fbed
orgIdstringrequired

The organization ID we want to add the member to. The API_KEY must have access to this organization.

Example: 4a18d42f-0706-4ad0-b127-24078731fbed
Body
all ofoptional

Responses
curl -L \
  --request POST \
  --url 'https://api.snyk.io/v1/group/{groupId}/org/{orgId}/members' \
  --header 'Content-Type: application/json' \
  --data '{
    "userId": "",
    "role": ""
  }'

No body

List all members in a group

get

Note: Requests to this endpoint are limited to one per minute. Additional requests within this time will receive a 429 Too Many Requests response.

Path parameters
groupIdstringrequired

The group ID. The API_KEY must have access admin to this group.

Example: 4a18d42f-0706-4ad0-b127-24078731fbed
Header parameters
Content-Typestring · enumrequired
Example: application/json
Options: application/json
Responses
curl -L \
  --url 'https://api.snyk.io/v1/group/{groupId}/members' \
  --header 'Content-Type: application/json'
[
  {
    "id": "",
    "name": "",
    "username": "",
    "email": "",
    "orgs": [
      {
        "name": "",
        "role": ""
      }
    ],
    "groupRole": ""
  }
]

Last updated

Was this helpful?

Revision created

Add comment to emphasize required filters hidden in GitBook collapsed field