> 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/deployment.md).

# Deployment

## GET /deployment/actions/

> 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":{"PaginatedActionList":{"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/Action"}}}},"Action":{"type":"object","description":"This serialize class provide the API representation","properties":{"id":{"type":"integer","readOnly":true},"rule":{"type":"integer","nullable":true},"priority":{"type":"integer"},"action":{"$ref":"#/components/schemas/ActionEnum"},"content_type":{"type":"integer","nullable":true},"object_id":{"type":"integer","maximum":9223372036854776000,"minimum":0,"format":"int64","nullable":true},"object_slug":{"type":"string","nullable":true,"maxLength":100},"field":{"type":"string","maxLength":255},"value":{}},"required":["action","field","id","value"]},"ActionEnum":{"enum":["set"],"type":"string","description":"* `set` - Set"}}},"paths":{"/deployment/actions/":{"get":{"operationId":"deployment_actions_list","description":"View behavior\n\nArgs:\n    viewsets ([OCSVIewSet])","parameters":[{"in":"query","name":"action_type","schema":{"type":"string"}},{"in":"query","name":"command","schema":{"type":"string"}},{"in":"query","name":"date_created","schema":{"type":"string","format":"date-time"}},{"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"}},{"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":"package","schema":{"type":"integer"}},{"in":"query","name":"priority","schema":{"type":"integer"}},{"name":"search","required":false,"in":"query","description":"A search term.","schema":{"type":"string"}}],"tags":["deployment"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedActionList"}},"application/xml":{"schema":{"$ref":"#/components/schemas/PaginatedActionList"}}},"description":""}}}}}}
```

## POST /deployment/actions/

> 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":{"Action":{"type":"object","description":"This serialize class provide the API representation","properties":{"id":{"type":"integer","readOnly":true},"rule":{"type":"integer","nullable":true},"priority":{"type":"integer"},"action":{"$ref":"#/components/schemas/ActionEnum"},"content_type":{"type":"integer","nullable":true},"object_id":{"type":"integer","maximum":9223372036854776000,"minimum":0,"format":"int64","nullable":true},"object_slug":{"type":"string","nullable":true,"maxLength":100},"field":{"type":"string","maxLength":255},"value":{}},"required":["action","field","id","value"]},"ActionEnum":{"enum":["set"],"type":"string","description":"* `set` - Set"}}},"paths":{"/deployment/actions/":{"post":{"operationId":"deployment_actions_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":["deployment"],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Action"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Action"}},"application/json":{"schema":{"$ref":"#/components/schemas/Action"}},"application/xml":{"schema":{"$ref":"#/components/schemas/Action"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Action"}},"application/xml":{"schema":{"$ref":"#/components/schemas/Action"}}},"description":""}}}}}}
```

## GET /deployment/actions/{id}/

> 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":{"Action":{"type":"object","description":"This serialize class provide the API representation","properties":{"id":{"type":"integer","readOnly":true},"rule":{"type":"integer","nullable":true},"priority":{"type":"integer"},"action":{"$ref":"#/components/schemas/ActionEnum"},"content_type":{"type":"integer","nullable":true},"object_id":{"type":"integer","maximum":9223372036854776000,"minimum":0,"format":"int64","nullable":true},"object_slug":{"type":"string","nullable":true,"maxLength":100},"field":{"type":"string","maxLength":255},"value":{}},"required":["action","field","id","value"]},"ActionEnum":{"enum":["set"],"type":"string","description":"* `set` - Set"}}},"paths":{"/deployment/actions/{id}/":{"get":{"operationId":"deployment_actions_retrieve","description":"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 deployment action.","required":true}],"tags":["deployment"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Action"}},"application/xml":{"schema":{"$ref":"#/components/schemas/Action"}}},"description":""}}}}}}
```

## PUT /deployment/actions/{id}/

> 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":{"Action":{"type":"object","description":"This serialize class provide the API representation","properties":{"id":{"type":"integer","readOnly":true},"rule":{"type":"integer","nullable":true},"priority":{"type":"integer"},"action":{"$ref":"#/components/schemas/ActionEnum"},"content_type":{"type":"integer","nullable":true},"object_id":{"type":"integer","maximum":9223372036854776000,"minimum":0,"format":"int64","nullable":true},"object_slug":{"type":"string","nullable":true,"maxLength":100},"field":{"type":"string","maxLength":255},"value":{}},"required":["action","field","id","value"]},"ActionEnum":{"enum":["set"],"type":"string","description":"* `set` - Set"}}},"paths":{"/deployment/actions/{id}/":{"put":{"operationId":"deployment_actions_update","description":"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 deployment action.","required":true}],"tags":["deployment"],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Action"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Action"}},"application/json":{"schema":{"$ref":"#/components/schemas/Action"}},"application/xml":{"schema":{"$ref":"#/components/schemas/Action"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Action"}},"application/xml":{"schema":{"$ref":"#/components/schemas/Action"}}},"description":""}}}}}}
```

