Reporting API (v1)

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

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

string · enumOptionalPossible values:
and
anyOptional

The key to sort results by

Example: issueTitle
orderstringOptional

The direction to sort results.

Example: asc
groupByall ofOptional

Set to issue to group the same issue in multiple projects

string · enumOptionalPossible values:
and
anyOptional

Set to issue to group the same issue in multiple projects

Example: issue
Body
all ofOptional
and
anyOptionalExample: {"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}}}
Responses
200Success
application/json; charset=utf-8
post
POST /v1/reporting/issues HTTP/1.1
Host: api.snyk.io
Content-Type: application/json
Accept: */*
Content-Length: 540

{
  "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

string · enumOptionalPossible values:
and
anyOptional

The key to sort results by

Example: issueTitle
orderstringOptional

The direction to sort results.

Example: asc
groupByall ofOptional

Set to issue to group the same issue in multiple projects

string · enumOptionalPossible values:
and
anyOptional

Set to issue to group the same issue in multiple projects

Example: issue
Body
all ofOptional
and
anyOptionalExample: {"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}}}
Responses
200Success
application/json; charset=utf-8
post
POST /v1/reporting/issues/latest HTTP/1.1
Host: api.snyk.io
Content-Type: application/json
Accept: */*
Content-Length: 540

{
  "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

string · enumOptionalPossible values:
and
anyOptional

The field to group results by

Example: isPrivate
Body
all ofOptional
and
anyOptionalExample: {"filters":{"orgs":[],"isPrivate":false,"issuesPrevented":false,"projects":[]}}
Responses
200Success
application/json; charset=utf-8
Responseall of
and
anyOptionalExample: {"results":[{"count":0,"isPrivate":{"true":0,"false":0}}]}
post
POST /v1/reporting/counts/tests HTTP/1.1
Host: api.snyk.io
Content-Type: application/json
Accept: */*
Content-Length: 79

{
  "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
and
anyOptionalExample: {"filters":{"orgs":[],"languages":["node","javascript","ruby","java","scala","python","golang","php","dotnet","swift-objective-c","elixir","docker","linux","dockerfile"],"projects":[]}}
Responses
200Success
application/json; charset=utf-8
Responseall of
and
anyOptionalExample: {"results":[{"day":"2017-07-01","count":0},{"day":"2017-07-02","count":0},{"day":"2017-07-03","count":0}]}
post
POST /v1/reporting/counts/projects HTTP/1.1
Host: api.snyk.io
Content-Type: application/json
Accept: */*
Content-Length: 185

{
  "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
and
anyOptionalExample: {"filters":{"orgs":[],"languages":["node","javascript","ruby","java","scala","python","golang","php","dotnet","swift-objective-c","elixir","docker","linux","dockerfile"],"projects":[]}}
Responses
200Success
application/json; charset=utf-8
Responseall of
and
anyOptionalExample: {"results":[{"day":"2017-07-01","count":0}]}
post
POST /v1/reporting/counts/projects/latest HTTP/1.1
Host: api.snyk.io
Content-Type: application/json
Accept: */*
Content-Length: 185

{
  "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

string · enumOptionalPossible values:
and
anyOptional

The field to group results by

Example: severity
Body
all ofOptional
and
anyOptionalExample: {"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}}}
Responses
200Success
application/json; charset=utf-8
Responseall of
and
anyOptionalExample: {"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}}]}
post
POST /v1/reporting/counts/issues HTTP/1.1
Host: api.snyk.io
Content-Type: application/json
Accept: */*
Content-Length: 419

{
  "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

string · enumOptionalPossible values:
and
anyOptional

The field to group results by

Example: severity
Body
all ofOptional
and
anyOptionalExample: {"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}}}
Responses
200Success
application/json; charset=utf-8
Responseall of
and
anyOptionalExample: {"results":[{"day":"2017-07-01","count":0,"severity":{"critical":0,"high":0,"medium":0,"low":0}}]}
post
POST /v1/reporting/counts/issues/latest HTTP/1.1
Host: api.snyk.io
Content-Type: application/json
Accept: */*
Content-Length: 419

{
  "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?

Revision created

Add comment to emphasize required filters hidden in GitBook collapsed field