> For the complete documentation index, see [llms.txt](https://documentation.ocsinventory-ng.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.ocsinventory-ng.org/open-api-reference/asset.md).

# Asset

## GET /asset/bases/

> The default listing, plus the virtual columns asked for in the URL\
> \
> Values are resolved once for the page and passed by serializer context,\
> so a column costs one query and not one per asset.

```json
{"openapi":"3.0.3","info":{"title":"OCS Inventory Backend API References","version":"3.0.0"},"security":[{"knoxApiToken":[]}],"components":{"securitySchemes":{"knoxApiToken":{"type":"apiKey","in":"header","name":"Authorization","description":"Token-based authentication with required prefix \"Token\""}},"schemas":{"PaginatedInventoryBaseList":{"type":"object","required":["count","results"],"properties":{"count":{"type":"integer"},"next":{"type":"string","nullable":true,"format":"uri"},"previous":{"type":"string","nullable":true,"format":"uri"},"results":{"type":"array","items":{"$ref":"#/components/schemas/InventoryBase"}}}},"InventoryBase":{"type":"object","description":"Serializer class for Base","properties":{"id":{"type":"integer","readOnly":true},"name":{"type":"string","maxLength":50},"description":{"type":"string","nullable":true,"maxLength":255},"serial":{"type":"string","maxLength":255},"osname":{"type":"string","maxLength":255},"osversion":{"type":"string","maxLength":255},"uuid":{"type":"string","maxLength":255},"srcip":{"type":"string","maxLength":255},"srcmac":{"type":"string","maxLength":255},"domain":{"type":"string","maxLength":255},"agent":{"type":"string","maxLength":255},"template":{"type":"integer","nullable":true},"last_update":{"type":"string","format":"date-time","readOnly":true},"is_template_forced":{"type":"boolean"},"matched":{"type":"string","readOnly":true}},"required":["id","last_update","matched","name","osname","serial","uuid"]}}},"paths":{"/asset/bases/":{"get":{"operationId":"asset_bases_list","description":"The default listing, plus the virtual columns asked for in the URL\n\nValues are resolved once for the page and passed by serializer context,\nso a column costs one query and not one per asset.","parameters":[{"in":"query","name":"agent","schema":{"type":"string"}},{"in":"query","name":"description","schema":{"type":"string"}},{"in":"query","name":"domain","schema":{"type":"string"}},{"in":"query","name":"format","schema":{"type":"string","enum":["json","xml"]}},{"in":"query","name":"is_template_forced","schema":{"type":"boolean"}},{"in":"query","name":"last_update","schema":{"type":"string","format":"date-time"}},{"name":"limit","required":false,"in":"query","description":"Number of results to return per page.","schema":{"type":"integer"}},{"in":"query","name":"name","schema":{"type":"string"}},{"name":"offset","required":false,"in":"query","description":"The initial index from which to return the results.","schema":{"type":"integer"}},{"name":"ordering","required":false,"in":"query","description":"Which field to use when ordering the results.","schema":{"type":"string"}},{"in":"query","name":"osname","schema":{"type":"string"}},{"in":"query","name":"osversion","schema":{"type":"string"}},{"name":"search","required":false,"in":"query","description":"A search term.","schema":{"type":"string"}},{"in":"query","name":"serial","schema":{"type":"string"}},{"in":"query","name":"srcip","schema":{"type":"string"}},{"in":"query","name":"srcmac","schema":{"type":"string"}},{"in":"query","name":"template","schema":{"type":"integer"}},{"in":"query","name":"uuid","schema":{"type":"string"}}],"tags":["asset"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedInventoryBaseList"}},"application/xml":{"schema":{"$ref":"#/components/schemas/PaginatedInventoryBaseList"}}},"description":""}}}}}}
```

## POST /asset/bases/

> Handle post request, suitable for single and multi creation\
> \
> Args:\
> &#x20;   request (\[dict]): can be dict or list of dicts\
> \
> Returns:\
> &#x20;   \[type]: \[description]

```json
{"openapi":"3.0.3","info":{"title":"OCS Inventory Backend API References","version":"3.0.0"},"security":[{"knoxApiToken":[]}],"components":{"securitySchemes":{"knoxApiToken":{"type":"apiKey","in":"header","name":"Authorization","description":"Token-based authentication with required prefix \"Token\""}},"schemas":{"InventoryBase":{"type":"object","description":"Serializer class for Base","properties":{"id":{"type":"integer","readOnly":true},"name":{"type":"string","maxLength":50},"description":{"type":"string","nullable":true,"maxLength":255},"serial":{"type":"string","maxLength":255},"osname":{"type":"string","maxLength":255},"osversion":{"type":"string","maxLength":255},"uuid":{"type":"string","maxLength":255},"srcip":{"type":"string","maxLength":255},"srcmac":{"type":"string","maxLength":255},"domain":{"type":"string","maxLength":255},"agent":{"type":"string","maxLength":255},"template":{"type":"integer","nullable":true},"last_update":{"type":"string","format":"date-time","readOnly":true},"is_template_forced":{"type":"boolean"},"matched":{"type":"string","readOnly":true}},"required":["id","last_update","matched","name","osname","serial","uuid"]}}},"paths":{"/asset/bases/":{"post":{"operationId":"asset_bases_create","description":"Handle post request, suitable for single and multi creation\n\nArgs:\n    request ([dict]): can be dict or list of dicts\n\nReturns:\n    [type]: [description]","parameters":[{"in":"query","name":"format","schema":{"type":"string","enum":["json","xml"]}}],"tags":["asset"],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/InventoryBase"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/InventoryBase"}},"application/json":{"schema":{"$ref":"#/components/schemas/InventoryBase"}},"application/xml":{"schema":{"$ref":"#/components/schemas/InventoryBase"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InventoryBase"}},"application/xml":{"schema":{"$ref":"#/components/schemas/InventoryBase"}}},"description":""}}}}}}
```

## GET /asset/bases/{id}/

> This class will define the view behavior\
> \
> Args:\
> &#x20;   viewsets (\[OCSVIewSet])

```json
{"openapi":"3.0.3","info":{"title":"OCS Inventory Backend API References","version":"3.0.0"},"security":[{"knoxApiToken":[]}],"components":{"securitySchemes":{"knoxApiToken":{"type":"apiKey","in":"header","name":"Authorization","description":"Token-based authentication with required prefix \"Token\""}},"schemas":{"InventoryBase":{"type":"object","description":"Serializer class for Base","properties":{"id":{"type":"integer","readOnly":true},"name":{"type":"string","maxLength":50},"description":{"type":"string","nullable":true,"maxLength":255},"serial":{"type":"string","maxLength":255},"osname":{"type":"string","maxLength":255},"osversion":{"type":"string","maxLength":255},"uuid":{"type":"string","maxLength":255},"srcip":{"type":"string","maxLength":255},"srcmac":{"type":"string","maxLength":255},"domain":{"type":"string","maxLength":255},"agent":{"type":"string","maxLength":255},"template":{"type":"integer","nullable":true},"last_update":{"type":"string","format":"date-time","readOnly":true},"is_template_forced":{"type":"boolean"},"matched":{"type":"string","readOnly":true}},"required":["id","last_update","matched","name","osname","serial","uuid"]}}},"paths":{"/asset/bases/{id}/":{"get":{"operationId":"asset_bases_retrieve","description":"This class will define the view behavior\n\nArgs:\n    viewsets ([OCSVIewSet])","parameters":[{"in":"query","name":"format","schema":{"type":"string","enum":["json","xml"]}},{"in":"path","name":"id","schema":{"type":"integer"},"description":"A unique integer value identifying this inventory base.","required":true}],"tags":["asset"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InventoryBase"}},"application/xml":{"schema":{"$ref":"#/components/schemas/InventoryBase"}}},"description":""}}}}}}
```

## PUT /asset/bases/{id}/

> This class will define the view behavior\
> \
> Args:\
> &#x20;   viewsets (\[OCSVIewSet])

```json
{"openapi":"3.0.3","info":{"title":"OCS Inventory Backend API References","version":"3.0.0"},"security":[{"knoxApiToken":[]}],"components":{"securitySchemes":{"knoxApiToken":{"type":"apiKey","in":"header","name":"Authorization","description":"Token-based authentication with required prefix \"Token\""}},"schemas":{"InventoryBase":{"type":"object","description":"Serializer class for Base","properties":{"id":{"type":"integer","readOnly":true},"name":{"type":"string","maxLength":50},"description":{"type":"string","nullable":true,"maxLength":255},"serial":{"type":"string","maxLength":255},"osname":{"type":"string","maxLength":255},"osversion":{"type":"string","maxLength":255},"uuid":{"type":"string","maxLength":255},"srcip":{"type":"string","maxLength":255},"srcmac":{"type":"string","maxLength":255},"domain":{"type":"string","maxLength":255},"agent":{"type":"string","maxLength":255},"template":{"type":"integer","nullable":true},"last_update":{"type":"string","format":"date-time","readOnly":true},"is_template_forced":{"type":"boolean"},"matched":{"type":"string","readOnly":true}},"required":["id","last_update","matched","name","osname","serial","uuid"]}}},"paths":{"/asset/bases/{id}/":{"put":{"operationId":"asset_bases_update","description":"This class will define the view behavior\n\nArgs:\n    viewsets ([OCSVIewSet])","parameters":[{"in":"query","name":"format","schema":{"type":"string","enum":["json","xml"]}},{"in":"path","name":"id","schema":{"type":"integer"},"description":"A unique integer value identifying this inventory base.","required":true}],"tags":["asset"],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/InventoryBase"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/InventoryBase"}},"application/json":{"schema":{"$ref":"#/components/schemas/InventoryBase"}},"application/xml":{"schema":{"$ref":"#/components/schemas/InventoryBase"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InventoryBase"}},"application/xml":{"schema":{"$ref":"#/components/schemas/InventoryBase"}}},"description":""}}}}}}
```

## DELETE /asset/bases/{id}/

> This class will define the view behavior\
> \
> Args:\
> &#x20;   viewsets (\[OCSVIewSet])

```json
{"openapi":"3.0.3","info":{"title":"OCS Inventory Backend API References","version":"3.0.0"},"security":[{"knoxApiToken":[]}],"components":{"securitySchemes":{"knoxApiToken":{"type":"apiKey","in":"header","name":"Authorization","description":"Token-based authentication with required prefix \"Token\""}}},"paths":{"/asset/bases/{id}/":{"delete":{"operationId":"asset_bases_destroy","description":"This class will define the view behavior\n\nArgs:\n    viewsets ([OCSVIewSet])","parameters":[{"in":"query","name":"format","schema":{"type":"string","enum":["json","xml"]}},{"in":"path","name":"id","schema":{"type":"integer"},"description":"A unique integer value identifying this inventory base.","required":true}],"tags":["asset"],"responses":{"204":{"description":"No response body"}}}}}}
```

## PATCH /asset/bases/{id}/

> This class will define the view behavior\
> \
> Args:\
> &#x20;   viewsets (\[OCSVIewSet])

```json
{"openapi":"3.0.3","info":{"title":"OCS Inventory Backend API References","version":"3.0.0"},"security":[{"knoxApiToken":[]}],"components":{"securitySchemes":{"knoxApiToken":{"type":"apiKey","in":"header","name":"Authorization","description":"Token-based authentication with required prefix \"Token\""}},"schemas":{"PatchedInventoryBase":{"type":"object","description":"Serializer class for Base","properties":{"id":{"type":"integer","readOnly":true},"name":{"type":"string","maxLength":50},"description":{"type":"string","nullable":true,"maxLength":255},"serial":{"type":"string","maxLength":255},"osname":{"type":"string","maxLength":255},"osversion":{"type":"string","maxLength":255},"uuid":{"type":"string","maxLength":255},"srcip":{"type":"string","maxLength":255},"srcmac":{"type":"string","maxLength":255},"domain":{"type":"string","maxLength":255},"agent":{"type":"string","maxLength":255},"template":{"type":"integer","nullable":true},"last_update":{"type":"string","format":"date-time","readOnly":true},"is_template_forced":{"type":"boolean"},"matched":{"type":"string","readOnly":true}}},"InventoryBase":{"type":"object","description":"Serializer class for Base","properties":{"id":{"type":"integer","readOnly":true},"name":{"type":"string","maxLength":50},"description":{"type":"string","nullable":true,"maxLength":255},"serial":{"type":"string","maxLength":255},"osname":{"type":"string","maxLength":255},"osversion":{"type":"string","maxLength":255},"uuid":{"type":"string","maxLength":255},"srcip":{"type":"string","maxLength":255},"srcmac":{"type":"string","maxLength":255},"domain":{"type":"string","maxLength":255},"agent":{"type":"string","maxLength":255},"template":{"type":"integer","nullable":true},"last_update":{"type":"string","format":"date-time","readOnly":true},"is_template_forced":{"type":"boolean"},"matched":{"type":"string","readOnly":true}},"required":["id","last_update","matched","name","osname","serial","uuid"]}}},"paths":{"/asset/bases/{id}/":{"patch":{"operationId":"asset_bases_partial_update","description":"This class will define the view behavior\n\nArgs:\n    viewsets ([OCSVIewSet])","parameters":[{"in":"query","name":"format","schema":{"type":"string","enum":["json","xml"]}},{"in":"path","name":"id","schema":{"type":"integer"},"description":"A unique integer value identifying this inventory base.","required":true}],"tags":["asset"],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/PatchedInventoryBase"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/PatchedInventoryBase"}},"application/json":{"schema":{"$ref":"#/components/schemas/PatchedInventoryBase"}},"application/xml":{"schema":{"$ref":"#/components/schemas/PatchedInventoryBase"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InventoryBase"}},"application/xml":{"schema":{"$ref":"#/components/schemas/InventoryBase"}}},"description":""}}}}}}
```

## POST /asset/collection/

> Create an asset and its inventory (if template\_inventory is provided).

```json
{"openapi":"3.0.3","info":{"title":"OCS Inventory Backend API References","version":"3.0.0"},"security":[{"knoxApiToken":[]}],"components":{"securitySchemes":{"knoxApiToken":{"type":"apiKey","in":"header","name":"Authorization","description":"Token-based authentication with required prefix \"Token\""}},"schemas":{"InventoryBase":{"type":"object","description":"Serializer class for Base","properties":{"id":{"type":"integer","readOnly":true},"name":{"type":"string","maxLength":50},"description":{"type":"string","nullable":true,"maxLength":255},"serial":{"type":"string","maxLength":255},"osname":{"type":"string","maxLength":255},"osversion":{"type":"string","maxLength":255},"uuid":{"type":"string","maxLength":255},"srcip":{"type":"string","maxLength":255},"srcmac":{"type":"string","maxLength":255},"domain":{"type":"string","maxLength":255},"agent":{"type":"string","maxLength":255},"template":{"type":"integer","nullable":true},"last_update":{"type":"string","format":"date-time","readOnly":true},"is_template_forced":{"type":"boolean"},"matched":{"type":"string","readOnly":true}},"required":["id","last_update","matched","name","osname","serial","uuid"]},"CollectionResponse":{"type":"object","description":"Response shape on successful asset creation/update","properties":{"message":{"type":"string"},"id":{"type":"integer"}},"required":["id","message"]},"CollectionError":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}},"paths":{"/asset/collection/":{"post":{"operationId":"asset_collection_create","description":"Create an asset and its inventory (if template_inventory is provided).","parameters":[{"in":"query","name":"format","schema":{"type":"string","enum":["json","xml"]}}],"tags":["asset"],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/InventoryBase"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/InventoryBase"}},"application/json":{"schema":{"$ref":"#/components/schemas/InventoryBase"}},"application/xml":{"schema":{"$ref":"#/components/schemas/InventoryBase"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionResponse"}},"application/xml":{"schema":{"$ref":"#/components/schemas/CollectionResponse"}}},"description":""},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionError"}},"application/xml":{"schema":{"$ref":"#/components/schemas/CollectionError"}}},"description":""},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionError"}},"application/xml":{"schema":{"$ref":"#/components/schemas/CollectionError"}}},"description":""},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionError"}},"application/xml":{"schema":{"$ref":"#/components/schemas/CollectionError"}}},"description":""}}}}}}
```

## PUT /asset/collection/

> Update an asset and fully overwrite its inventory (missing sections/fields are deleted).

```json
{"openapi":"3.0.3","info":{"title":"OCS Inventory Backend API References","version":"3.0.0"},"security":[{"knoxApiToken":[]}],"components":{"securitySchemes":{"knoxApiToken":{"type":"apiKey","in":"header","name":"Authorization","description":"Token-based authentication with required prefix \"Token\""}},"schemas":{"InventoryBase":{"type":"object","description":"Serializer class for Base","properties":{"id":{"type":"integer","readOnly":true},"name":{"type":"string","maxLength":50},"description":{"type":"string","nullable":true,"maxLength":255},"serial":{"type":"string","maxLength":255},"osname":{"type":"string","maxLength":255},"osversion":{"type":"string","maxLength":255},"uuid":{"type":"string","maxLength":255},"srcip":{"type":"string","maxLength":255},"srcmac":{"type":"string","maxLength":255},"domain":{"type":"string","maxLength":255},"agent":{"type":"string","maxLength":255},"template":{"type":"integer","nullable":true},"last_update":{"type":"string","format":"date-time","readOnly":true},"is_template_forced":{"type":"boolean"},"matched":{"type":"string","readOnly":true}},"required":["id","last_update","matched","name","osname","serial","uuid"]},"CollectionResponse":{"type":"object","description":"Response shape on successful asset creation/update","properties":{"message":{"type":"string"},"id":{"type":"integer"}},"required":["id","message"]},"CollectionError":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}},"paths":{"/asset/collection/":{"put":{"operationId":"asset_collection_update","description":"Update an asset and fully overwrite its inventory (missing sections/fields are deleted).","parameters":[{"in":"query","name":"format","schema":{"type":"string","enum":["json","xml"]}}],"tags":["asset"],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/InventoryBase"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/InventoryBase"}},"application/json":{"schema":{"$ref":"#/components/schemas/InventoryBase"}},"application/xml":{"schema":{"$ref":"#/components/schemas/InventoryBase"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionResponse"}},"application/xml":{"schema":{"$ref":"#/components/schemas/CollectionResponse"}}},"description":""},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionError"}},"application/xml":{"schema":{"$ref":"#/components/schemas/CollectionError"}}},"description":""},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionError"}},"application/xml":{"schema":{"$ref":"#/components/schemas/CollectionError"}}},"description":""},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionError"}},"application/xml":{"schema":{"$ref":"#/components/schemas/CollectionError"}}},"description":""}}}}}}
```

## PATCH /asset/collection/

> Partially update an asset and its inventory (only the provided sections/fields are affected).

```json
{"openapi":"3.0.3","info":{"title":"OCS Inventory Backend API References","version":"3.0.0"},"security":[{"knoxApiToken":[]}],"components":{"securitySchemes":{"knoxApiToken":{"type":"apiKey","in":"header","name":"Authorization","description":"Token-based authentication with required prefix \"Token\""}},"schemas":{"PatchedInventoryBase":{"type":"object","description":"Serializer class for Base","properties":{"id":{"type":"integer","readOnly":true},"name":{"type":"string","maxLength":50},"description":{"type":"string","nullable":true,"maxLength":255},"serial":{"type":"string","maxLength":255},"osname":{"type":"string","maxLength":255},"osversion":{"type":"string","maxLength":255},"uuid":{"type":"string","maxLength":255},"srcip":{"type":"string","maxLength":255},"srcmac":{"type":"string","maxLength":255},"domain":{"type":"string","maxLength":255},"agent":{"type":"string","maxLength":255},"template":{"type":"integer","nullable":true},"last_update":{"type":"string","format":"date-time","readOnly":true},"is_template_forced":{"type":"boolean"},"matched":{"type":"string","readOnly":true}}},"CollectionResponse":{"type":"object","description":"Response shape on successful asset creation/update","properties":{"message":{"type":"string"},"id":{"type":"integer"}},"required":["id","message"]},"CollectionError":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}},"paths":{"/asset/collection/":{"patch":{"operationId":"asset_collection_partial_update","description":"Partially update an asset and its inventory (only the provided sections/fields are affected).","parameters":[{"in":"query","name":"format","schema":{"type":"string","enum":["json","xml"]}}],"tags":["asset"],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/PatchedInventoryBase"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/PatchedInventoryBase"}},"application/json":{"schema":{"$ref":"#/components/schemas/PatchedInventoryBase"}},"application/xml":{"schema":{"$ref":"#/components/schemas/PatchedInventoryBase"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionResponse"}},"application/xml":{"schema":{"$ref":"#/components/schemas/CollectionResponse"}}},"description":""},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionError"}},"application/xml":{"schema":{"$ref":"#/components/schemas/CollectionError"}}},"description":""},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionError"}},"application/xml":{"schema":{"$ref":"#/components/schemas/CollectionError"}}},"description":""},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionError"}},"application/xml":{"schema":{"$ref":"#/components/schemas/CollectionError"}}},"description":""}}}}}}
```

## GET /asset/configs/

> Allow read of agent config\
> This view is reachable at the /asset/configs/ endpoint.\
> \
> GET:\
> List agent configuration

```json
{"openapi":"3.0.3","info":{"title":"OCS Inventory Backend API References","version":"3.0.0"},"security":[{"knoxApiToken":[]}],"components":{"securitySchemes":{"knoxApiToken":{"type":"apiKey","in":"header","name":"Authorization","description":"Token-based authentication with required prefix \"Token\""}},"schemas":{"PaginatedConfigList":{"type":"object","required":["count","results"],"properties":{"count":{"type":"integer"},"next":{"type":"string","nullable":true,"format":"uri"},"previous":{"type":"string","nullable":true,"format":"uri"},"results":{"type":"array","items":{"$ref":"#/components/schemas/Config"}}}},"Config":{"type":"object","description":"This serialize class provide the API representation","properties":{"name":{"type":"string","maxLength":100},"value":{}},"required":["name","value"]}}},"paths":{"/asset/configs/":{"get":{"operationId":"asset_configs_list","description":"Allow read of agent config\nThis view is reachable at the /asset/configs/ endpoint.\n\nGET:\nList agent configuration","parameters":[{"in":"query","name":"format","schema":{"type":"string","enum":["json","xml"]}},{"name":"limit","required":false,"in":"query","description":"Number of results to return per page.","schema":{"type":"integer"}},{"name":"offset","required":false,"in":"query","description":"The initial index from which to return the results.","schema":{"type":"integer"}}],"tags":["asset"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedConfigList"}},"application/xml":{"schema":{"$ref":"#/components/schemas/PaginatedConfigList"}}},"description":""}}}}}}
```

## GET /asset/configs/{name}/

> Allow read of agent config\
> This view is reachable at the /asset/configs/ endpoint.\
> \
> GET:\
> List agent configuration

```json
{"openapi":"3.0.3","info":{"title":"OCS Inventory Backend API References","version":"3.0.0"},"security":[{"knoxApiToken":[]}],"components":{"securitySchemes":{"knoxApiToken":{"type":"apiKey","in":"header","name":"Authorization","description":"Token-based authentication with required prefix \"Token\""}},"schemas":{"Config":{"type":"object","description":"This serialize class provide the API representation","properties":{"name":{"type":"string","maxLength":100},"value":{}},"required":["name","value"]}}},"paths":{"/asset/configs/{name}/":{"get":{"operationId":"asset_configs_retrieve","description":"Allow read of agent config\nThis view is reachable at the /asset/configs/ endpoint.\n\nGET:\nList agent configuration","parameters":[{"in":"query","name":"format","schema":{"type":"string","enum":["json","xml"]}},{"in":"path","name":"name","schema":{"type":"string"},"description":"A unique value identifying this config.","required":true}],"tags":["asset"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Config"}},"application/xml":{"schema":{"$ref":"#/components/schemas/Config"}}},"description":""}}}}}}
```

## GET /asset/fields/

> Template Field ViewSet\
> \
> Args:\
> &#x20;   viewsets (\[OCSVIewSet])

```json
{"openapi":"3.0.3","info":{"title":"OCS Inventory Backend API References","version":"3.0.0"},"security":[{"knoxApiToken":[]}],"components":{"securitySchemes":{"knoxApiToken":{"type":"apiKey","in":"header","name":"Authorization","description":"Token-based authentication with required prefix \"Token\""}},"schemas":{"PaginatedInventoryFieldList":{"type":"object","required":["count","results"],"properties":{"count":{"type":"integer"},"next":{"type":"string","nullable":true,"format":"uri"},"previous":{"type":"string","nullable":true,"format":"uri"},"results":{"type":"array","items":{"$ref":"#/components/schemas/InventoryField"}}}},"InventoryField":{"type":"object","description":"Serializer class for InventoryField","properties":{"id":{"type":"integer","readOnly":true},"inventory_section":{"type":"integer"},"template_field":{"type":"integer"},"value":{"type":"string","nullable":true}},"required":["id","inventory_section","template_field"]}}},"paths":{"/asset/fields/":{"get":{"operationId":"asset_fields_list","description":"Template Field ViewSet\n\nArgs:\n    viewsets ([OCSVIewSet])","parameters":[{"in":"query","name":"format","schema":{"type":"string","enum":["json","xml"]}},{"in":"query","name":"id","schema":{"type":"integer"}},{"in":"query","name":"inventory_section","schema":{"type":"integer"}},{"name":"limit","required":false,"in":"query","description":"Number of results to return per page.","schema":{"type":"integer"}},{"name":"offset","required":false,"in":"query","description":"The initial index from which to return the results.","schema":{"type":"integer"}},{"name":"ordering","required":false,"in":"query","description":"Which field to use when ordering the results.","schema":{"type":"string"}},{"name":"search","required":false,"in":"query","description":"A search term.","schema":{"type":"string"}},{"in":"query","name":"template_field","schema":{"type":"integer"}},{"in":"query","name":"value","schema":{"type":"string"}}],"tags":["asset"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedInventoryFieldList"}},"application/xml":{"schema":{"$ref":"#/components/schemas/PaginatedInventoryFieldList"}}},"description":""}}}}}}
```

## POST /asset/fields/

> Handle post request, suitable for single and multi creation\
> \
> Args:\
> &#x20;   request (\[dict]): can be dict or list of dicts\
> \
> Returns:\
> &#x20;   \[type]: \[description]

```json
{"openapi":"3.0.3","info":{"title":"OCS Inventory Backend API References","version":"3.0.0"},"security":[{"knoxApiToken":[]}],"components":{"securitySchemes":{"knoxApiToken":{"type":"apiKey","in":"header","name":"Authorization","description":"Token-based authentication with required prefix \"Token\""}},"schemas":{"InventoryField":{"type":"object","description":"Serializer class for InventoryField","properties":{"id":{"type":"integer","readOnly":true},"inventory_section":{"type":"integer"},"template_field":{"type":"integer"},"value":{"type":"string","nullable":true}},"required":["id","inventory_section","template_field"]}}},"paths":{"/asset/fields/":{"post":{"operationId":"asset_fields_create","description":"Handle post request, suitable for single and multi creation\n\nArgs:\n    request ([dict]): can be dict or list of dicts\n\nReturns:\n    [type]: [description]","parameters":[{"in":"query","name":"format","schema":{"type":"string","enum":["json","xml"]}}],"tags":["asset"],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/InventoryField"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/InventoryField"}},"application/json":{"schema":{"$ref":"#/components/schemas/InventoryField"}},"application/xml":{"schema":{"$ref":"#/components/schemas/InventoryField"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InventoryField"}},"application/xml":{"schema":{"$ref":"#/components/schemas/InventoryField"}}},"description":""}}}}}}
```

## GET /asset/fields/{id}/

> Template Field ViewSet\
> \
> Args:\
> &#x20;   viewsets (\[OCSVIewSet])

```json
{"openapi":"3.0.3","info":{"title":"OCS Inventory Backend API References","version":"3.0.0"},"security":[{"knoxApiToken":[]}],"components":{"securitySchemes":{"knoxApiToken":{"type":"apiKey","in":"header","name":"Authorization","description":"Token-based authentication with required prefix \"Token\""}},"schemas":{"InventoryField":{"type":"object","description":"Serializer class for InventoryField","properties":{"id":{"type":"integer","readOnly":true},"inventory_section":{"type":"integer"},"template_field":{"type":"integer"},"value":{"type":"string","nullable":true}},"required":["id","inventory_section","template_field"]}}},"paths":{"/asset/fields/{id}/":{"get":{"operationId":"asset_fields_retrieve","description":"Template Field ViewSet\n\nArgs:\n    viewsets ([OCSVIewSet])","parameters":[{"in":"query","name":"format","schema":{"type":"string","enum":["json","xml"]}},{"in":"path","name":"id","schema":{"type":"integer"},"description":"A unique integer value identifying this inventory field.","required":true}],"tags":["asset"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InventoryField"}},"application/xml":{"schema":{"$ref":"#/components/schemas/InventoryField"}}},"description":""}}}}}}
```

## PUT /asset/fields/{id}/

> Template Field ViewSet\
> \
> Args:\
> &#x20;   viewsets (\[OCSVIewSet])

```json
{"openapi":"3.0.3","info":{"title":"OCS Inventory Backend API References","version":"3.0.0"},"security":[{"knoxApiToken":[]}],"components":{"securitySchemes":{"knoxApiToken":{"type":"apiKey","in":"header","name":"Authorization","description":"Token-based authentication with required prefix \"Token\""}},"schemas":{"InventoryField":{"type":"object","description":"Serializer class for InventoryField","properties":{"id":{"type":"integer","readOnly":true},"inventory_section":{"type":"integer"},"template_field":{"type":"integer"},"value":{"type":"string","nullable":true}},"required":["id","inventory_section","template_field"]}}},"paths":{"/asset/fields/{id}/":{"put":{"operationId":"asset_fields_update","description":"Template Field ViewSet\n\nArgs:\n    viewsets ([OCSVIewSet])","parameters":[{"in":"query","name":"format","schema":{"type":"string","enum":["json","xml"]}},{"in":"path","name":"id","schema":{"type":"integer"},"description":"A unique integer value identifying this inventory field.","required":true}],"tags":["asset"],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/InventoryField"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/InventoryField"}},"application/json":{"schema":{"$ref":"#/components/schemas/InventoryField"}},"application/xml":{"schema":{"$ref":"#/components/schemas/InventoryField"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InventoryField"}},"application/xml":{"schema":{"$ref":"#/components/schemas/InventoryField"}}},"description":""}}}}}}
```

## DELETE /asset/fields/{id}/

> Template Field ViewSet\
> \
> Args:\
> &#x20;   viewsets (\[OCSVIewSet])

```json
{"openapi":"3.0.3","info":{"title":"OCS Inventory Backend API References","version":"3.0.0"},"security":[{"knoxApiToken":[]}],"components":{"securitySchemes":{"knoxApiToken":{"type":"apiKey","in":"header","name":"Authorization","description":"Token-based authentication with required prefix \"Token\""}}},"paths":{"/asset/fields/{id}/":{"delete":{"operationId":"asset_fields_destroy","description":"Template Field ViewSet\n\nArgs:\n    viewsets ([OCSVIewSet])","parameters":[{"in":"query","name":"format","schema":{"type":"string","enum":["json","xml"]}},{"in":"path","name":"id","schema":{"type":"integer"},"description":"A unique integer value identifying this inventory field.","required":true}],"tags":["asset"],"responses":{"204":{"description":"No response body"}}}}}}
```

## PATCH /asset/fields/{id}/

> Template Field ViewSet\
> \
> Args:\
> &#x20;   viewsets (\[OCSVIewSet])

```json
{"openapi":"3.0.3","info":{"title":"OCS Inventory Backend API References","version":"3.0.0"},"security":[{"knoxApiToken":[]}],"components":{"securitySchemes":{"knoxApiToken":{"type":"apiKey","in":"header","name":"Authorization","description":"Token-based authentication with required prefix \"Token\""}},"schemas":{"PatchedInventoryField":{"type":"object","description":"Serializer class for InventoryField","properties":{"id":{"type":"integer","readOnly":true},"inventory_section":{"type":"integer"},"template_field":{"type":"integer"},"value":{"type":"string","nullable":true}}},"InventoryField":{"type":"object","description":"Serializer class for InventoryField","properties":{"id":{"type":"integer","readOnly":true},"inventory_section":{"type":"integer"},"template_field":{"type":"integer"},"value":{"type":"string","nullable":true}},"required":["id","inventory_section","template_field"]}}},"paths":{"/asset/fields/{id}/":{"patch":{"operationId":"asset_fields_partial_update","description":"Template Field ViewSet\n\nArgs:\n    viewsets ([OCSVIewSet])","parameters":[{"in":"query","name":"format","schema":{"type":"string","enum":["json","xml"]}},{"in":"path","name":"id","schema":{"type":"integer"},"description":"A unique integer value identifying this inventory field.","required":true}],"tags":["asset"],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/PatchedInventoryField"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/PatchedInventoryField"}},"application/json":{"schema":{"$ref":"#/components/schemas/PatchedInventoryField"}},"application/xml":{"schema":{"$ref":"#/components/schemas/PatchedInventoryField"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InventoryField"}},"application/xml":{"schema":{"$ref":"#/components/schemas/InventoryField"}}},"description":""}}}}}}
```

## GET /asset/groups/

> Return the list of objects that the user can see (public,\
> private\_personal, private\_group)

```json
{"openapi":"3.0.3","info":{"title":"OCS Inventory Backend API References","version":"3.0.0"},"security":[{"knoxApiToken":[]}],"components":{"securitySchemes":{"knoxApiToken":{"type":"apiKey","in":"header","name":"Authorization","description":"Token-based authentication with required prefix \"Token\""}},"schemas":{"PaginatedAssetGroupList":{"type":"object","required":["count","results"],"properties":{"count":{"type":"integer"},"next":{"type":"string","nullable":true,"format":"uri"},"previous":{"type":"string","nullable":true,"format":"uri"},"results":{"type":"array","items":{"$ref":"#/components/schemas/AssetGroup"}}}},"AssetGroup":{"type":"object","description":"Serializer class for AssetGroup","properties":{"id":{"type":"integer","readOnly":true},"visibility":{"$ref":"#/components/schemas/VisibilityEnum"},"allow_group_modification":{"type":"boolean"},"name":{"type":"string","maxLength":50},"description":{"type":"string","nullable":true,"maxLength":255},"is_dynamic":{"type":"boolean"},"search":{"nullable":true},"last_updated":{"type":"string","format":"date-time","readOnly":true},"user":{"type":"integer"},"groups":{"type":"array","items":{"type":"integer"}},"assets":{"type":"array","items":{"type":"integer"}}},"required":["id","last_updated","name","user"]},"VisibilityEnum":{"enum":["public","private_personal","private_group"],"type":"string","description":"* `public` - Public\n* `private_personal` - Private (Personal)\n* `private_group` - Private (Group)"}}},"paths":{"/asset/groups/":{"get":{"operationId":"asset_groups_list","description":"Return the list of objects that the user can see (public,\nprivate_personal, private_group)","parameters":[{"in":"query","name":"assets","schema":{"type":"array","items":{"type":"integer"}},"explode":true,"style":"form"},{"in":"query","name":"description","schema":{"type":"string"}},{"in":"query","name":"format","schema":{"type":"string","enum":["json","xml"]}},{"in":"query","name":"is_dynamic","schema":{"type":"boolean"}},{"in":"query","name":"last_updated","schema":{"type":"string","format":"date-time"}},{"name":"limit","required":false,"in":"query","description":"Number of results to return per page.","schema":{"type":"integer"}},{"in":"query","name":"name","schema":{"type":"string"}},{"name":"offset","required":false,"in":"query","description":"The initial index from which to return the results.","schema":{"type":"integer"}},{"name":"ordering","required":false,"in":"query","description":"Which field to use when ordering the results.","schema":{"type":"string"}},{"name":"search","required":false,"in":"query","description":"A search term.","schema":{"type":"string"}}],"tags":["asset"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedAssetGroupList"}},"application/xml":{"schema":{"$ref":"#/components/schemas/PaginatedAssetGroupList"}}},"description":""}}}}}}
```

## POST /asset/groups/

> Handle post request, suitable for single and multi creation\
> \
> Args:\
> &#x20;   request (\[dict]): can be dict or list of dicts\
> \
> Returns:\
> &#x20;   \[type]: \[description]

```json
{"openapi":"3.0.3","info":{"title":"OCS Inventory Backend API References","version":"3.0.0"},"security":[{"knoxApiToken":[]}],"components":{"securitySchemes":{"knoxApiToken":{"type":"apiKey","in":"header","name":"Authorization","description":"Token-based authentication with required prefix \"Token\""}},"schemas":{"AssetGroup":{"type":"object","description":"Serializer class for AssetGroup","properties":{"id":{"type":"integer","readOnly":true},"visibility":{"$ref":"#/components/schemas/VisibilityEnum"},"allow_group_modification":{"type":"boolean"},"name":{"type":"string","maxLength":50},"description":{"type":"string","nullable":true,"maxLength":255},"is_dynamic":{"type":"boolean"},"search":{"nullable":true},"last_updated":{"type":"string","format":"date-time","readOnly":true},"user":{"type":"integer"},"groups":{"type":"array","items":{"type":"integer"}},"assets":{"type":"array","items":{"type":"integer"}}},"required":["id","last_updated","name","user"]},"VisibilityEnum":{"enum":["public","private_personal","private_group"],"type":"string","description":"* `public` - Public\n* `private_personal` - Private (Personal)\n* `private_group` - Private (Group)"}}},"paths":{"/asset/groups/":{"post":{"operationId":"asset_groups_create","description":"Handle post request, suitable for single and multi creation\n\nArgs:\n    request ([dict]): can be dict or list of dicts\n\nReturns:\n    [type]: [description]","parameters":[{"in":"query","name":"format","schema":{"type":"string","enum":["json","xml"]}}],"tags":["asset"],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/AssetGroup"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/AssetGroup"}},"application/json":{"schema":{"$ref":"#/components/schemas/AssetGroup"}},"application/xml":{"schema":{"$ref":"#/components/schemas/AssetGroup"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetGroup"}},"application/xml":{"schema":{"$ref":"#/components/schemas/AssetGroup"}}},"description":""}}}}}}
```

## GET /asset/groups/{id}/

> AssetGroup ViewSet\
> \
> Inherits from RestrictVisibilityViewSet to restrict the visibility of the\
> Search objects based on user and group membership

```json
{"openapi":"3.0.3","info":{"title":"OCS Inventory Backend API References","version":"3.0.0"},"security":[{"knoxApiToken":[]}],"components":{"securitySchemes":{"knoxApiToken":{"type":"apiKey","in":"header","name":"Authorization","description":"Token-based authentication with required prefix \"Token\""}},"schemas":{"AssetGroup":{"type":"object","description":"Serializer class for AssetGroup","properties":{"id":{"type":"integer","readOnly":true},"visibility":{"$ref":"#/components/schemas/VisibilityEnum"},"allow_group_modification":{"type":"boolean"},"name":{"type":"string","maxLength":50},"description":{"type":"string","nullable":true,"maxLength":255},"is_dynamic":{"type":"boolean"},"search":{"nullable":true},"last_updated":{"type":"string","format":"date-time","readOnly":true},"user":{"type":"integer"},"groups":{"type":"array","items":{"type":"integer"}},"assets":{"type":"array","items":{"type":"integer"}}},"required":["id","last_updated","name","user"]},"VisibilityEnum":{"enum":["public","private_personal","private_group"],"type":"string","description":"* `public` - Public\n* `private_personal` - Private (Personal)\n* `private_group` - Private (Group)"}}},"paths":{"/asset/groups/{id}/":{"get":{"operationId":"asset_groups_retrieve","description":"AssetGroup ViewSet\n\nInherits from RestrictVisibilityViewSet to restrict the visibility of the\nSearch objects based on user and group membership","parameters":[{"in":"query","name":"format","schema":{"type":"string","enum":["json","xml"]}},{"in":"path","name":"id","schema":{"type":"integer"},"description":"A unique integer value identifying this asset group.","required":true}],"tags":["asset"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetGroup"}},"application/xml":{"schema":{"$ref":"#/components/schemas/AssetGroup"}}},"description":""}}}}}}
```

## PUT /asset/groups/{id}/

> User needs to either be the creator or part of the group\
> (if allow\_group\_modification is enabled) to modify a\
> visibility restricted object

```json
{"openapi":"3.0.3","info":{"title":"OCS Inventory Backend API References","version":"3.0.0"},"security":[{"knoxApiToken":[]}],"components":{"securitySchemes":{"knoxApiToken":{"type":"apiKey","in":"header","name":"Authorization","description":"Token-based authentication with required prefix \"Token\""}},"schemas":{"AssetGroup":{"type":"object","description":"Serializer class for AssetGroup","properties":{"id":{"type":"integer","readOnly":true},"visibility":{"$ref":"#/components/schemas/VisibilityEnum"},"allow_group_modification":{"type":"boolean"},"name":{"type":"string","maxLength":50},"description":{"type":"string","nullable":true,"maxLength":255},"is_dynamic":{"type":"boolean"},"search":{"nullable":true},"last_updated":{"type":"string","format":"date-time","readOnly":true},"user":{"type":"integer"},"groups":{"type":"array","items":{"type":"integer"}},"assets":{"type":"array","items":{"type":"integer"}}},"required":["id","last_updated","name","user"]},"VisibilityEnum":{"enum":["public","private_personal","private_group"],"type":"string","description":"* `public` - Public\n* `private_personal` - Private (Personal)\n* `private_group` - Private (Group)"}}},"paths":{"/asset/groups/{id}/":{"put":{"operationId":"asset_groups_update","description":"User needs to either be the creator or part of the group\n(if allow_group_modification is enabled) to modify a\nvisibility restricted object","parameters":[{"in":"query","name":"format","schema":{"type":"string","enum":["json","xml"]}},{"in":"path","name":"id","schema":{"type":"integer"},"description":"A unique integer value identifying this asset group.","required":true}],"tags":["asset"],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/AssetGroup"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/AssetGroup"}},"application/json":{"schema":{"$ref":"#/components/schemas/AssetGroup"}},"application/xml":{"schema":{"$ref":"#/components/schemas/AssetGroup"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetGroup"}},"application/xml":{"schema":{"$ref":"#/components/schemas/AssetGroup"}}},"description":""}}}}}}
```

## DELETE /asset/groups/{id}/

> User needs to be the creator to delete a visibility restricted object

```json
{"openapi":"3.0.3","info":{"title":"OCS Inventory Backend API References","version":"3.0.0"},"security":[{"knoxApiToken":[]}],"components":{"securitySchemes":{"knoxApiToken":{"type":"apiKey","in":"header","name":"Authorization","description":"Token-based authentication with required prefix \"Token\""}}},"paths":{"/asset/groups/{id}/":{"delete":{"operationId":"asset_groups_destroy","description":"User needs to be the creator to delete a visibility restricted object","parameters":[{"in":"query","name":"format","schema":{"type":"string","enum":["json","xml"]}},{"in":"path","name":"id","schema":{"type":"integer"},"description":"A unique integer value identifying this asset group.","required":true}],"tags":["asset"],"responses":{"204":{"description":"No response body"}}}}}}
```

## PATCH /asset/groups/{id}/

> AssetGroup ViewSet\
> \
> Inherits from RestrictVisibilityViewSet to restrict the visibility of the\
> Search objects based on user and group membership

```json
{"openapi":"3.0.3","info":{"title":"OCS Inventory Backend API References","version":"3.0.0"},"security":[{"knoxApiToken":[]}],"components":{"securitySchemes":{"knoxApiToken":{"type":"apiKey","in":"header","name":"Authorization","description":"Token-based authentication with required prefix \"Token\""}},"schemas":{"PatchedAssetGroup":{"type":"object","description":"Serializer class for AssetGroup","properties":{"id":{"type":"integer","readOnly":true},"visibility":{"$ref":"#/components/schemas/VisibilityEnum"},"allow_group_modification":{"type":"boolean"},"name":{"type":"string","maxLength":50},"description":{"type":"string","nullable":true,"maxLength":255},"is_dynamic":{"type":"boolean"},"search":{"nullable":true},"last_updated":{"type":"string","format":"date-time","readOnly":true},"user":{"type":"integer"},"groups":{"type":"array","items":{"type":"integer"}},"assets":{"type":"array","items":{"type":"integer"}}}},"VisibilityEnum":{"enum":["public","private_personal","private_group"],"type":"string","description":"* `public` - Public\n* `private_personal` - Private (Personal)\n* `private_group` - Private (Group)"},"AssetGroup":{"type":"object","description":"Serializer class for AssetGroup","properties":{"id":{"type":"integer","readOnly":true},"visibility":{"$ref":"#/components/schemas/VisibilityEnum"},"allow_group_modification":{"type":"boolean"},"name":{"type":"string","maxLength":50},"description":{"type":"string","nullable":true,"maxLength":255},"is_dynamic":{"type":"boolean"},"search":{"nullable":true},"last_updated":{"type":"string","format":"date-time","readOnly":true},"user":{"type":"integer"},"groups":{"type":"array","items":{"type":"integer"}},"assets":{"type":"array","items":{"type":"integer"}}},"required":["id","last_updated","name","user"]}}},"paths":{"/asset/groups/{id}/":{"patch":{"operationId":"asset_groups_partial_update","description":"AssetGroup ViewSet\n\nInherits from RestrictVisibilityViewSet to restrict the visibility of the\nSearch objects based on user and group membership","parameters":[{"in":"query","name":"format","schema":{"type":"string","enum":["json","xml"]}},{"in":"path","name":"id","schema":{"type":"integer"},"description":"A unique integer value identifying this asset group.","required":true}],"tags":["asset"],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/PatchedAssetGroup"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/PatchedAssetGroup"}},"application/json":{"schema":{"$ref":"#/components/schemas/PatchedAssetGroup"}},"application/xml":{"schema":{"$ref":"#/components/schemas/PatchedAssetGroup"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetGroup"}},"application/xml":{"schema":{"$ref":"#/components/schemas/AssetGroup"}}},"description":""}}}}}}
```

## POST /asset/legacy/

> Create or partially update an asset and its inventory from the legacy XML agent payload (OCS legacy protocol).

```json
{"openapi":"3.0.3","info":{"title":"OCS Inventory Backend API References","version":"3.0.0"},"security":[{"knoxApiToken":[]}],"components":{"securitySchemes":{"knoxApiToken":{"type":"apiKey","in":"header","name":"Authorization","description":"Token-based authentication with required prefix \"Token\""}},"schemas":{"InventoryBase":{"type":"object","description":"Serializer class for Base","properties":{"id":{"type":"integer","readOnly":true},"name":{"type":"string","maxLength":50},"description":{"type":"string","nullable":true,"maxLength":255},"serial":{"type":"string","maxLength":255},"osname":{"type":"string","maxLength":255},"osversion":{"type":"string","maxLength":255},"uuid":{"type":"string","maxLength":255},"srcip":{"type":"string","maxLength":255},"srcmac":{"type":"string","maxLength":255},"domain":{"type":"string","maxLength":255},"agent":{"type":"string","maxLength":255},"template":{"type":"integer","nullable":true},"last_update":{"type":"string","format":"date-time","readOnly":true},"is_template_forced":{"type":"boolean"},"matched":{"type":"string","readOnly":true}},"required":["id","last_update","matched","name","osname","serial","uuid"]},"LegacyResponse":{"type":"object","description":"Response shape on successful legacy asset creation/update","properties":{"message":{"type":"string"},"id":{"type":"integer"}},"required":["id","message"]},"LegacyError":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}},"paths":{"/asset/legacy/":{"post":{"operationId":"asset_legacy_create","description":"Create or partially update an asset and its inventory from the legacy XML agent payload (OCS legacy protocol).","tags":["asset"],"requestBody":{"content":{"application/*":{"schema":{"$ref":"#/components/schemas/InventoryBase"}}},"required":true},"responses":{"200":{"content":{"application/xml":{"schema":{"$ref":"#/components/schemas/LegacyResponse"}}},"description":""},"201":{"content":{"application/xml":{"schema":{"$ref":"#/components/schemas/LegacyResponse"}}},"description":""},"400":{"content":{"application/xml":{"schema":{"$ref":"#/components/schemas/LegacyError"}}},"description":""},"500":{"content":{"application/xml":{"schema":{"$ref":"#/components/schemas/LegacyError"}}},"description":""}}}}}}
```

## GET /asset/logs/

> This class will define the view behavior\
> \
> Args:\
> &#x20;   viewsets (\[OCSVIewSet])

```json
{"openapi":"3.0.3","info":{"title":"OCS Inventory Backend API References","version":"3.0.0"},"security":[{"knoxApiToken":[]}],"components":{"securitySchemes":{"knoxApiToken":{"type":"apiKey","in":"header","name":"Authorization","description":"Token-based authentication with required prefix \"Token\""}},"schemas":{"PaginatedLogList":{"type":"object","required":["count","results"],"properties":{"count":{"type":"integer"},"next":{"type":"string","nullable":true,"format":"uri"},"previous":{"type":"string","nullable":true,"format":"uri"},"results":{"type":"array","items":{"$ref":"#/components/schemas/Log"}}}},"Log":{"type":"object","description":"This serialize class provide the API representation","properties":{"id":{"type":"integer","readOnly":true},"asset":{"type":"integer","nullable":true},"timestamp":{"type":"string","format":"date-time","readOnly":true},"scope":{"$ref":"#/components/schemas/ScopeEnum"},"comment":{"type":"string","maxLength":255}},"required":["comment","id","timestamp"]},"ScopeEnum":{"enum":["INVENTORY_BASE_INSERT","INVENTORY_BASE_UPDATE","INVENTORY_EXT_INSERT","INVENTORY_EXT_UPDATE","INVENTORY_BASE_ERR","INVENTORY_EXT_ERR","DEPLOYMENT_ACK","DEPLOYMENT_ERR","CONFIG_UPDATE","CONFIG_ERR","TEMPLATE_UPDATE","TEMPLATE_ERR","UNKNOWN"],"type":"string","description":"* `INVENTORY_BASE_INSERT` - Inserting new items into the base inventory\n* `INVENTORY_BASE_UPDATE` - Updating existing items in the base inventory\n* `INVENTORY_EXT_INSERT` - Inserting new items into the extended inventory\n* `INVENTORY_EXT_UPDATE` - Updating existing items in the extended inventory\n* `INVENTORY_BASE_ERR` - Error related to the base inventory operations\n* `INVENTORY_EXT_ERR` - Error related to the extended inventory operations\n* `DEPLOYMENT_ACK` - Acknowledgment of a successful deployment\n* `DEPLOYMENT_ERR` - Error during the deployment process\n* `CONFIG_UPDATE` - Updating configuration settings\n* `CONFIG_ERR` - Error related to configuration operations\n* `TEMPLATE_UPDATE` - Updating templates for a process\n* `TEMPLATE_ERR` - Error related to template operations\n* `UNKNOWN` - Unknown error happend (default)"}}},"paths":{"/asset/logs/":{"get":{"operationId":"asset_logs_list","description":"This class will define the view behavior\n\nArgs:\n    viewsets ([OCSVIewSet])","parameters":[{"in":"query","name":"asset","schema":{"type":"integer"}},{"in":"query","name":"comment","schema":{"type":"string"}},{"in":"query","name":"format","schema":{"type":"string","enum":["json","xml"]}},{"name":"limit","required":false,"in":"query","description":"Number of results to return per page.","schema":{"type":"integer"}},{"name":"offset","required":false,"in":"query","description":"The initial index from which to return the results.","schema":{"type":"integer"}},{"name":"ordering","required":false,"in":"query","description":"Which field to use when ordering the results.","schema":{"type":"string"}},{"in":"query","name":"scope","schema":{"type":"string","enum":["CONFIG_ERR","CONFIG_UPDATE","DEPLOYMENT_ACK","DEPLOYMENT_ERR","INVENTORY_BASE_ERR","INVENTORY_BASE_INSERT","INVENTORY_BASE_UPDATE","INVENTORY_EXT_ERR","INVENTORY_EXT_INSERT","INVENTORY_EXT_UPDATE","TEMPLATE_ERR","TEMPLATE_UPDATE","UNKNOWN"]},"description":"* `INVENTORY_BASE_INSERT` - Inserting new items into the base inventory\n* `INVENTORY_BASE_UPDATE` - Updating existing items in the base inventory\n* `INVENTORY_EXT_INSERT` - Inserting new items into the extended inventory\n* `INVENTORY_EXT_UPDATE` - Updating existing items in the extended inventory\n* `INVENTORY_BASE_ERR` - Error related to the base inventory operations\n* `INVENTORY_EXT_ERR` - Error related to the extended inventory operations\n* `DEPLOYMENT_ACK` - Acknowledgment of a successful deployment\n* `DEPLOYMENT_ERR` - Error during the deployment process\n* `CONFIG_UPDATE` - Updating configuration settings\n* `CONFIG_ERR` - Error related to configuration operations\n* `TEMPLATE_UPDATE` - Updating templates for a process\n* `TEMPLATE_ERR` - Error related to template operations\n* `UNKNOWN` - Unknown error happend (default)"},{"name":"search","required":false,"in":"query","description":"A search term.","schema":{"type":"string"}},{"in":"query","name":"timestamp","schema":{"type":"string","format":"date-time"}}],"tags":["asset"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedLogList"}},"application/xml":{"schema":{"$ref":"#/components/schemas/PaginatedLogList"}}},"description":""}}}}}}
```

## POST /asset/logs/

> Handle post request, suitable for single and multi creation\
> \
> Args:\
> &#x20;   request (\[dict]): can be dict or list of dicts\
> \
> Returns:\
> &#x20;   \[type]: \[description]

```json
{"openapi":"3.0.3","info":{"title":"OCS Inventory Backend API References","version":"3.0.0"},"security":[{"knoxApiToken":[]}],"components":{"securitySchemes":{"knoxApiToken":{"type":"apiKey","in":"header","name":"Authorization","description":"Token-based authentication with required prefix \"Token\""}},"schemas":{"Log":{"type":"object","description":"This serialize class provide the API representation","properties":{"id":{"type":"integer","readOnly":true},"asset":{"type":"integer","nullable":true},"timestamp":{"type":"string","format":"date-time","readOnly":true},"scope":{"$ref":"#/components/schemas/ScopeEnum"},"comment":{"type":"string","maxLength":255}},"required":["comment","id","timestamp"]},"ScopeEnum":{"enum":["INVENTORY_BASE_INSERT","INVENTORY_BASE_UPDATE","INVENTORY_EXT_INSERT","INVENTORY_EXT_UPDATE","INVENTORY_BASE_ERR","INVENTORY_EXT_ERR","DEPLOYMENT_ACK","DEPLOYMENT_ERR","CONFIG_UPDATE","CONFIG_ERR","TEMPLATE_UPDATE","TEMPLATE_ERR","UNKNOWN"],"type":"string","description":"* `INVENTORY_BASE_INSERT` - Inserting new items into the base inventory\n* `INVENTORY_BASE_UPDATE` - Updating existing items in the base inventory\n* `INVENTORY_EXT_INSERT` - Inserting new items into the extended inventory\n* `INVENTORY_EXT_UPDATE` - Updating existing items in the extended inventory\n* `INVENTORY_BASE_ERR` - Error related to the base inventory operations\n* `INVENTORY_EXT_ERR` - Error related to the extended inventory operations\n* `DEPLOYMENT_ACK` - Acknowledgment of a successful deployment\n* `DEPLOYMENT_ERR` - Error during the deployment process\n* `CONFIG_UPDATE` - Updating configuration settings\n* `CONFIG_ERR` - Error related to configuration operations\n* `TEMPLATE_UPDATE` - Updating templates for a process\n* `TEMPLATE_ERR` - Error related to template operations\n* `UNKNOWN` - Unknown error happend (default)"}}},"paths":{"/asset/logs/":{"post":{"operationId":"asset_logs_create","description":"Handle post request, suitable for single and multi creation\n\nArgs:\n    request ([dict]): can be dict or list of dicts\n\nReturns:\n    [type]: [description]","parameters":[{"in":"query","name":"format","schema":{"type":"string","enum":["json","xml"]}}],"tags":["asset"],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Log"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Log"}},"application/json":{"schema":{"$ref":"#/components/schemas/Log"}},"application/xml":{"schema":{"$ref":"#/components/schemas/Log"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Log"}},"application/xml":{"schema":{"$ref":"#/components/schemas/Log"}}},"description":""}}}}}}
```

## GET /asset/logs/{id}/

> This class will define the view behavior\
> \
> Args:\
> &#x20;   viewsets (\[OCSVIewSet])

```json
{"openapi":"3.0.3","info":{"title":"OCS Inventory Backend API References","version":"3.0.0"},"security":[{"knoxApiToken":[]}],"components":{"securitySchemes":{"knoxApiToken":{"type":"apiKey","in":"header","name":"Authorization","description":"Token-based authentication with required prefix \"Token\""}},"schemas":{"Log":{"type":"object","description":"This serialize class provide the API representation","properties":{"id":{"type":"integer","readOnly":true},"asset":{"type":"integer","nullable":true},"timestamp":{"type":"string","format":"date-time","readOnly":true},"scope":{"$ref":"#/components/schemas/ScopeEnum"},"comment":{"type":"string","maxLength":255}},"required":["comment","id","timestamp"]},"ScopeEnum":{"enum":["INVENTORY_BASE_INSERT","INVENTORY_BASE_UPDATE","INVENTORY_EXT_INSERT","INVENTORY_EXT_UPDATE","INVENTORY_BASE_ERR","INVENTORY_EXT_ERR","DEPLOYMENT_ACK","DEPLOYMENT_ERR","CONFIG_UPDATE","CONFIG_ERR","TEMPLATE_UPDATE","TEMPLATE_ERR","UNKNOWN"],"type":"string","description":"* `INVENTORY_BASE_INSERT` - Inserting new items into the base inventory\n* `INVENTORY_BASE_UPDATE` - Updating existing items in the base inventory\n* `INVENTORY_EXT_INSERT` - Inserting new items into the extended inventory\n* `INVENTORY_EXT_UPDATE` - Updating existing items in the extended inventory\n* `INVENTORY_BASE_ERR` - Error related to the base inventory operations\n* `INVENTORY_EXT_ERR` - Error related to the extended inventory operations\n* `DEPLOYMENT_ACK` - Acknowledgment of a successful deployment\n* `DEPLOYMENT_ERR` - Error during the deployment process\n* `CONFIG_UPDATE` - Updating configuration settings\n* `CONFIG_ERR` - Error related to configuration operations\n* `TEMPLATE_UPDATE` - Updating templates for a process\n* `TEMPLATE_ERR` - Error related to template operations\n* `UNKNOWN` - Unknown error happend (default)"}}},"paths":{"/asset/logs/{id}/":{"get":{"operationId":"asset_logs_retrieve","description":"This class will define the view behavior\n\nArgs:\n    viewsets ([OCSVIewSet])","parameters":[{"in":"query","name":"format","schema":{"type":"string","enum":["json","xml"]}},{"in":"path","name":"id","schema":{"type":"integer"},"description":"A unique integer value identifying this log.","required":true}],"tags":["asset"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Log"}},"application/xml":{"schema":{"$ref":"#/components/schemas/Log"}}},"description":""}}}}}}
```

## PUT /asset/logs/{id}/

> This class will define the view behavior\
> \
> Args:\
> &#x20;   viewsets (\[OCSVIewSet])

```json
{"openapi":"3.0.3","info":{"title":"OCS Inventory Backend API References","version":"3.0.0"},"security":[{"knoxApiToken":[]}],"components":{"securitySchemes":{"knoxApiToken":{"type":"apiKey","in":"header","name":"Authorization","description":"Token-based authentication with required prefix \"Token\""}},"schemas":{"Log":{"type":"object","description":"This serialize class provide the API representation","properties":{"id":{"type":"integer","readOnly":true},"asset":{"type":"integer","nullable":true},"timestamp":{"type":"string","format":"date-time","readOnly":true},"scope":{"$ref":"#/components/schemas/ScopeEnum"},"comment":{"type":"string","maxLength":255}},"required":["comment","id","timestamp"]},"ScopeEnum":{"enum":["INVENTORY_BASE_INSERT","INVENTORY_BASE_UPDATE","INVENTORY_EXT_INSERT","INVENTORY_EXT_UPDATE","INVENTORY_BASE_ERR","INVENTORY_EXT_ERR","DEPLOYMENT_ACK","DEPLOYMENT_ERR","CONFIG_UPDATE","CONFIG_ERR","TEMPLATE_UPDATE","TEMPLATE_ERR","UNKNOWN"],"type":"string","description":"* `INVENTORY_BASE_INSERT` - Inserting new items into the base inventory\n* `INVENTORY_BASE_UPDATE` - Updating existing items in the base inventory\n* `INVENTORY_EXT_INSERT` - Inserting new items into the extended inventory\n* `INVENTORY_EXT_UPDATE` - Updating existing items in the extended inventory\n* `INVENTORY_BASE_ERR` - Error related to the base inventory operations\n* `INVENTORY_EXT_ERR` - Error related to the extended inventory operations\n* `DEPLOYMENT_ACK` - Acknowledgment of a successful deployment\n* `DEPLOYMENT_ERR` - Error during the deployment process\n* `CONFIG_UPDATE` - Updating configuration settings\n* `CONFIG_ERR` - Error related to configuration operations\n* `TEMPLATE_UPDATE` - Updating templates for a process\n* `TEMPLATE_ERR` - Error related to template operations\n* `UNKNOWN` - Unknown error happend (default)"}}},"paths":{"/asset/logs/{id}/":{"put":{"operationId":"asset_logs_update","description":"This class will define the view behavior\n\nArgs:\n    viewsets ([OCSVIewSet])","parameters":[{"in":"query","name":"format","schema":{"type":"string","enum":["json","xml"]}},{"in":"path","name":"id","schema":{"type":"integer"},"description":"A unique integer value identifying this log.","required":true}],"tags":["asset"],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Log"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Log"}},"application/json":{"schema":{"$ref":"#/components/schemas/Log"}},"application/xml":{"schema":{"$ref":"#/components/schemas/Log"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Log"}},"application/xml":{"schema":{"$ref":"#/components/schemas/Log"}}},"description":""}}}}}}
```

## DELETE /asset/logs/{id}/

> This class will define the view behavior\
> \
> Args:\
> &#x20;   viewsets (\[OCSVIewSet])

```json
{"openapi":"3.0.3","info":{"title":"OCS Inventory Backend API References","version":"3.0.0"},"security":[{"knoxApiToken":[]}],"components":{"securitySchemes":{"knoxApiToken":{"type":"apiKey","in":"header","name":"Authorization","description":"Token-based authentication with required prefix \"Token\""}}},"paths":{"/asset/logs/{id}/":{"delete":{"operationId":"asset_logs_destroy","description":"This class will define the view behavior\n\nArgs:\n    viewsets ([OCSVIewSet])","parameters":[{"in":"query","name":"format","schema":{"type":"string","enum":["json","xml"]}},{"in":"path","name":"id","schema":{"type":"integer"},"description":"A unique integer value identifying this log.","required":true}],"tags":["asset"],"responses":{"204":{"description":"No response body"}}}}}}
```

## PATCH /asset/logs/{id}/

> This class will define the view behavior\
> \
> Args:\
> &#x20;   viewsets (\[OCSVIewSet])

```json
{"openapi":"3.0.3","info":{"title":"OCS Inventory Backend API References","version":"3.0.0"},"security":[{"knoxApiToken":[]}],"components":{"securitySchemes":{"knoxApiToken":{"type":"apiKey","in":"header","name":"Authorization","description":"Token-based authentication with required prefix \"Token\""}},"schemas":{"PatchedLog":{"type":"object","description":"This serialize class provide the API representation","properties":{"id":{"type":"integer","readOnly":true},"asset":{"type":"integer","nullable":true},"timestamp":{"type":"string","format":"date-time","readOnly":true},"scope":{"$ref":"#/components/schemas/ScopeEnum"},"comment":{"type":"string","maxLength":255}}},"ScopeEnum":{"enum":["INVENTORY_BASE_INSERT","INVENTORY_BASE_UPDATE","INVENTORY_EXT_INSERT","INVENTORY_EXT_UPDATE","INVENTORY_BASE_ERR","INVENTORY_EXT_ERR","DEPLOYMENT_ACK","DEPLOYMENT_ERR","CONFIG_UPDATE","CONFIG_ERR","TEMPLATE_UPDATE","TEMPLATE_ERR","UNKNOWN"],"type":"string","description":"* `INVENTORY_BASE_INSERT` - Inserting new items into the base inventory\n* `INVENTORY_BASE_UPDATE` - Updating existing items in the base inventory\n* `INVENTORY_EXT_INSERT` - Inserting new items into the extended inventory\n* `INVENTORY_EXT_UPDATE` - Updating existing items in the extended inventory\n* `INVENTORY_BASE_ERR` - Error related to the base inventory operations\n* `INVENTORY_EXT_ERR` - Error related to the extended inventory operations\n* `DEPLOYMENT_ACK` - Acknowledgment of a successful deployment\n* `DEPLOYMENT_ERR` - Error during the deployment process\n* `CONFIG_UPDATE` - Updating configuration settings\n* `CONFIG_ERR` - Error related to configuration operations\n* `TEMPLATE_UPDATE` - Updating templates for a process\n* `TEMPLATE_ERR` - Error related to template operations\n* `UNKNOWN` - Unknown error happend (default)"},"Log":{"type":"object","description":"This serialize class provide the API representation","properties":{"id":{"type":"integer","readOnly":true},"asset":{"type":"integer","nullable":true},"timestamp":{"type":"string","format":"date-time","readOnly":true},"scope":{"$ref":"#/components/schemas/ScopeEnum"},"comment":{"type":"string","maxLength":255}},"required":["comment","id","timestamp"]}}},"paths":{"/asset/logs/{id}/":{"patch":{"operationId":"asset_logs_partial_update","description":"This class will define the view behavior\n\nArgs:\n    viewsets ([OCSVIewSet])","parameters":[{"in":"query","name":"format","schema":{"type":"string","enum":["json","xml"]}},{"in":"path","name":"id","schema":{"type":"integer"},"description":"A unique integer value identifying this log.","required":true}],"tags":["asset"],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/PatchedLog"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/PatchedLog"}},"application/json":{"schema":{"$ref":"#/components/schemas/PatchedLog"}},"application/xml":{"schema":{"$ref":"#/components/schemas/PatchedLog"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Log"}},"application/xml":{"schema":{"$ref":"#/components/schemas/Log"}}},"description":""}}}}}}
```

## POST /asset/reconciliation/

> Check whether an asset exists based on reconciliation criteria. Returns {'id': asset\_id} if found, else {'id': False}.

```json
{"openapi":"3.0.3","info":{"title":"OCS Inventory Backend API References","version":"3.0.0"},"security":[{"knoxApiToken":[]}],"components":{"securitySchemes":{"knoxApiToken":{"type":"apiKey","in":"header","name":"Authorization","description":"Token-based authentication with required prefix \"Token\""}},"schemas":{"ReconciliationResponse":{"type":"object","description":"id: the matched asset's id, or False if no asset matched","properties":{"id":{}},"required":["id"]},"ReconciliationError":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}},"paths":{"/asset/reconciliation/":{"post":{"operationId":"asset_reconciliation_create","description":"Check whether an asset exists based on reconciliation criteria. Returns {'id': asset_id} if found, else {'id': False}.","parameters":[{"in":"query","name":"format","schema":{"type":"string","enum":["json","xml"]}}],"tags":["asset"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReconciliationResponse"}},"application/xml":{"schema":{"$ref":"#/components/schemas/ReconciliationResponse"}}},"description":""},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReconciliationError"}},"application/xml":{"schema":{"$ref":"#/components/schemas/ReconciliationError"}}},"description":""}}}}}}
```

## GET /asset/sections/

> Inventory Section ViewSet\
> \
> Args:\
> &#x20;   viewsets (\[OCSVIewSet])

```json
{"openapi":"3.0.3","info":{"title":"OCS Inventory Backend API References","version":"3.0.0"},"security":[{"knoxApiToken":[]}],"components":{"securitySchemes":{"knoxApiToken":{"type":"apiKey","in":"header","name":"Authorization","description":"Token-based authentication with required prefix \"Token\""}},"schemas":{"PaginatedInventorySectionList":{"type":"object","required":["count","results"],"properties":{"count":{"type":"integer"},"next":{"type":"string","nullable":true,"format":"uri"},"previous":{"type":"string","nullable":true,"format":"uri"},"results":{"type":"array","items":{"$ref":"#/components/schemas/InventorySection"}}}},"InventorySection":{"type":"object","description":"Serializer class for InventorySection","properties":{"id":{"type":"integer","readOnly":true},"base":{"type":"integer"},"template_section":{"type":"integer"},"fields":{"type":"array","items":{"type":"integer"}}},"required":["base","fields","id","template_section"]}}},"paths":{"/asset/sections/":{"get":{"operationId":"asset_sections_list","description":"Inventory Section ViewSet\n\nArgs:\n    viewsets ([OCSVIewSet])","parameters":[{"in":"query","name":"base","schema":{"type":"integer"}},{"in":"query","name":"format","schema":{"type":"string","enum":["json","xml"]}},{"in":"query","name":"id","schema":{"type":"integer"}},{"name":"limit","required":false,"in":"query","description":"Number of results to return per page.","schema":{"type":"integer"}},{"name":"offset","required":false,"in":"query","description":"The initial index from which to return the results.","schema":{"type":"integer"}},{"name":"ordering","required":false,"in":"query","description":"Which field to use when ordering the results.","schema":{"type":"string"}},{"name":"search","required":false,"in":"query","description":"A search term.","schema":{"type":"string"}},{"in":"query","name":"template_section","schema":{"type":"integer"}}],"tags":["asset"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedInventorySectionList"}},"application/xml":{"schema":{"$ref":"#/components/schemas/PaginatedInventorySectionList"}}},"description":""}}}}}}
```

## POST /asset/sections/

> Handle post request, suitable for single and multi creation\
> \
> Args:\
> &#x20;   request (\[dict]): can be dict or list of dicts\
> \
> Returns:\
> &#x20;   \[type]: \[description]

```json
{"openapi":"3.0.3","info":{"title":"OCS Inventory Backend API References","version":"3.0.0"},"security":[{"knoxApiToken":[]}],"components":{"securitySchemes":{"knoxApiToken":{"type":"apiKey","in":"header","name":"Authorization","description":"Token-based authentication with required prefix \"Token\""}},"schemas":{"InventorySection":{"type":"object","description":"Serializer class for InventorySection","properties":{"id":{"type":"integer","readOnly":true},"base":{"type":"integer"},"template_section":{"type":"integer"},"fields":{"type":"array","items":{"type":"integer"}}},"required":["base","fields","id","template_section"]}}},"paths":{"/asset/sections/":{"post":{"operationId":"asset_sections_create","description":"Handle post request, suitable for single and multi creation\n\nArgs:\n    request ([dict]): can be dict or list of dicts\n\nReturns:\n    [type]: [description]","parameters":[{"in":"query","name":"format","schema":{"type":"string","enum":["json","xml"]}}],"tags":["asset"],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/InventorySection"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/InventorySection"}},"application/json":{"schema":{"$ref":"#/components/schemas/InventorySection"}},"application/xml":{"schema":{"$ref":"#/components/schemas/InventorySection"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InventorySection"}},"application/xml":{"schema":{"$ref":"#/components/schemas/InventorySection"}}},"description":""}}}}}}
```

## GET /asset/sections/{id}/

> Inventory Section ViewSet\
> \
> Args:\
> &#x20;   viewsets (\[OCSVIewSet])

```json
{"openapi":"3.0.3","info":{"title":"OCS Inventory Backend API References","version":"3.0.0"},"security":[{"knoxApiToken":[]}],"components":{"securitySchemes":{"knoxApiToken":{"type":"apiKey","in":"header","name":"Authorization","description":"Token-based authentication with required prefix \"Token\""}},"schemas":{"InventorySection":{"type":"object","description":"Serializer class for InventorySection","properties":{"id":{"type":"integer","readOnly":true},"base":{"type":"integer"},"template_section":{"type":"integer"},"fields":{"type":"array","items":{"type":"integer"}}},"required":["base","fields","id","template_section"]}}},"paths":{"/asset/sections/{id}/":{"get":{"operationId":"asset_sections_retrieve","description":"Inventory Section ViewSet\n\nArgs:\n    viewsets ([OCSVIewSet])","parameters":[{"in":"query","name":"format","schema":{"type":"string","enum":["json","xml"]}},{"in":"path","name":"id","schema":{"type":"integer"},"description":"A unique integer value identifying this inventory section.","required":true}],"tags":["asset"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InventorySection"}},"application/xml":{"schema":{"$ref":"#/components/schemas/InventorySection"}}},"description":""}}}}}}
```

## PUT /asset/sections/{id}/

> Inventory Section ViewSet\
> \
> Args:\
> &#x20;   viewsets (\[OCSVIewSet])

```json
{"openapi":"3.0.3","info":{"title":"OCS Inventory Backend API References","version":"3.0.0"},"security":[{"knoxApiToken":[]}],"components":{"securitySchemes":{"knoxApiToken":{"type":"apiKey","in":"header","name":"Authorization","description":"Token-based authentication with required prefix \"Token\""}},"schemas":{"InventorySection":{"type":"object","description":"Serializer class for InventorySection","properties":{"id":{"type":"integer","readOnly":true},"base":{"type":"integer"},"template_section":{"type":"integer"},"fields":{"type":"array","items":{"type":"integer"}}},"required":["base","fields","id","template_section"]}}},"paths":{"/asset/sections/{id}/":{"put":{"operationId":"asset_sections_update","description":"Inventory Section ViewSet\n\nArgs:\n    viewsets ([OCSVIewSet])","parameters":[{"in":"query","name":"format","schema":{"type":"string","enum":["json","xml"]}},{"in":"path","name":"id","schema":{"type":"integer"},"description":"A unique integer value identifying this inventory section.","required":true}],"tags":["asset"],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/InventorySection"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/InventorySection"}},"application/json":{"schema":{"$ref":"#/components/schemas/InventorySection"}},"application/xml":{"schema":{"$ref":"#/components/schemas/InventorySection"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InventorySection"}},"application/xml":{"schema":{"$ref":"#/components/schemas/InventorySection"}}},"description":""}}}}}}
```

## DELETE /asset/sections/{id}/

> Inventory Section ViewSet\
> \
> Args:\
> &#x20;   viewsets (\[OCSVIewSet])

```json
{"openapi":"3.0.3","info":{"title":"OCS Inventory Backend API References","version":"3.0.0"},"security":[{"knoxApiToken":[]}],"components":{"securitySchemes":{"knoxApiToken":{"type":"apiKey","in":"header","name":"Authorization","description":"Token-based authentication with required prefix \"Token\""}}},"paths":{"/asset/sections/{id}/":{"delete":{"operationId":"asset_sections_destroy","description":"Inventory Section ViewSet\n\nArgs:\n    viewsets ([OCSVIewSet])","parameters":[{"in":"query","name":"format","schema":{"type":"string","enum":["json","xml"]}},{"in":"path","name":"id","schema":{"type":"integer"},"description":"A unique integer value identifying this inventory section.","required":true}],"tags":["asset"],"responses":{"204":{"description":"No response body"}}}}}}
```

## PATCH /asset/sections/{id}/

> Inventory Section ViewSet\
> \
> Args:\
> &#x20;   viewsets (\[OCSVIewSet])

```json
{"openapi":"3.0.3","info":{"title":"OCS Inventory Backend API References","version":"3.0.0"},"security":[{"knoxApiToken":[]}],"components":{"securitySchemes":{"knoxApiToken":{"type":"apiKey","in":"header","name":"Authorization","description":"Token-based authentication with required prefix \"Token\""}},"schemas":{"PatchedInventorySection":{"type":"object","description":"Serializer class for InventorySection","properties":{"id":{"type":"integer","readOnly":true},"base":{"type":"integer"},"template_section":{"type":"integer"},"fields":{"type":"array","items":{"type":"integer"}}}},"InventorySection":{"type":"object","description":"Serializer class for InventorySection","properties":{"id":{"type":"integer","readOnly":true},"base":{"type":"integer"},"template_section":{"type":"integer"},"fields":{"type":"array","items":{"type":"integer"}}},"required":["base","fields","id","template_section"]}}},"paths":{"/asset/sections/{id}/":{"patch":{"operationId":"asset_sections_partial_update","description":"Inventory Section ViewSet\n\nArgs:\n    viewsets ([OCSVIewSet])","parameters":[{"in":"query","name":"format","schema":{"type":"string","enum":["json","xml"]}},{"in":"path","name":"id","schema":{"type":"integer"},"description":"A unique integer value identifying this inventory section.","required":true}],"tags":["asset"],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/PatchedInventorySection"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/PatchedInventorySection"}},"application/json":{"schema":{"$ref":"#/components/schemas/PatchedInventorySection"}},"application/xml":{"schema":{"$ref":"#/components/schemas/PatchedInventorySection"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InventorySection"}},"application/xml":{"schema":{"$ref":"#/components/schemas/InventorySection"}}},"description":""}}}}}}
```


---

# 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://documentation.ocsinventory-ng.org/open-api-reference/asset.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.