## DELETE /deployment/actions/{id}/

> 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":{"/deployment/actions/{id}/":{"delete":{"operationId":"deployment_actions_destroy","description":"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 deployment action.","required":true}],"tags":["deployment"],"responses":{"204":{"description":"No response body"}}}}}}
```

## PATCH /deployment/actions/{id}/

> 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":{"PatchedAction":{"type":"object","description":"This serialize class provide the API representation","properties":{"id":{"type":"integer","readOnly":true},"rule":{"type":"integer","nullable":true},"priority":{"type":"integer"},"action":{"$ref":"#/components/schemas/ActionEnum"},"content_type":{"type":"integer","nullable":true},"object_id":{"type":"integer","maximum":9223372036854776000,"minimum":0,"format":"int64","nullable":true},"object_slug":{"type":"string","nullable":true,"maxLength":100},"field":{"type":"string","maxLength":255},"value":{}}},"ActionEnum":{"enum":["set"],"type":"string","description":"* `set` - Set"},"Action":{"type":"object","description":"This serialize class provide the API representation","properties":{"id":{"type":"integer","readOnly":true},"rule":{"type":"integer","nullable":true},"priority":{"type":"integer"},"action":{"$ref":"#/components/schemas/ActionEnum"},"content_type":{"type":"integer","nullable":true},"object_id":{"type":"integer","maximum":9223372036854776000,"minimum":0,"format":"int64","nullable":true},"object_slug":{"type":"string","nullable":true,"maxLength":100},"field":{"type":"string","maxLength":255},"value":{}},"required":["action","field","id","value"]}}},"paths":{"/deployment/actions/{id}/":{"patch":{"operationId":"deployment_actions_partial_update","description":"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 deployment action.","required":true}],"tags":["deployment"],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/PatchedAction"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/PatchedAction"}},"application/json":{"schema":{"$ref":"#/components/schemas/PatchedAction"}},"application/xml":{"schema":{"$ref":"#/components/schemas/PatchedAction"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Action"}},"application/xml":{"schema":{"$ref":"#/components/schemas/Action"}}},"description":""}}}}}}
```

## GET /deployment/packages/

