> For the complete documentation index, see [llms.txt](https://docs.probe.splx.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.probe.splx.ai/platform-api/api-reference/workspace.md).

# Workspace

## Get available Workspaces.

> Retrieves a list of all available Workspaces accessible to the user, along with all associated Targets within each Workspace.

```json
{"openapi":"3.0.4","info":{"title":"API","version":"v1.0"},"tags":[],"servers":[{"url":"https://api.probe.splx.ai","description":"EU Server"},{"url":"https://us.api.probe.splx.ai","description":"US Server"}],"security":[{"API Key":[]}],"components":{"securitySchemes":{"API Key":{"type":"apiKey","description":"API Key for authentication","name":"X-Api-Key","in":"header"}},"schemas":{"WorkspaceWithUserCountDto":{"allOf":[{"$ref":"#/components/schemas/WorkspaceDto"},{"required":["userCount"],"type":"object","properties":{"userCount":{"type":"integer","description":"Number of users that are assigned to Workspace.","format":"int32"}}}],"additionalProperties":false,"description":"Response payload for getting Workspace."},"WorkspaceDto":{"required":["id","name","targets"],"type":"object","properties":{"id":{"type":"integer","description":"Workspace Id.","format":"int32"},"name":{"type":"string","description":"Workspace name."},"description":{"type":"string","description":"Workspace description.","nullable":true},"defaultWorkerPoolId":{"type":"string","description":"Workspace default executor Worker Pool Id.","format":"uuid","nullable":true},"targets":{"type":"array","items":{"$ref":"#/components/schemas/WorkspaceTargetDto"},"description":"Targets that belong to the Workspace."}},"additionalProperties":false},"WorkspaceTargetDto":{"required":["id","integrationType","name","scanId"],"type":"object","properties":{"id":{"type":"integer","description":"Targets Id.","format":"int32"},"name":{"type":"string","description":"Targets Name."},"integrationType":{"type":"string","description":"Targets Integration type."},"scanId":{"type":"integer","description":"Targets Scan Id [DEPRECATED]","format":"int32"}},"additionalProperties":false},"ErrorResponse":{"required":["error"],"type":"object","properties":{"error":{"oneOf":[{"$ref":"#/components/schemas/ErrorDetailsDto"},{"$ref":"#/components/schemas/BadRequestErrorDetailsDto"}],"description":"Error object."}},"additionalProperties":false,"description":"Response payload for error."},"ErrorDetailsDto":{"required":["message"],"type":"object","properties":{"message":{"type":"string","description":"Error detailed message."},"code":{"type":"string","description":"Error code."}},"additionalProperties":false},"BadRequestErrorDetailsDto":{"type":"object","allOf":[{"$ref":"#/components/schemas/ErrorDetailsDto"}],"properties":{"validationErrors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}},"description":"Specific validation errors.","nullable":true}},"additionalProperties":false},"UnauthorizedError":{"type":"object","allOf":[{"$ref":"#/components/schemas/ErrorResponse"}],"additionalProperties":false,"description":"Response payload for Unauthorized access error."},"UnauthorizedWithLogoutError":{"type":"object","allOf":[{"$ref":"#/components/schemas/ErrorResponse"}],"additionalProperties":false,"description":"Response payload for Unauthorized access error."},"ForbiddenError":{"type":"object","allOf":[{"$ref":"#/components/schemas/ErrorResponse"}],"additionalProperties":false,"description":"Response payload for Forbidden access error."},"InternalServerError":{"type":"object","allOf":[{"$ref":"#/components/schemas/ErrorResponse"}],"additionalProperties":false,"description":"Response payload for Internal Server error."},"NotFoundExampleError":{"type":"object","allOf":[{"$ref":"#/components/schemas/ErrorResponse"}],"additionalProperties":false,"description":"Response payload for Not Found error."}}},"paths":{"/api/workspace":{"get":{"tags":["Workspace"],"summary":"Get available Workspaces.","description":"Retrieves a list of all available Workspaces accessible to the user, along with all associated Targets within each Workspace.","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WorkspaceWithUserCountDto"}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/UnauthorizedError"},{"$ref":"#/components/schemas/UnauthorizedWithLogoutError"},{"$ref":"#/components/schemas/ForbiddenError"},{"$ref":"#/components/schemas/InternalServerError"},{"$ref":"#/components/schemas/NotFoundExampleError"}],"description":"Response payload for error."}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.probe.splx.ai/platform-api/api-reference/workspace.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
