Reporting API (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.

Using the Reporting API, you can find answers to questions like how many issues your Organization has, or how many tests have been conducted in a given time period.

The rate limit is up to 70 requests per minute, per user. All requests above the limit will get a response with the status code 429 - Too many requests until requests stop for the duration of the rate-limiting interval (one minute).

Get list of issues

post

Returns any issues that are present during the specified timeframe. For example, if an issue from 2018 is still considered a vulnerable today, it will show up in all reports from its inception to the current day. This data can take up to 9 hours to refresh.Note: A vulnerability that was introduced and then resolved on the same day will not show up in the response.

Required permissions

  • View Project for every Organization in filters.orgs

  • View Organization Reports for every Organization in filters.orgs

Query parameters
fromstringrequired

The date you wish to fetch results from, in the format YYYY-MM-DD

Example: 2017-07-01
tostringrequired

The date you wish to fetch results until, in the format YYYY-MM-DD

Example: 2017-07-07
pagenumber · doubleoptional

The page of results to request

Example: 1
perPagenumber · doubleoptional

The number of results to return per page (Maximum: 1000)

Example: 100
sortByall ofoptional

The key to sort results by

The key to sort results by

orderstringoptional

The direction to sort results.

Example: asc
groupByall ofoptional

Set to issue to group the same issue in multiple projects

Set to issue to group the same issue in multiple projects

Body
all ofoptional

Responses
curl -L \
  --request POST \
  --url 'https://api.snyk.io/v1/reporting/issues?from=2017-07-01&to=2017-07-07' \
  --header 'Content-Type: application/json' \
  --data '{
    "filters": {
      "orgs": [],
      "severity": [
        "critical",
        "high",
        "medium",
        "low"
      ],
      "exploitMaturity": [
        "mature",
        "proof-of-concept",
        "no-known-exploit",
        "no-data"
      ],
      "types": [
        "vuln",
        "license",
        "configuration"
      ],
      "languages": [
        "node",
        "javascript",
        "ruby",
        "java",
        "scala",
        "python",
        "golang",
        "php",
        "dotnet",
        "swift-objective-c",
        "elixir",
        "docker",
        "linux",
        "dockerfile"
      ],
      "projects": [],
      "issues": [],
      "identifier": "",
      "ignored": false,
      "patched": false,
      "fixable": false,
      "isFixed": false,
      "isUpgradable": false,
      "isPatchable": false,
      "isPinnable": false,
      "priorityScore": {
        "min": 0,
        "max": 1000
      }
    }
  }'
{
  "results": [
    [
      {
        "url": "text",
        "id": "text",
        "name": "text",
        "source": "text",
        "packageManager": "text",
        "targetFile": "text"
      }
    ]
  ],
  "total": 1
}

Get list of latest issues

post

Returns issues currently in existence. This data can take up to 9 hours to refresh

Required permissions

  • View Project for every Organization in filters.orgs

  • View Organization Reports for every Organization in filters.orgs

Query parameters
pagenumber · doubleoptional

The page of results to request

Example: 1
perPagenumber · doubleoptional

The number of results to return per page (Maximum: 1000)

Example: 100
sortByall ofoptional

The key to sort results by

The key to sort results by

orderstringoptional

The direction to sort results.

Example: asc
groupByall ofoptional

Set to issue to group the same issue in multiple projects

Set to issue to group the same issue in multiple projects

Body
all ofoptional

Responses
curl -L \
  --request POST \
  --url 'https://api.snyk.io/v1/reporting/issues/latest' \
  --header 'Content-Type: application/json' \
  --data '{
    "filters": {
      "orgs": [],
      "severity": [
        "critical",
        "high",
        "medium",
        "low"
      ],
      "exploitMaturity": [
        "mature",
        "proof-of-concept",
        "no-known-exploit",
        "no-data"
      ],
      "types": [
        "vuln",
        "license",
        "configuration"
      ],
      "languages": [
        "node",
        "javascript",
        "ruby",
        "java",
        "scala",
        "python",
        "golang",
        "php",
        "dotnet",
        "swift-objective-c",
        "elixir",
        "docker",
        "linux",
        "dockerfile"
      ],
      "projects": [],
      "issues": [],
      "identifier": "",
      "ignored": false,
      "patched": false,
      "fixable": false,
      "isFixed": false,
      "isUpgradable": false,
      "isPatchable": false,
      "isPinnable": false,
      "priorityScore": {
        "min": 0,
        "max": 1000
      }
    }
  }'
{
  "results": [
    [
      {
        "url": "text",
        "id": "text",
        "name": "text",
        "source": "text",
        "packageManager": "text",
        "targetFile": "text"
      }
    ]
  ],
  "total": 1
}

Get test counts

post

Returns the number of tests conducted within a time frame. This data is updated in real time

Required permissions

  • View Project for every Organization in filters.orgs

  • View Organization Reports for every Organization in filters.orgs

Query parameters
fromstringrequired

The date you wish to count tests from, in the format YYYY-MM-DD

Example: 2017-07-01
tostringrequired

The date you wish to count tests until, in the format YYYY-MM-DD

Example: 2017-07-03
groupByall ofoptional

The field to group results by

The field to group results by

Body
all ofoptional

Responses
curl -L \
  --request POST \
  --url 'https://api.snyk.io/v1/reporting/counts/tests?from=2017-07-01&to=2017-07-03' \
  --header 'Content-Type: application/json' \
  --data '{
    "filters": {
      "orgs": [],
      "isPrivate": false,
      "issuesPrevented": false,
      "projects": []
    }
  }'
{
  "results": [
    {
      "count": 0,
      "isPrivate": {
        "true": 0,
        "false": 0
      }
    }
  ]
}