> 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":{"PaginatedPackageList":{"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/Package"}}}},"Package":{"type":"object","description":"This serializer class provides the API representation","properties":{"id":{"type":"integer","readOnly":true},"name":{"type":"string","maxLength":128},"description":{"type":"string"},"date_created":{"type":"string","format":"date-time","readOnly":true},"target_os":{"$ref":"#/components/schemas/TargetOsEnum"},"actions_list":{"type":"array","items":{"$ref":"#/components/schemas/Action"}},"result":{"type":"array","items":{"$ref":"#/components/schemas/Result"}}},"required":["actions_list","date_created","description","id","name","result"]},"TargetOsEnum":{"enum":["WIN","LIN","MAC"],"type":"string","description":"* `WIN` - Windows\n* `LIN` - Linux\n* `MAC` - Mac"},"Action":{"type":"object","description":"This serialize class provide the API representation","properties":{"id":{"type":"integer","readOnly":true},"rule":{"type":"integer","nullable":true},"priority":{"type":"integer"},"action":{"$ref":"#/components/schemas/ActionEnum"},"content_type":{"type":"integer","nullable":true},"object_id":{"type":"integer","maximum":9223372036854776000,"minimum":0,"format":"int64","nullable":true},"object_slug":{"type":"string","nullable":true,"maxLength":100},"field":{"type":"string","maxLength":255},"value":{}},"required":["action","field","id","value"]},"ActionEnum":{"enum":["set"],"type":"string","description":"* `set` - Set"},"Result":{"type":"object","description":"This serializer class provides the API representation","properties":{"id":{"type":"integer","readOnly":true},"package":{"type":"integer","nullable":true},"asset":{"type":"integer","nullable":true},"group":{"type":"integer","nullable":true},"name":{"type":"string","maxLength":128},"status":{"allOf":[{"$ref":"#/components/schemas/ResultStatusEnum"}],"minimum":-9223372036854776000,"maximum":9223372036854776000},"comment":{"type":"string","nullable":true},"date_created":{"type":"string","format":"date-time","readOnly":true}},"required":["asset","date_created","group","id","name"]},"ResultStatusEnum":{"enum":[0,1,2,3],"type":"integer","description":"* `0` - Sucess\n* `1` - Waiting notification\n* `2` - Notified\n* `3` - Error"}}},"paths":{"/deployment/packages/":{"get":{"operationId":"deployment_packages_list","description":"View behavior\n\nArgs:\n    viewsets ([OCSVIewSet])","parameters":[{"in":"query","name":"date_created","schema":{"type":"string","format":"date-time"}},{"in":"query","name":"description","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"}},{"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"}},{"in":"query","name":"target_os","schema":{"type":"string","enum":["LIN","MAC","WIN"]},"description":"* `WIN` - Windows\n* `LIN` - Linux\n* `MAC` - Mac"}],"tags":["deployment"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedPackageList"}},"application/xml":{"schema":{"$ref":"#/components/schemas/PaginatedPackageList"}}},"description":""}}}}}}
```

## POST /deployment/packages/

> 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":{"Package":{"type":"object","description":"This serializer class provides the API representation","properties":{"id":{"type":"integer","readOnly":true},"name":{"type":"string","maxLength":128},"description":{"type":"string"},"date_created":{"type":"string","format":"date-time","readOnly":true},"target_os":{"$ref":"#/components/schemas/TargetOsEnum"},"actions_list":{"type":"array","items":{"$ref":"#/components/schemas/Action"}},"result":{"type":"array","items":{"$ref":"#/components/schemas/Result"}}},"required":["actions_list","date_created","description","id","name","result"]},"TargetOsEnum":{"enum":["WIN","LIN","MAC"],"type":"string","description":"* `WIN` - Windows\n* `LIN` - Linux\n* `MAC` - Mac"},"Action":{"type":"object","description":"This serialize class provide the API representation","properties":{"id":{"type":"integer","readOnly":true},"rule":{"type":"integer","nullable":true},"priority":{"type":"integer"},"action":{"$ref":"#/components/schemas/ActionEnum"},"content_type":{"type":"integer","nullable":true},"object_id":{"type":"integer","maximum":9223372036854776000,"minimum":0,"format":"int64","nullable":true},"object_slug":{"type":"string","nullable":true,"maxLength":100},"field":{"type":"string","maxLength":255},"value":{}},"required":["action","field","id","value"]},"ActionEnum":{"enum":["set"],"type":"string","description":"* `set` - Set"},"Result":{"type":"object","description":"This serializer class provides the API representation","properties":{"id":{"type":"integer","readOnly":true},"package":{"type":"integer","nullable":true},"asset":{"type":"integer","nullable":true},"group":{"type":"integer","nullable":true},"name":{"type":"string","maxLength":128},"status":{"allOf":[{"$ref":"#/components/schemas/ResultStatusEnum"}],"minimum":-9223372036854776000,"maximum":9223372036854776000},"comment":{"type":"string","nullable":true},"date_created":{"type":"string","format":"date-time","readOnly":true}},"required":["asset","date_created","group","id","name"]},"ResultStatusEnum":{"enum":[0,1,2,3],"type":"integer","description":"* `0` - Sucess\n* `1` - Waiting notification\n* `2` - Notified\n* `3` - Error"}}},"paths":{"/deployment/packages/":{"post":{"operationId":"deployment_packages_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":["deployment"],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Package"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Package"}},"application/json":{"schema":{"$ref":"#/components/schemas/Package"}},"application/xml":{"schema":{"$ref":"#/components/schemas/Package"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Package"}},"application/xml":{"schema":{"$ref":"#/components/schemas/Package"}}},"description":""}}}}}}
```

