GET
/
api
/
website_collections
import SnagSolutions from '@snagsolutions/sdk';

const client = new SnagSolutions({
  apiKey: process.env['X_API_KEY'], // This is the default and can be omitted
});

async function main() {
  const websiteCollections = await client.websites.websiteCollections.list({
    websiteId: '123e4567-e89b-12d3-a456-426614174000',
  });

  console.log(websiteCollections.data);
}

main();
{
  "data": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000"
    }
  ],
  "hasNextPage": true
}

Authorizations

X-API-KEY
string
header
required

Query Parameters

organizationId
string

Filter by organization ID

Example:

"123e4567-e89b-12d3-a456-426614174001"

websiteId
string
required

Filter by website ID

Example:

"123e4567-e89b-12d3-a456-426614174000"

limit
integer

Number of items to return

Required range: 1 <= x <= 1000
Example:

10

startingAfter
string

Pagination cursor, start after this ID

Example:

"123e4567-e89b-12d3-a456-426614174000"

Response

200
application/json
200

Response schema for fetching website collections

data
object[]
required

Array of websites

hasNextPage
boolean
required

Indicates if more pages are available

Example:

true