# Policies

## Retrieve Policy

> Get details of a specific policy by ID.

```json
{"openapi":"3.0.3","info":{"title":"Omnitron API","version":"1.0.0"},"security":[{"Token":[]}],"components":{"securitySchemes":{"Token":{"type":"apiKey","in":"header","name":"Authorization"}},"parameters":{"id_path":{"name":"id","in":"path","description":"Unique identifier of the resource","required":true,"schema":{"type":"integer"}}},"schemas":{"Policy":{"type":"object","properties":{"id":{"type":"integer","description":"Policy ID","readOnly":true},"users":{"type":"array","items":{"type":"integer"},"description":"List of users associated with the policy."},"fe_permission_groups":{"type":"array","items":{"type":"integer"},"description":"List of frontend permission groups associated with the policy."},"accept_languages":{"type":"array","items":{"type":"string","maxLength":10},"description":"List of accepted language codes. If empty, all languages are accepted."},"created_date":{"type":"string","format":"date-time","readOnly":true,"description":"Created Date"},"modified_date":{"type":"string","format":"date-time","readOnly":true,"description":"Modified Date"}}}},"responses":{"403":{"description":"Forbidden"},"404":{"description":"The given resource or object was not found or does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"description":"Contains a detailed description of the error.","type":"string"}}}}}}}},"paths":{"/api/v1/policies/{id}/":{"get":{"summary":"Retrieve Policy","description":"Get details of a specific policy by ID.","tags":["Policies"],"parameters":[{"$ref":"#/components/parameters/id_path"}],"responses":{"200":{"description":"Policy details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Policy"}}}},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"}}}}}}
```

## Update Policy

> Update the details of an existing policy.

```json
{"openapi":"3.0.3","info":{"title":"Omnitron API","version":"1.0.0"},"security":[{"Token":[]}],"components":{"securitySchemes":{"Token":{"type":"apiKey","in":"header","name":"Authorization"}},"parameters":{"id_path":{"name":"id","in":"path","description":"Unique identifier of the resource","required":true,"schema":{"type":"integer"}}},"schemas":{"Policy":{"type":"object","properties":{"id":{"type":"integer","description":"Policy ID","readOnly":true},"users":{"type":"array","items":{"type":"integer"},"description":"List of users associated with the policy."},"fe_permission_groups":{"type":"array","items":{"type":"integer"},"description":"List of frontend permission groups associated with the policy."},"accept_languages":{"type":"array","items":{"type":"string","maxLength":10},"description":"List of accepted language codes. If empty, all languages are accepted."},"created_date":{"type":"string","format":"date-time","readOnly":true,"description":"Created Date"},"modified_date":{"type":"string","format":"date-time","readOnly":true,"description":"Modified Date"}}}},"responses":{"403":{"description":"Forbidden"},"404":{"description":"The given resource or object was not found or does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"description":"Contains a detailed description of the error.","type":"string"}}}}}}}},"paths":{"/api/v1/policies/{id}/":{"put":{"summary":"Update Policy","description":"Update the details of an existing policy.","tags":["Policies"],"parameters":[{"$ref":"#/components/parameters/id_path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Policy"}}}},"responses":{"200":{"description":"The policy was successfully updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Policy"}}}},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"}}}}}}
```

## Delete Policy

> Delete a specific policy by ID.

```json
{"openapi":"3.0.3","info":{"title":"Omnitron API","version":"1.0.0"},"security":[{"Token":[]}],"components":{"securitySchemes":{"Token":{"type":"apiKey","in":"header","name":"Authorization"}},"parameters":{"id_path":{"name":"id","in":"path","description":"Unique identifier of the resource","required":true,"schema":{"type":"integer"}}},"responses":{"403":{"description":"Forbidden"},"404":{"description":"The given resource or object was not found or does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"description":"Contains a detailed description of the error.","type":"string"}}}}}}}},"paths":{"/api/v1/policies/{id}/":{"delete":{"summary":"Delete Policy","description":"Delete a specific policy by ID.","tags":["Policies"],"parameters":[{"$ref":"#/components/parameters/id_path"}],"responses":{"204":{"description":"The policy was successfully deleted."},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"}}}}}}
```

## List Policies

> Retrieve a list of policies with optional filtering.