## GET /deployment/packages/{id}/

> 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":{"Package":{"type":"object","description":"This serializer class provides the API representation","properties":{"id":{"type":"integer","readOnly":true},"name":{"type":"string","maxLength":128},"description":{"type":"string"},"date_created":{"type":"string","format":"date-time","readOnly":true},"target_os":{"$ref":"#/components/schemas/TargetOsEnum"},"actions_list":{"type":"array","items":{"$ref":"#/components/schemas/Action"}},"result":{"type":"array","items":{"$ref":"#/components/schemas/Result"}}},"required":["actions_list","date_created","description","id","name","result"]},"TargetOsEnum":{"enum":["WIN","LIN","MAC"],"type":"string","description":"* `WIN` - Windows\n* `LIN` - Linux\n* `MAC` - Mac"},"Action":{"type":"object","description":"This serialize class provide the API representation","properties":{"id":{"type":"integer","readOnly":true},"rule":{"type":"integer","nullable":true},"priority":{"type":"integer"},"action":{"$ref":"#/components/schemas/ActionEnum"},"content_type":{"type":"integer","nullable":true},"object_id":{"type":"integer","maximum":9223372036854776000,"minimum":0,"format":"int64","nullable":true},"object_slug":{"type":"string","nullable":true,"maxLength":100},"field":{"type":"string","maxLength":255},"value":{}},"required":["action","field","id","value"]},"ActionEnum":{"enum":["set"],"type":"string","description":"* `set` - Set"},"Result":{"type":"object","description":"This serializer class provides the API representation","properties":{"id":{"type":"integer","readOnly":true},"package":{"type":"integer","nullable":true},"asset":{"type":"integer","nullable":true},"group":{"type":"integer","nullable":true},"name":{"type":"string","maxLength":128},"status":{"allOf":[{"$ref":"#/components/schemas/ResultStatusEnum"}],"minimum":-9223372036854776000,"maximum":9223372036854776000},"comment":{"type":"string","nullable":true},"date_created":{"type":"string","format":"date-time","readOnly":true}},"required":["asset","date_created","group","id","name"]},"ResultStatusEnum":{"enum":[0,1,2,3],"type":"integer","description":"* `0` - Sucess\n* `1` - Waiting notification\n* `2` - Notified\n* `3` - Error"}}},"paths":{"/deployment/packages/{id}/":{"get":{"operationId":"deployment_packages_retrieve","description":"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 package.","required":true}],"tags":["deployment"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Package"}},"application/xml":{"schema":{"$ref":"#/components/schemas/Package"}}},"description":""}}}}}}
```

## PUT /deployment/packages/{id}/

> 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":{"Package":{"type":"object","description":"This serializer class provides the API representation","properties":{"id":{"type":"integer","readOnly":true},"name":{"type":"string","maxLength":128},"description":{"type":"string"},"date_created":{"type":"string","format":"date-time","readOnly":true},"target_os":{"$ref":"#/components/schemas/TargetOsEnum"},"actions_list":{"type":"array","items":{"$ref":"#/components/schemas/Action"}},"result":{"type":"array","items":{"$ref":"#/components/schemas/Result"}}},"required":["actions_list","date_created","description","id","name","result"]},"TargetOsEnum":{"enum":["WIN","LIN","MAC"],"type":"string","description":"* `WIN` - Windows\n* `LIN` - Linux\n* `MAC` - Mac"},"Action":{"type":"object","description":"This serialize class provide the API representation","properties":{"id":{"type":"integer","readOnly":true},"rule":{"type":"integer","nullable":true},"priority":{"type":"integer"},"action":{"$ref":"#/components/schemas/ActionEnum"},"content_type":{"type":"integer","nullable":true},"object_id":{"type":"integer","maximum":9223372036854776000,"minimum":0,"format":"int64","nullable":true},"object_slug":{"type":"string","nullable":true,"maxLength":100},"field":{"type":"string","maxLength":255},"value":{}},"required":["action","field","id","value"]},"ActionEnum":{"enum":["set"],"type":"string","description":"* `set` - Set"},"Result":{"type":"object","description":"This serializer class provides the API representation","properties":{"id":{"type":"integer","readOnly":true},"package":{"type":"integer","nullable":true},"asset":{"type":"integer","nullable":true},"group":{"type":"integer","nullable":true},"name":{"type":"string","maxLength":128},"status":{"allOf":[{"$ref":"#/components/schemas/ResultStatusEnum"}],"minimum":-9223372036854776000,"maximum":9223372036854776000},"comment":{"type":"string","nullable":true},"date_created":{"type":"string","format":"date-time","readOnly":true}},"required":["asset","date_created","group","id","name"]},"ResultStatusEnum":{"enum":[0,1,2,3],"type":"integer","description":"* `0` - Sucess\n* `1` - Waiting notification\n* `2` - Notified\n* `3` - Error"}}},"paths":{"/deployment/packages/{id}/":{"put":{"operationId":"deployment_packages_update","description":"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 package.","required":true}],"tags":["deployment"],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Package"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Package"}},"application/json":{"schema":{"$ref":"#/components/schemas/Package"}},"application/xml":{"schema":{"$ref":"#/components/schemas/Package"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Package"}},"application/xml":{"schema":{"$ref":"#/components/schemas/Package"}}},"description":""}}}}}}
```

