List workspaces in the resolved tenant
GET
/v1/workspaces
const url = 'https://example.com/v1/workspaces?limit=50';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
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://example.com/v1/workspaces?limit=50' \ --header 'Authorization: Bearer <token>'Lists the workspaces of the resolved tenant.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Header Parameters
Section titled “Header Parameters ” X-Olivares-Tenant
string format: uuid
Target tenant id; required when the principal can act in more than one tenant.
Query Parameters
Section titled “Query Parameters ” limit
integer
Maximum number of items to return.
cursor
string
Pagination cursor from a previous response.
Responses
Section titled “ Responses ”OK
Media type application/json
object
cursor
string
has_more
required
boolean
items
required
Array<object>
object
created_at
required
string format: date-time
id
required
string format: uuid
is_default
required
boolean
name
required
string
settings
object
key
additional properties
any
slug
required
string
status
required
string
tenant_id
required
string format: uuid
updated_at
required
string format: date-time
version
required
integer format: int64
Example
{ "items": [ { "status": "active" } ]}Bad request
Media type application/json
object
error
required
object
code
required
string
message
required
string
Example generated
{ "error": { "code": "example", "message": "example" }}Unauthenticated
Media type application/json
object
error
required
object
code
required
string
message
required
string
Example generated
{ "error": { "code": "example", "message": "example" }}Forbidden
Media type application/json
object
error
required
object
code
required
string
message
required
string
Example generated
{ "error": { "code": "example", "message": "example" }}Not found
Media type application/json
object
error
required
object
code
required
string
message
required
string
Example generated
{ "error": { "code": "example", "message": "example" }}Conflict / setup required
Media type application/json
object
error
required
object
code
required
string
message
required
string
Example generated
{ "error": { "code": "example", "message": "example" }}Rate limited
Media type application/json
object
error
required
object
code
required
string
message
required
string
Example generated
{ "error": { "code": "example", "message": "example" }}