CentralCSP
APIWebsites

List websites

Lists the websites you can access in this workspace, each with its tags and the reports it used this period. Owners and workspace admins see every website. Other members see only the websites they were granted access to, directly or through a group.

Filter with q, status and tagIds, and order with sort (creation order by default). Keep the same sort while paging. Sorted by usage, only the first 1000 matching websites are listed.

Requires membership of the workspace.

GET
/v1/workspaces/{workspaceId}/websites

Authorization

headerAuthorizationBearer <JWT>

An OpenID Connect access token from signing in to CentralCSP, acting as the signed-in user.

Path Parameters

workspaceId*string

The workspace's id.

Query Parameters

cursor?string

The nextCursor of the previous page. Omit it to start from the beginning. A cursor encodes a position and is not meant to be built by hand.

limit*|

How many items to return, from 1 to 200.

Range1 <= value <= 200
Default50
q?string

Match part of the name or URL.

Lengthlength <= 255
status?string

Only websites whose endpoint is accepting reports (active) or turned off (disabled).

Value in"active""disabled"
tagIds?string

Comma-separated tag ids. A website matches if it carries any of them.

Lengthlength <= 2048
sort?string

Order by name, creation date, reports used this period, or status (active first in ascending order). Without it, websites come in creation order.

Value in"name""createdAt""usage""status"
order?string

Direction of sort. Defaults to asc.

Value in"asc""desc"

Response Body

A page of websites.

application/json
  1. response
data*array<>

The websites on this page.

pagination*

Where this page sits in the full result set.

Example Request
curl -X GET 'https://api.centralcsp.com/v1/workspaces/01936b7a-6f2e-7c31-9a4d-2f8e1c5b7d90/websites?limit=50'
Example Response
{  "data": [    {      "id": "string",      "workspaceId": "string",      "name": "Acme Shop",      "url": "",      "endpointUrl": "https://acme.reports.centralcsp.com",      "endpointEnabled": true,      "legacyEndpointUrl": "https://report.centralcsp.com/64f1c2e8a1b2c3d4e5f60718",      "usageLimit": 0,      "settings": {        "allowedOrigins": [          "https://example.com",          "https://*.example.com"        ],        "dropQueryAndFragments": true,        "dropReferrer": true,        "dropReportsFromExtensions": true      },      "role": "viewer",      "tags": [        {          "id": "string",          "name": "production",          "color": "slate",          "description": "Sites customers reach today."        }      ],      "usage": {        "value": 12840,        "limit": 0      },      "createdAt": "2019-08-24T14:15:22Z",      "updatedAt": "2019-08-24T14:15:22Z"    }  ],  "pagination": {    "nextCursor": "string",    "hasMore": true,    "total": 0  }}