## DELETE /deployment/packages/{id}/

> 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":{"/deployment/packages/{id}/":{"delete":{"operationId":"deployment_packages_destroy","description":"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 package.","required":true}],"tags":["deployment"],"responses":{"204":{"description":"No response body"}}}}}}
```

## PATCH /deployment/packages/{id}/

> 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":{"PatchedPackage":{"type":"object","description":"This serializer class provides the API representation","properties":{"id":{"type":"integer","readOnly":true},"name":{"type":"string","maxLength":128},"description":{"type":"string"},"date_created":{"type":"string","format":"date-time","readOnly":true},"target_os":{"$ref":"#/components/schemas/TargetOsEnum"},"actions_list":{"type":"array","items":{"$ref":"#/components/schemas/Action"}},"result":{"type":"array","items":{"$ref":"#/components/schemas/Result"}}}},"TargetOsEnum":{"enum":["WIN","LIN","MAC"],"type":"string","description":"* `WIN` - Windows\n* `LIN` - Linux\n* `MAC` - Mac"},"Action":{"type":"object","description":"This serialize class provide the API representation","properties":{"id":{"type":"integer","readOnly":true},"rule":{"type":"integer","nullable":true},"priority":{"type":"integer"},"action":{"$ref":"#/components/schemas/ActionEnum"},"content_type":{"type":"integer","nullable":true},"object_id":{"type":"integer","maximum":9223372036854776000,"minimum":0,"format":"int64","nullable":true},"object_slug":{"type":"string","nullable":true,"maxLength":100},"field":{"type":"string","maxLength":255},"value":{}},"required":["action","field","id","value"]},"ActionEnum":{"enum":["set"],"type":"string","description":"* `set` - Set"},"Result":{"type":"object","description":"This serializer class provides the API representation","properties":{"id":{"type":"integer","readOnly":true},"package":{"type":"integer","nullable":true},"asset":{"type":"integer","nullable":true},"group":{"type":"integer","nullable":true},"name":{"type":"string","maxLength":128},"status":{"allOf":[{"$ref":"#/components/schemas/ResultStatusEnum"}],"minimum":-9223372036854776000,"maximum":9223372036854776000},"comment":{"type":"string","nullable":true},"date_created":{"type":"string","format":"date-time","readOnly":true}},"required":["asset","date_created","group","id","name"]},"ResultStatusEnum":{"enum":[0,1,2,3],"type":"integer","description":"* `0` - Sucess\n* `1` - Waiting notification\n* `2` - Notified\n* `3` - Error"},"Package":{"type":"object","description":"This serializer class provides the API representation","properties":{"id":{"type":"integer","readOnly":true},"name":{"type":"string","maxLength":128},"description":{"type":"string"},"date_created":{"type":"string","format":"date-time","readOnly":true},"target_os":{"$ref":"#/components/schemas/TargetOsEnum"},"actions_list":{"type":"array","items":{"$ref":"#/components/schemas/Action"}},"result":{"type":"array","items":{"$ref":"#/components/schemas/Result"}}},"required":["actions_list","date_created","description","id","name","result"]}}},"paths":{"/deployment/packages/{id}/":{"patch":{"operationId":"deployment_packages_partial_update","description":"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 package.","required":true}],"tags":["deployment"],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/PatchedPackage"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/PatchedPackage"}},"application/json":{"schema":{"$ref":"#/components/schemas/PatchedPackage"}},"application/xml":{"schema":{"$ref":"#/components/schemas/PatchedPackage"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Package"}},"application/xml":{"schema":{"$ref":"#/components/schemas/Package"}}},"description":""}}}}}}
```

