List Sectors
GET
/api/v1/sectors
const url = 'https://api.spartanauth.com/api/v1/sectors';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.spartanauth.com/api/v1/sectorsReturns a paginated list of sectors with optional search and filtering. Supports searching by name or domain, filtering by domain, and pagination parameters (page size and page number). Requires the user to be an admin of the default sector.
Parameters
Section titled “ Parameters ”Query Parameters
Section titled “Query Parameters ” pageSize
integer format: int32
Pagination options
page
integer format: int32
searchTerm
string
Search and filtering options
Search by name or domain
filterDomain
string
Filter by domain
Responses
Section titled “ Responses ”A successful response.
Media type application/json
object
sectors
Array<object>
object
sectorID
string
name
string
domain
string
isDefault
boolean
allowedOrigins
Array<string>
slug
string
totalCount
Total number of sectors matching the query
integer format: int32
totalPages
Total number of pages
integer format: int32
currentPage
Current page number
integer format: int32
Example generated
{ "sectors": [ { "sectorID": "example", "name": "example", "domain": "example", "isDefault": true, "allowedOrigins": [ "example" ], "slug": "example" } ], "totalCount": 1, "totalPages": 1, "currentPage": 1}default
Section titled “default ”An unexpected error response.
Media type application/json
object
code
integer format: int32
message
string
details
Array<object>
object
@type
string
key
additional properties
Example generated
{ "code": 1, "message": "example", "details": [ { "@type": "example" } ]}