```json
{"openapi":"3.0.3","info":{"title":"Omnitron API","version":"1.0.0"},"security":[{"Token":[]}],"components":{"securitySchemes":{"Token":{"type":"apiKey","in":"header","name":"Authorization"}},"parameters":{"name":{"name":"name","in":"query","description":"Filter by name.","schema":{"type":"string"}},"created_date":{"name":"created_date","in":"query","required":false,"description":"Filter by creation date using supported lookup expressions (e.g., `gt`, `gte`, `lt`, `lte`, `date__gt`, etc.).","schema":{"type":"string","format":"date-time"}},"modified_date":{"name":"modified_date","in":"query","required":false,"description":"Filter by modification date using supported lookup expressions (e.g., `gt`, `gte`, `lt`, `lte`, `date__gt`, etc.).","schema":{"type":"string","format":"date-time"}},"users":{"name":"users","in":"query","required":false,"description":"Filter by user IDs associated with the policy.","schema":{"type":"array","items":{"type":"integer"}}},"fe_permission_groups":{"name":"fe_permission_groups","in":"query","required":false,"description":"Filter by frontend permission group IDs associated with the policy.","schema":{"type":"array","items":{"type":"integer"}}}},"schemas":{"Policy":{"type":"object","properties":{"id":{"type":"integer","description":"Policy ID","readOnly":true},"users":{"type":"array","items":{"type":"integer"},"description":"List of users associated with the policy."},"fe_permission_groups":{"type":"array","items":{"type":"integer"},"description":"List of frontend permission groups associated with the policy."},"accept_languages":{"type":"array","items":{"type":"string","maxLength":10},"description":"List of accepted language codes. If empty, all languages are accepted."},"created_date":{"type":"string","format":"date-time","readOnly":true,"description":"Created Date"},"modified_date":{"type":"string","format":"date-time","readOnly":true,"description":"Modified Date"}}}},"responses":{"403":{"description":"Forbidden"}}},"paths":{"/api/v1/policies/":{"get":{"summary":"List Policies","description":"Retrieve a list of policies with optional filtering.","tags":["Policies"],"parameters":[{"$ref":"#/components/parameters/name"},{"$ref":"#/components/parameters/created_date"},{"$ref":"#/components/parameters/modified_date"},{"$ref":"#/components/parameters/users"},{"$ref":"#/components/parameters/fe_permission_groups"}],"responses":{"200":{"description":"A list of policies.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Policy"}}}}},"403":{"$ref":"#/components/responses/403"}}}}}}
```

## Create Policy

> Create a new policy.

```json
{"openapi":"3.0.3","info":{"title":"Omnitron API","version":"1.0.0"},"security":[{"Token":[]}],"components":{"securitySchemes":{"Token":{"type":"apiKey","in":"header","name":"Authorization"}},"schemas":{"Policy":{"type":"object","properties":{"id":{"type":"integer","description":"Policy ID","readOnly":true},"users":{"type":"array","items":{"type":"integer"},"description":"List of users associated with the policy."},"fe_permission_groups":{"type":"array","items":{"type":"integer"},"description":"List of frontend permission groups associated with the policy."},"accept_languages":{"type":"array","items":{"type":"string","maxLength":10},"description":"List of accepted language codes. If empty, all languages are accepted."},"created_date":{"type":"string","format":"date-time","readOnly":true,"description":"Created Date"},"modified_date":{"type":"string","format":"date-time","readOnly":true,"description":"Modified Date"}}}},"responses":{"400":{"description":"Required field(s) are missing, data is invalid, or the action is not allowed.","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"field":{"oneOf":[{"type":"array","description":"Indicates that no value was provided for the {field} field in the request.","items":{"type":"string"}},{"type":"array","description":"Indicates usage of a non-existent object for {field} in the request.","items":{"type":"string"}}]},"code":{"type":"string","description":"Represents the server-side error code."}}},{"type":"object","properties":{"non_field_errors":{"description":"Indicates invalid data or action usage in the request.","type":"array","items":{"type":"string"}},"code":{"type":"string","description":"Represents the server-side error code."}}},{"type":"object","properties":{"detail":{"description":"Provides a detailed message for the given error.","type":"string"},"code":{"type":"string","description":"Represents the server-side error code."}}}]}}}},"403":{"description":"Forbidden"}}},"paths":{"/api/v1/policies/":{"post":{"summary":"Create Policy","description":"Create a new policy.","tags":["Policies"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Policy"}}}},"responses":{"201":{"description":"The policy was successfully created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Policy"}}}},"400":{"$ref":"#/components/responses/400"},"403":{"$ref":"#/components/responses/403"}}}}}}
```


---

# Agent Instructions: Querying This Documentation

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

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

```
GET https://apidocs.akinon.com/omnitron-openapis/policies.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

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