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

# Assets

## GET /assets/groups

> Get Asset Groups

```json
{"openapi":"3.1.1","info":{"title":"RiskBase API","version":"0.0.1"},"tags":[{"name":"Assets","description":""}],"servers":[{"url":"https://api3.riskbase.uk"}],"security":[{"Bearer Authentication":[]}],"components":{"securitySchemes":{"Bearer Authentication":{"type":"http","scheme":"bearer","description":"`Authorization: Bearer {AuthorizationToken}`"}}},"paths":{"/assets/groups":{"get":{"deprecated":true,"tags":["Assets"],"summary":"Get Asset Groups","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":1000,"default":1000},"in":"query","name":"limit"},{"schema":{"type":"integer","default":1},"in":"query","name":"page"}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"total":{"type":"integer"},"assetGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"UID"},"name":{"type":"string"},"reference":{"type":"string"},"customReference":{"type":"string"}}}}}}}}}}}}}}
```

## GET /assets

> Get Assets

```json
{"openapi":"3.1.1","info":{"title":"RiskBase API","version":"0.0.1"},"tags":[{"name":"Assets","description":""}],"servers":[{"url":"https://api3.riskbase.uk"}],"security":[{"Bearer Authentication":[]}],"components":{"securitySchemes":{"Bearer Authentication":{"type":"http","scheme":"bearer","description":"`Authorization: Bearer {AuthorizationToken}`"}}},"paths":{"/assets":{"get":{"deprecated":true,"tags":["Assets"],"summary":"Get Assets","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":1000,"default":1000},"in":"query","name":"limit"},{"schema":{"type":"integer","default":1},"in":"query","name":"page"},{"schema":{"type":"string"},"in":"query","name":"asset","description":"Comma separated asset IDs"},{"schema":{"type":"string"},"in":"query","name":"customreference","description":"Comma separated asset custom references"}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"total":{"type":"integer"},"assets":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"reference":{"type":"string"},"customReference":{"type":"string"},"photoId":{"type":["string","null"]},"address":{"type":"object","properties":{"line1":{"type":"string"},"line2":{"type":"string"},"city":{"type":"string"},"county":{"type":"string"},"postcode":{"type":"string"}}}}}}}}}}}}}}}}
```

## Create Asset

