> For the complete documentation index, see [llms.txt](https://docs.hiboo.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hiboo.io/rest-api-reference/fleet-identity/workspaces.md).

# Workspaces

The following endpoints allow you to retrieve the list of all workspaces available and manage the link between equipments and workspaces.

## Workspaces

> Returns the list of all workspaces available

```json
{"openapi":"3.0.3","info":{"title":"Hiboo API","version":"2.0.0"},"tags":[{"name":"Workspaces","description":"The following endpoints allow you to retrieve the list of all workspaces available and manage the link between equipments and workspaces."}],"servers":[{"url":"https://api.hiboo.io","description":"Production server"},{"url":"https://api-sandbox.hiboo.io","description":"Sandbox server"}],"security":[{"JWT":[]}],"components":{"securitySchemes":{"JWT":{"type":"apiKey","in":"header","name":"x-access-token","description":"Generate a JWT when you log in. Use it in your following requests in the header as `x-access-token: your-token-here`\n"}},"responses":{"Workspaces":{"description":"List of equipment","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"total":{"type":"integer","format":"int64"},"rows":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"}}}}}}}}}}},"401Error":{"description":"Unable to authenticate the token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NoDetailError"}}}}},"schemas":{"NoDetailError":{"required":["message"],"type":"object","properties":{"message":{"type":"string","description":"A human readable description of the error"}}}}},"paths":{"/v2/fleet/workspaces":{"get":{"operationId":"getFleetWorkspaces","summary":"Workspaces","description":"Returns the list of all workspaces available","tags":["Workspaces"],"responses":{"200":{"$ref":"#/components/responses/Workspaces"},"401":{"$ref":"#/components/responses/401Error"}}}}}}
```

## Add Equipment to Workspaces

> Add asset workspaces data with assetId or (serialNumber AND make) of Asset and workspace names

```json
{"openapi":"3.0.3","info":{"title":"Hiboo API","version":"2.0.0"},"tags":[{"name":"Workspaces","description":"The following endpoints allow you to retrieve the list of all workspaces available and manage the link between equipments and workspaces."}],"servers":[{"url":"https://api.hiboo.io","description":"Production server"},{"url":"https://api-sandbox.hiboo.io","description":"Sandbox server"}],"security":[{"JWT":[]}],"components":{"securitySchemes":{"JWT":{"type":"apiKey","in":"header","name":"x-access-token","description":"Generate a JWT when you log in. Use it in your following requests in the header as `x-access-token: your-token-here`\n"}},"schemas":{"bodyAssetWorkspaceNames":{"type":"object","properties":{"assetId":{"type":"number"},"serialNumber":{"type":"string"},"make":{"type":"string"},"workspaceNames":{"type":"array","items":{"type":"string"}}}},"Error":{"required":["message","details"],"type":"object","properties":{"message":{"type":"string","description":"A human readable description of the error"},"details":{"type":"object","description":"Additional information about the Error"}}},"NoDetailError":{"required":["message"],"type":"object","properties":{"message":{"type":"string","description":"A human readable description of the error"}}}},"responses":{"400Error":{"description":"Missing parameters or invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401Error":{"description":"Unable to authenticate the token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NoDetailError"}}}}}},"paths":{"/v2/fleet/equipment/assetWorkspaces/linkAssetToWorkspaces":{"post":{"operationId":"linkAssetToWorkspaces","summary":"Add Equipment to Workspaces","description":"Add asset workspaces data with assetId or (serialNumber AND make) of Asset and workspace names","tags":["Workspaces"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/bodyAssetWorkspaceNames"}}}},"responses":{"200":{"description":"Equipment has been added","content":{"application/json":{"schema":{"properties":{"status":{"type":"string"}}}}}},"400":{"$ref":"#/components/responses/400Error"},"401":{"$ref":"#/components/responses/401Error"},"500":{"description":"An error occurred while processing the request","content":{"application/json":{"schema":{"properties":{"status":{"type":"string"}}}}}}}}}}}
```

## Remove Equipment from Workspaces

> delete link asset and  workspaces data with assetId or (serialNumber AND make) of Asset and workspace names

```json
{"openapi":"3.0.3","info":{"title":"Hiboo API","version":"2.0.0"},"tags":[{"name":"Workspaces","description":"The following endpoints allow you to retrieve the list of all workspaces available and manage the link between equipments and workspaces."}],"servers":[{"url":"https://api.hiboo.io","description":"Production server"},{"url":"https://api-sandbox.hiboo.io","description":"Sandbox server"}],"security":[{"JWT":[]}],"components":{"securitySchemes":{"JWT":{"type":"apiKey","in":"header","name":"x-access-token","description":"Generate a JWT when you log in. Use it in your following requests in the header as `x-access-token: your-token-here`\n"}},"schemas":{"bodyAssetWorkspaceNames":{"type":"object","properties":{"assetId":{"type":"number"},"serialNumber":{"type":"string"},"make":{"type":"string"},"workspaceNames":{"type":"array","items":{"type":"string"}}}},"Error":{"required":["message","details"],"type":"object","properties":{"message":{"type":"string","description":"A human readable description of the error"},"details":{"type":"object","description":"Additional information about the Error"}}},"NoDetailError":{"required":["message"],"type":"object","properties":{"message":{"type":"string","description":"A human readable description of the error"}}}},"responses":{"400Error":{"description":"Missing parameters or invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401Error":{"description":"Unable to authenticate the token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NoDetailError"}}}}}},"paths":{"/v2/fleet/equipment/assetWorkspaces/linkAssetToWorkspaces":{"delete":{"operationId":"deleteLinkAssetToWorkspaces","summary":"Remove Equipment from Workspaces","description":"delete link asset and  workspaces data with assetId or (serialNumber AND make) of Asset and workspace names","tags":["Workspaces"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/bodyAssetWorkspaceNames"}}}},"responses":{"200":{"description":"Equipment has been unlink between asset and workspace","content":{"application/json":{"schema":{"properties":{"status":{"type":"string"}}}}}},"400":{"$ref":"#/components/responses/400Error"},"401":{"$ref":"#/components/responses/401Error"},"500":{"description":"An error occurred while processing the request","content":{"application/json":{"schema":{"properties":{"status":{"type":"string"}}}}}}}}}}}
```