Get project counts

post

Returns project counts within a time frame. This data can take up to 9 hours to refresh

Required permissions

  • View Project for every Organization in filters.orgs

  • View Organization Reports for every Organization in filters.orgs

Query parameters
fromstringrequired

The date you wish to fetch results from, in the format YYYY-MM-DD

Example: 2017-07-01
tostringrequired

The date you wish to fetch results until, in the format YYYY-MM-DD

Example: 2017-07-03
Body
all ofoptional

Responses
curl -L \
  --request POST \
  --url 'https://api.snyk.io/v1/reporting/counts/projects?from=2017-07-01&to=2017-07-03' \
  --header 'Content-Type: application/json' \
  --data '{
    "filters": {
      "orgs": [],
      "languages": [
        "node",
        "javascript",
        "ruby",
        "java",
        "scala",
        "python",
        "golang",
        "php",
        "dotnet",
        "swift-objective-c",
        "elixir",
        "docker",
        "linux",
        "dockerfile"
      ],
      "projects": []
    }
  }'
{
  "results": [
    {
      "day": "2017-07-01",
      "count": 0
    },
    {
      "day": "2017-07-02",
      "count": 0
    },
    {
      "day": "2017-07-03",
      "count": 0
    }
  ]
}

Get latest project counts

post

Returns the number of projects currently in existence. This data can take up to 9 hours to refresh.

  • Params#### Required permissions
  • View Project for every Organization in filters.orgs

  • View Organization Reports for every Organization in filters.orgs

Body
all ofoptional

Responses
curl -L \
  --request POST \
  --url 'https://api.snyk.io/v1/reporting/counts/projects/latest' \
  --header 'Content-Type: application/json' \
  --data '{
    "filters": {
      "orgs": [],
      "languages": [
        "node",
        "javascript",
        "ruby",
        "java",
        "scala",
        "python",
        "golang",
        "php",
        "dotnet",
        "swift-objective-c",
        "elixir",
        "docker",
        "linux",
        "dockerfile"
      ],
      "projects": []
    }
  }'
{
  "results": [
    {
      "day": "2017-07-01",
      "count": 0
    }
  ]
}

Get issue counts

post

Returns issue counts within a time frame. This data can take up to 9 hours to refresh

Required permissions

  • View Project for every Organization in filters.orgs

  • View Organization Reports for every Organization in filters.orgs

Query parameters
fromstringrequired

The date you wish to fetch results from, in the format YYYY-MM-DD

Example: 2017-07-01
tostringrequired

The date you wish to fetch results until, in the format YYYY-MM-DD

Example: 2017-07-03
groupByall ofoptional

The field to group results by

The field to group results by

Body
all ofoptional

Responses
curl -L \
  --request POST \
  --url 'https://api.snyk.io/v1/reporting/counts/issues?from=2017-07-01&to=2017-07-03' \
  --header 'Content-Type: application/json' \
  --data '{
    "filters": {
      "orgs": [],
      "severity": [
        "critical",
        "high",
        "medium",
        "low"
      ],
      "types": [
        "vuln",
        "license",
        "configuration"
      ],
      "languages": [
        "node",
        "javascript",
        "ruby",
        "java",
        "scala",
        "python",
        "golang",
        "php",
        "dotnet",
        "swift-objective-c",
        "elixir",
        "docker",
        "linux",
        "dockerfile"
      ],
      "projects": [],
      "ignored": false,
      "patched": false,
      "fixable": false,
      "isUpgradable": false,
      "isPatchable": false,
      "isPinnable": false,
      "priorityScore": {
        "min": 0,
        "max": 1000
      }
    }
  }'
{
  "results": [
    {
      "day": "2017-07-01",
      "count": 0,
      "severity": {
        "critical": 0,
        "high": 0,
        "medium": 0,
        "low": 0
      }
    },
    {
      "day": "2017-07-02",
      "count": 0,
      "severity": {
        "critical": 0,
        "high": 0,
        "medium": 0,
        "low": 0
      }
    },
    {
      "day": "2017-07-03",
      "count": 0,
      "severity": {
        "critical": 0,
        "high": 0,
        "medium": 0,
        "low": 0
      }
    }
  ]
}

Get latest issue counts

post

Returns the number of issues currently in existence. This data can take up to 9 hours to refresh

Required permissions

  • View Project for every Organization in filters.orgs

  • View Organization Reports for every Organization in filters.orgs

Query parameters
groupByall ofoptional

The field to group results by

The field to group results by

Body
all ofoptional

Responses
curl -L \
  --request POST \
  --url 'https://api.snyk.io/v1/reporting/counts/issues/latest' \
  --header 'Content-Type: application/json' \
  --data '{
    "filters": {
      "orgs": [],
      "severity": [
        "critical",
        "high",
        "medium",
        "low"
      ],
      "types": [
        "vuln",
        "license",
        "configuration"
      ],
      "languages": [
        "node",
        "javascript",
        "ruby",
        "java",
        "scala",
        "python",
        "golang",
        "php",
        "dotnet",
        "swift-objective-c",
        "elixir",
        "docker",
        "linux",
        "dockerfile"
      ],
      "projects": [],
      "ignored": false,
      "patched": false,
      "fixable": false,
      "isUpgradable": false,
      "isPatchable": false,
      "isPinnable": false,
      "priorityScore": {
        "min": 0,
        "max": 1000
      }
    }
  }'
{
  "results": [
    {
      "day": "2017-07-01",
      "count": 0,
      "severity": {
        "critical": 0,
        "high": 0,
        "medium": 0,
        "low": 0
      }
    }
  ]
}

Last updated

Was this helpful?