> \- Triggers the \`asset\` webhook.<br>

```json
{"openapi":"3.1.1","info":{"title":"RiskBase API","version":"0.0.1"},"tags":[{"name":"Assets","description":""}],"servers":[{"url":"https://api3.riskbase.uk"}],"security":[{"Bearer Authentication":[]}],"components":{"securitySchemes":{"Bearer Authentication":{"type":"http","scheme":"bearer","description":"`Authorization: Bearer {AuthorizationToken}`"}}},"paths":{"/assets":{"post":{"deprecated":true,"tags":["Assets"],"summary":"Create Asset","description":"- Triggers the `asset` webhook.\n","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string","required":true},"parentAsset":{"type":"string","nullable":"true,","format":"UID","description":"Parent asset or asset group ID. If null is provided, the asset will be created in an asset group called \"Created by API\""},"customReference":{"type":"string"},"address":{"type":"object","properties":{"line1":{"type":"string"},"line2":{"type":"string"},"city":{"type":"string"},"county":{"type":"string"},"postcode":{"type":"string"}}},"skipWebhook":{"type":"boolean","default":false}}}}}},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"id":{"type":"string","format":"UID"}}}}}},"400":{"content":{"application/json":{"schema":{"oneOf":[{"title":"AssetCreateNameRequired","properties":{"code":{"type":"AssetCreateNameRequired"}}},{"title":"AssetCreateInvalidParent","properties":{"code":{"type":"AssetCreateInvalidParent"}}}]}}}}}}}}}
```

## GET /assets/tree

> Get Asset Tree

```json
{"openapi":"3.1.1","info":{"title":"RiskBase API","version":"0.0.1"},"tags":[{"name":"Assets","description":""}],"servers":[{"url":"https://api3.riskbase.uk"}],"security":[{"Bearer Authentication":[]}],"components":{"securitySchemes":{"Bearer Authentication":{"type":"http","scheme":"bearer","description":"`Authorization: Bearer {AuthorizationToken}`"}}},"paths":{"/assets/tree":{"get":{"deprecated":true,"tags":["Assets"],"summary":"Get Asset Tree","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"tree":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"type":"enum","enum":["Organisation","Asset Group","Asset"]},"children":{"type":"array","description":"Recurring tree","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"type":"enum","enum":["Organisation","Asset Group","Asset"]},"children":{"type":"array","description":"Recurring tree","items":{"type":"object"}}}}}}}}}}}}}}}}}}
```

## Update Asset

> Update an asset's name and address.\
> \- Triggers the \`asset\` webhook.<br>

```json
{"openapi":"3.1.1","info":{"title":"RiskBase API","version":"0.0.1"},"tags":[{"name":"Assets","description":""}],"servers":[{"url":"https://api3.riskbase.uk"}],"security":[{"Bearer Authentication":[]}],"components":{"securitySchemes":{"Bearer Authentication":{"type":"http","scheme":"bearer","description":"`Authorization: Bearer {AuthorizationToken}`"}}},"paths":{"/assets/{assetId}":{"patch":{"deprecated":true,"tags":["Assets"],"summary":"Update Asset","description":"Update an asset's name and address.\n- Triggers the `asset` webhook.\n","parameters":[{"schema":{"type":"string","format":"UID"},"in":"path","name":"assetId","required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"customReference":{"type":"string"},"address":{"type":"object","properties":{"line1":{"type":"string"},"line2":{"type":"string"},"city":{"type":"string"},"county":{"type":"string"},"postcode":{"type":"string"}}},"skipWebhook":{"type":"boolean","default":false}}}}}},"responses":{"204":{"content":"application/json"},"400":{"content":{"application/json":{"schema":{"oneOf":[{"title":"AssetNotFound","properties":{"code":{"type":"AssetNotFound"}}}]}}}}}}}}}
```

## Move Asset

> Move an asset to a different position in the asset tree; either below an asset group or another asset.\
> \- Triggers the \`asset\` webhook.<br>

```json
{"openapi":"3.1.1","info":{"title":"RiskBase API","version":"0.0.1"},"tags":[{"name":"Assets","description":""}],"servers":[{"url":"https://api3.riskbase.uk"}],"security":[{"Bearer Authentication":[]}],"components":{"securitySchemes":{"Bearer Authentication":{"type":"http","scheme":"bearer","description":"`Authorization: Bearer {AuthorizationToken}`"}}},"paths":{"/assets/{assetId}/parent":{"patch":{"deprecated":true,"tags":["Assets"],"summary":"Move Asset","description":"Move an asset to a different position in the asset tree; either below an asset group or another asset.\n- Triggers the `asset` webhook.\n","parameters":[{"schema":{"type":"string","format":"UID"},"in":"path","name":"assetId","required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["parentAsset"],"properties":{"parentAsset":{"type":"string","format":"UID"},"skipWebhook":{"type":"boolean","default":false}}}}}},"responses":{"204":{"content":"application/json"},"400":{"content":{"application/json":{"schema":{"oneOf":[{"title":"PropertyNotFound","properties":{"code":{"type":"PropertyNotFound"}}},{"title":"PropertyParentNotFound","properties":{"code":{"type":"PropertyParentNotFound"}}},{"title":"PropertyMoveParentIsChild","properties":{"code":{"type":"PropertyMoveParentIsChild"},"error":{"type":"Parent property is currently a child of the property being moved"}}},{"title":"PropertyMoveInvalidParentPropertyGroup","properties":{"code":{"type":"PropertyMoveInvalidParentPropertyGroup"},"error":{"type":"Property groups can only exist under an organisation or another property group"}}},{"title":"PropertyMoveInvalidParentProperty","properties":{"code":{"type":"PropertyMoveInvalidParentProperty"},"error":{"type":"Property can only exist under a property group or another property"}}}]}}}}}}}}}
```

## Get Asset Team Users

> Get a list of users responsible for teams for all assets in your organisation.\
> \- Responsible users are auto-assigned to tasks that are assigned to their team.\
> \- Users are automatically given access to assets they are responsible for.<br>

```json
{"openapi":"3.1.1","info":{"title":"RiskBase API","version":"0.0.1"},"tags":[{"name":"Assets","description":""}],"servers":[{"url":"https://api3.riskbase.uk"}],"security":[{"Bearer Authentication":[]}],"components":{"securitySchemes":{"Bearer Authentication":{"type":"http","scheme":"bearer","description":"`Authorization: Bearer {AuthorizationToken}`"}}},"paths":{"/assets/teamusers":{"get":{"deprecated":true,"tags":["Assets"],"summary":"Get Asset Team Users","description":"Get a list of users responsible for teams for all assets in your organisation.\n- Responsible users are auto-assigned to tasks that are assigned to their team.\n- Users are automatically given access to assets they are responsible for.\n","parameters":[{"schema":{"type":"string","format":"UID"},"in":"query","name":"asset","description":"Comma separated asset IDs"},{"schema":{"type":"string","format":"UID"},"in":"query","name":"user","description":"Comma separated user IDs"},{"schema":{"type":"boolean","default":false},"in":"query","name":"includeinherited","description":"Responsibility is inherited down the asset tree. By default this endpoint will list responsbility which has been set explicitly. Set this to true to include inherited responsibility."}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"assets":{"type":"object","properties":{"assetId":{"type":"object","properties":{"teamId":{"type":"array","items":{"type":"string","format":"UID"}}}}}}}}}}}}}}}}
```

## Add Asset Team Users

> Set which users are responsible for teams at this asset.\
> \- Users are added as members of the team if they aren't already. Triggers the team webhook if users are added to the team.\
> \- Invalid user IDs are silently ignored.<br>

```json
{"openapi":"3.1.1","info":{"title":"RiskBase API","version":"0.0.1"},"tags":[{"name":"Assets","description":""}],"servers":[{"url":"https://api3.riskbase.uk"}],"security":[{"Bearer Authentication":[]}],"components":{"securitySchemes":{"Bearer Authentication":{"type":"http","scheme":"bearer","description":"`Authorization: Bearer {AuthorizationToken}`"}}},"paths":{"/assets/{assetId}/teamusers/add":{"patch":{"deprecated":true,"tags":["Assets"],"summary":"Add Asset Team Users","description":"Set which users are responsible for teams at this asset.\n- Users are added as members of the team if they aren't already. Triggers the team webhook if users are added to the team.\n- Invalid user IDs are silently ignored.\n","parameters":[{"schema":{"type":"string","format":"UID"},"in":"path","name":"assetId","required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["team","users"],"properties":{"team":{"type":"string","format":"UID"},"users":{"type":"array","items":{"type":"string","format":"UID"}},"skipWebhook":{"type":"boolean","default":false}}}}}},"responses":{"204":{"content":"application/json"},"400":{"content":{"application/json":{"schema":{"oneOf":[{"title":"AssetNotFound","properties":{"code":{"type":"AssetNotFound"}}},{"title":"TeamNotFound","properties":{"code":{"type":"TeamNotFound"}}}]}}}}}}}}}
```

## Remove Asset Team Users

> Remove users as responsible for teams at this asset.\
> \- Users are unassigned from any tasks they were auto-assigned to.\
> \- Invalid user IDs are silently ignored.\
> \- Users are not removed as members of the team.<br>

```json
{"openapi":"3.1.1","info":{"title":"RiskBase API","version":"0.0.1"},"tags":[{"name":"Assets","description":""}],"servers":[{"url":"https://api3.riskbase.uk"}],"security":[{"Bearer Authentication":[]}],"components":{"securitySchemes":{"Bearer Authentication":{"type":"http","scheme":"bearer","description":"`Authorization: Bearer {AuthorizationToken}`"}}},"paths":{"/assets/{assetId}/teamusers/remove":{"patch":{"deprecated":true,"tags":["Assets"],"summary":"Remove Asset Team Users","description":"Remove users as responsible for teams at this asset.\n- Users are unassigned from any tasks they were auto-assigned to.\n- Invalid user IDs are silently ignored.\n- Users are not removed as members of the team.\n","parameters":[{"schema":{"type":"string","format":"UID"},"in":"path","name":"assetId","required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["team","users"],"properties":{"team":{"type":"string","format":"UID"},"users":{"type":"array","items":{"type":"string","format":"UID"}}}}}}},"responses":{"204":{"content":"application/json"},"400":{"content":{"application/json":{"schema":{"oneOf":[{"title":"AssetNotFound","properties":{"code":{"type":"AssetNotFound"}}},{"title":"TeamNotFound","properties":{"code":{"type":"TeamNotFound"}}}]}}}}}}}}}
```


---

# 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:

```
GET https://docs.riskbase.uk/riskbase-docs/api/assets.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