## GET /deployment/results/

> 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":{"PaginatedResultList":{"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/Result"}}}},"Result":{"type":"object","description":"This serializer class provides the API representation","properties":{"id":{"type":"integer","readOnly":true},"package":{"type":"integer","nullable":true},"asset":{"type":"integer","nullable":true},"group":{"type":"integer","nullable":true},"name":{"type":"string","maxLength":128},"status":{"allOf":[{"$ref":"#/components/schemas/ResultStatusEnum"}],"minimum":-9223372036854776000,"maximum":9223372036854776000},"comment":{"type":"string","nullable":true},"date_created":{"type":"string","format":"date-time","readOnly":true}},"required":["asset","date_created","group","id","name"]},"ResultStatusEnum":{"enum":[0,1,2,3],"type":"integer","description":"* `0` - Sucess\n* `1` - Waiting notification\n* `2` - Notified\n* `3` - Error"}}},"paths":{"/deployment/results/":{"get":{"operationId":"deployment_results_list","description":"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":"date_created","schema":{"type":"string","format":"date-time"}},{"in":"query","name":"format","schema":{"type":"string","enum":["json","xml"]}},{"in":"query","name":"group","schema":{"type":"integer"}},{"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":"package","schema":{"type":"integer"}},{"name":"search","required":false,"in":"query","description":"A search term.","schema":{"type":"string"}},{"in":"query","name":"status","schema":{"type":"integer","enum":[0,1,2,3]},"description":"* `0` - Sucess\n* `1` - Waiting notification\n* `2` - Notified\n* `3` - Error"}],"tags":["deployment"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResultList"}},"application/xml":{"schema":{"$ref":"#/components/schemas/PaginatedResultList"}}},"description":""}}}}}}
```

## POST /deployment/results/

> 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":{"Result":{"type":"object","description":"This serializer class provides the API representation","properties":{"id":{"type":"integer","readOnly":true},"package":{"type":"integer","nullable":true},"asset":{"type":"integer","nullable":true},"group":{"type":"integer","nullable":true},"name":{"type":"string","maxLength":128},"status":{"allOf":[{"$ref":"#/components/schemas/ResultStatusEnum"}],"minimum":-9223372036854776000,"maximum":9223372036854776000},"comment":{"type":"string","nullable":true},"date_created":{"type":"string","format":"date-time","readOnly":true}},"required":["asset","date_created","group","id","name"]},"ResultStatusEnum":{"enum":[0,1,2,3],"type":"integer","description":"* `0` - Sucess\n* `1` - Waiting notification\n* `2` - Notified\n* `3` - Error"}}},"paths":{"/deployment/results/":{"post":{"operationId":"deployment_results_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":["deployment"],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Result"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Result"}},"application/json":{"schema":{"$ref":"#/components/schemas/Result"}},"application/xml":{"schema":{"$ref":"#/components/schemas/Result"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}},"application/xml":{"schema":{"$ref":"#/components/schemas/Result"}}},"description":""}}}}}}
```

## GET /deployment/results/{id}/

