Skip to content

API Overview

The NightVision REST API gives you programmatic access to targets, scans, findings, tags, owner teams and reporting. This section covers the endpoints for organizing applications, working findings and reading reporting data. The full interactive reference for every endpoint is at api.nightviz.ai/api/v1/docs/.

https://api.nightviz.ai/api/v1/

All paths in these pages are relative to this base URL, and every request and response body is JSON.

Create an API token as described in Generate API Tokens, then send it in the Authorization header with the Token prefix:

Terminal window
curl -H "Authorization: Token $NIGHTVISION_TOKEN" \
https://api.nightviz.ai/api/v1/tags/

If you belong to more than one organization, send the X-Active-Organization header with the organization UUID to scope a request to one of them. Without it, list endpoints return results across all of your organizations.

List endpoints are paginated. Use page and page_size to move through results. Responses share one shape:

{
"count": 42,
"next": "https://api.nightviz.ai/api/v1/tags/?page=2",
"previous": null,
"results": []
}

Errors use standard HTTP status codes and a consistent body:

{
"type": "client_error",
"errors": [
{
"code": "does_not_exist",
"detail": "Invalid pk - object does not exist.",
"attr": "tags"
}
]
}

type is client_error or server_error, and attr names the request field at fault when there is one.

Your token acts as you, so it can see and change only what your role allows. Reading targets, scans, findings, tags and reports needs a role with view access to the project involved, and results are limited to the projects you can see. Changing things needs the matching change permission: for example, assigning a finding needs permission to change issues, moving an application or setting its owner needs permission to change targets, and creating a tag needs permission to add tags (the Org Admin and Project Manager roles hold these). Renaming or deleting a tag, and saving the organization SLA policy, need organization-level permissions. A request you are not allowed to make returns 403, and an object you cannot see returns 404.