Users (v1)

This document uses the v1 API, which will eventually be deprecated, as further Snyk developments are now focused on the REST API. For more details, see the v1 API.

Get User Details

get

Retrieves information about a user.

Path parameters
userIdstringRequired

The users ID. The API_KEY must have admin access to at least one group or organization where the requested user is a member and must have the api entitlement on their preferred organization.

Example: 4a18d42f-0706-4ad0-b127-24078731fbed
Responses
Responseall of
and
anyOptionalExample: {"id":"","name":"","username":"","email":""}
get
GET /v1/user/{userId} HTTP/1.1
Host: api.snyk.io
Accept: */*
{
  "id": "",
  "name": "",
  "username": "",
  "email": ""
}

Get My Details

get

Retrieves information about the the user making the request.

Responses
Responseall of
and
anyOptionalExample: {"id":"","username":"","email":"","orgs":[]}
get
GET /v1/user/me HTTP/1.1
Host: api.snyk.io
Accept: */*
{
  "id": "",
  "username": "",
  "email": "",
  "orgs": []
}

Modify organization notification settings

put

The organization notification settings for the user that will determine which emails are sent.

Path parameters
orgIdstringRequired

The organization ID. The API_KEY must have access to this organization.

Example: 4a18d42f-0706-4ad0-b127-24078731fbed
Body
all ofOptional
and
anyOptionalExample: {"new-issues-remediations":{"enabled":true,"issueSeverity":"high","issueType":"vuln"},"project-imported":{"enabled":true},"test-limit":{"enabled":true},"weekly-report":{"enabled":true}}
Responses
Responseall of
and
anyOptionalExample: {"new-issues-remediations":{"enabled":true,"issueSeverity":"high","issueType":"vuln","inherited":false},"project-imported":{"enabled":true,"inherited":false},"test-limit":{"enabled":true,"inherited":false},"weekly-report":{"enabled":true,"inherited":false}}
put
PUT /v1/user/me/notification-settings/org/{orgId} HTTP/1.1
Host: api.snyk.io
Content-Type: application/json
Accept: */*
Content-Length: 185

{
  "new-issues-remediations": {
    "enabled": true,
    "issueSeverity": "high",
    "issueType": "vuln"
  },
  "project-imported": {
    "enabled": true
  },
  "test-limit": {
    "enabled": true
  },
  "weekly-report": {
    "enabled": true
  }
}
200Success
{
  "new-issues-remediations": {
    "enabled": true,
    "issueSeverity": "high",
    "issueType": "vuln",
    "inherited": false
  },
  "project-imported": {
    "enabled": true,
    "inherited": false
  },
  "test-limit": {
    "enabled": true,
    "inherited": false
  },
  "weekly-report": {
    "enabled": true,
    "inherited": false
  }
}

Get organization notification settings

get

The organization notification settings for the user that will determine which emails are sent.

Path parameters
orgIdstringRequired

The organization ID. The API_KEY must have access to this organization.

Example: 4a18d42f-0706-4ad0-b127-24078731fbed
Responses
Responseall of
and
anyOptionalExample: {"new-issues-remediations":{"enabled":true,"issueSeverity":"high","issueType":"vuln","inherited":false},"project-imported":{"enabled":true,"inherited":false},"test-limit":{"enabled":true,"inherited":false},"weekly-report":{"enabled":true,"inherited":false}}
get
GET /v1/user/me/notification-settings/org/{orgId} HTTP/1.1
Host: api.snyk.io
Accept: */*
200Success
{
  "new-issues-remediations": {
    "enabled": true,
    "issueSeverity": "high",
    "issueType": "vuln",
    "inherited": false
  },
  "project-imported": {
    "enabled": true,
    "inherited": false
  },
  "test-limit": {
    "enabled": true,
    "inherited": false
  },
  "weekly-report": {
    "enabled": true,
    "inherited": false
  }
}

Modify project notification settings

put

The project notification settings for the user that will determine which emails are sent.

Path parameters
orgIdstringRequired

The organization ID. The API_KEY must have access to this organization.

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

The project ID to return notification settings for.

Example: 6d5813be-7e6d-4ab8-80c2-1e3e2a454545
Body
all ofOptional
and
anyOptionalExample: {"new-issues-remediations":{"enabled":true,"issueSeverity":"high","issueType":"vuln"}}
Responses
put
PUT /v1/user/me/notification-settings/org/{orgId}/project/{projectId} HTTP/1.1
Host: api.snyk.io
Content-Type: application/json
Accept: */*
Content-Length: 86

{
  "new-issues-remediations": {
    "enabled": true,
    "issueSeverity": "high",
    "issueType": "vuln"
  }
}
200Success

No content

Get project notification settings

get

The project notification settings for the user that will determine which emails are sent.

Path parameters
orgIdstringRequired

The organization ID. The API_KEY must have access to this organization.

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

The project ID to return notification settings for.

Example: 6d5813be-7e6d-4ab8-80c2-1e3e2a454545
Responses
Responseall of
and
anyOptionalExample: {"new-issues-remediations":{"enabled":true,"issueSeverity":"high","issueType":"vuln","inherited":false},"project-imported":{"enabled":true,"inherited":false},"test-limit":{"enabled":true,"inherited":false},"weekly-report":{"enabled":true,"inherited":false}}
get
GET /v1/user/me/notification-settings/org/{orgId}/project/{projectId} HTTP/1.1
Host: api.snyk.io
Accept: */*
200Success
{
  "new-issues-remediations": {
    "enabled": true,
    "issueSeverity": "high",
    "issueType": "vuln",
    "inherited": false
  },
  "project-imported": {
    "enabled": true,
    "inherited": false
  },
  "test-limit": {
    "enabled": true,
    "inherited": false
  },
  "weekly-report": {
    "enabled": true,
    "inherited": false
  }
}

Last updated

Was this helpful?