> 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":{"Result":{"type":"object","description":"This serializer class provides the API representation","properties":{"id":{"type":"integer","readOnly":true},"package":{"type":"integer","nullable":true},"asset":{"type":"integer","nullable":true},"group":{"type":"integer","nullable":true},"name":{"type":"string","maxLength":128},"status":{"allOf":[{"$ref":"#/components/schemas/ResultStatusEnum"}],"minimum":-9223372036854776000,"maximum":9223372036854776000},"comment":{"type":"string","nullable":true},"date_created":{"type":"string","format":"date-time","readOnly":true}},"required":["asset","date_created","group","id","name"]},"ResultStatusEnum":{"enum":[0,1,2,3],"type":"integer","description":"* `0` - Sucess\n* `1` - Waiting notification\n* `2` - Notified\n* `3` - Error"}}},"paths":{"/deployment/results/{id}/":{"get":{"operationId":"deployment_results_retrieve","description":"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 result.","required":true}],"tags":["deployment"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}},"application/xml":{"schema":{"$ref":"#/components/schemas/Result"}}},"description":""}}}}}}
```

## PUT /deployment/results/{id}/

> 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":{"Result":{"type":"object","description":"This serializer class provides the API representation","properties":{"id":{"type":"integer","readOnly":true},"package":{"type":"integer","nullable":true},"asset":{"type":"integer","nullable":true},"group":{"type":"integer","nullable":true},"name":{"type":"string","maxLength":128},"status":{"allOf":[{"$ref":"#/components/schemas/ResultStatusEnum"}],"minimum":-9223372036854776000,"maximum":9223372036854776000},"comment":{"type":"string","nullable":true},"date_created":{"type":"string","format":"date-time","readOnly":true}},"required":["asset","date_created","group","id","name"]},"ResultStatusEnum":{"enum":[0,1,2,3],"type":"integer","description":"* `0` - Sucess\n* `1` - Waiting notification\n* `2` - Notified\n* `3` - Error"}}},"paths":{"/deployment/results/{id}/":{"put":{"operationId":"deployment_results_update","description":"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 result.","required":true}],"tags":["deployment"],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Result"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Result"}},"application/json":{"schema":{"$ref":"#/components/schemas/Result"}},"application/xml":{"schema":{"$ref":"#/components/schemas/Result"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}},"application/xml":{"schema":{"$ref":"#/components/schemas/Result"}}},"description":""}}}}}}
```

## DELETE /deployment/results/{id}/

> 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":{"/deployment/results/{id}/":{"delete":{"operationId":"deployment_results_destroy","description":"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 result.","required":true}],"tags":["deployment"],"responses":{"204":{"description":"No response body"}}}}}}
```

## PATCH /deployment/results/{id}/

> 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":{"PatchedResult":{"type":"object","description":"This serializer class provides the API representation","properties":{"id":{"type":"integer","readOnly":true},"package":{"type":"integer","nullable":true},"asset":{"type":"integer","nullable":true},"group":{"type":"integer","nullable":true},"name":{"type":"string","maxLength":128},"status":{"allOf":[{"$ref":"#/components/schemas/ResultStatusEnum"}],"minimum":-9223372036854776000,"maximum":9223372036854776000},"comment":{"type":"string","nullable":true},"date_created":{"type":"string","format":"date-time","readOnly":true}}},"ResultStatusEnum":{"enum":[0,1,2,3],"type":"integer","description":"* `0` - Sucess\n* `1` - Waiting notification\n* `2` - Notified\n* `3` - Error"},"Result":{"type":"object","description":"This serializer class provides the API representation","properties":{"id":{"type":"integer","readOnly":true},"package":{"type":"integer","nullable":true},"asset":{"type":"integer","nullable":true},"group":{"type":"integer","nullable":true},"name":{"type":"string","maxLength":128},"status":{"allOf":[{"$ref":"#/components/schemas/ResultStatusEnum"}],"minimum":-9223372036854776000,"maximum":9223372036854776000},"comment":{"type":"string","nullable":true},"date_created":{"type":"string","format":"date-time","readOnly":true}},"required":["asset","date_created","group","id","name"]}}},"paths":{"/deployment/results/{id}/":{"patch":{"operationId":"deployment_results_partial_update","description":"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 result.","required":true}],"tags":["deployment"],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/PatchedResult"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/PatchedResult"}},"application/json":{"schema":{"$ref":"#/components/schemas/PatchedResult"}},"application/xml":{"schema":{"$ref":"#/components/schemas/PatchedResult"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}},"application/xml":{"schema":{"$ref":"#/components/schemas/Result"}}},"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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://documentation.ocsinventory-ng.org/open-api-reference/deployment.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
