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

# Access Control

Operations related to Access Control, the mechanism to restrict object and record access on the platform for authorized users.

## GET /users/{user\_id}/api\_tokens/{api\_token\_id}

> Get ApiToken

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Access Control","description":"Operations related to Access Control, the mechanism to restrict object and record access on the platform for authorized users."}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/users/{user_id}/api_tokens/{api_token_id}":{"get":{"tags":["Access Control"],"responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"data":{"$ref":"#/components/schemas/ApiTokenResource"}},"required":["data","status"]}}}},"400":{"$ref":"#/components/responses/error"},"401":{"$ref":"#/components/responses/error"},"403":{"$ref":"#/components/responses/error"},"404":{"$ref":"#/components/responses/error"},"500":{"$ref":"#/components/responses/error"},"503":{"$ref":"#/components/responses/error"}},"description":"","parameters":[{"schema":{"type":"integer","format":"int64"},"in":"path","name":"user_id","required":true,"style":"simple","description":"The id of the user","explode":false},{"in":"path","description":"The api token targeted by the endpoint","required":true,"explode":false,"style":"simple","schema":{"type":"integer","format":"int64"},"name":"api_token_id"}],"operationId":"getApiToken","summary":"Get ApiToken"}}},"components":{"schemas":{"ApiTokenResource":{"type":"object","properties":{"name":{"type":"string","readOnly":false},"expiration_date":{"type":"integer","format":"int64","default":0,"readOnly":true},"value":{"type":"string","readOnly":true},"last_used_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"creation_date":{"type":"integer","format":"int64","default":0,"readOnly":true},"id":{"type":"string","readOnly":true}},"required":["creation_date","expiration_date","id","value"]},"errorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"error_code":{"type":"string","enum":["AUTHENTICATION_ERROR","AUTHORIZATION_ERROR","BAD_REQUEST_DATA","BAD_REQUEST_FORMAT","CONSTRAINT_VIOLATION_EXCEPTION","EMAIL_ALREADY_EXISTS","MAC_ERROR","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","TOKEN_ERROR"]},"error_id":{"type":"string"},"error":{"type":"string"}},"required":["error","error_code","error_id","status"]}},"responses":{"error":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}}}}
```

## PUT /users/{user\_id}/api\_tokens/{api\_token\_id}

> Update Api token

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Access Control","description":"Operations related to Access Control, the mechanism to restrict object and record access on the platform for authorized users."}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/users/{user_id}/api_tokens/{api_token_id}":{"put":{"description":"","parameters":[{"description":"The id of the user","name":"user_id","required":true,"in":"path","explode":false,"schema":{"type":"integer","format":"int64"},"style":"simple"},{"name":"api_token_id","in":"path","explode":false,"style":"simple","description":"The api token targeted by the endpoint","schema":{"type":"integer","format":"int64"},"required":true}],"responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"data":{"$ref":"#/components/schemas/ApiTokenResource"}},"required":["data","status"]}}}},"400":{"$ref":"#/components/responses/error"},"401":{"$ref":"#/components/responses/error"},"403":{"$ref":"#/components/responses/error"},"404":{"$ref":"#/components/responses/error"},"500":{"$ref":"#/components/responses/error"},"503":{"$ref":"#/components/responses/error"}},"tags":["Access Control"],"requestBody":{"description":"The updated user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiTokenResource"}}},"required":true},"summary":"Update Api token","operationId":"updateApiToken"}}},"components":{"schemas":{"ApiTokenResource":{"type":"object","properties":{"name":{"type":"string","readOnly":false},"expiration_date":{"type":"integer","format":"int64","default":0,"readOnly":true},"value":{"type":"string","readOnly":true},"last_used_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"creation_date":{"type":"integer","format":"int64","default":0,"readOnly":true},"id":{"type":"string","readOnly":true}},"required":["creation_date","expiration_date","id","value"]},"errorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"error_code":{"type":"string","enum":["AUTHENTICATION_ERROR","AUTHORIZATION_ERROR","BAD_REQUEST_DATA","BAD_REQUEST_FORMAT","CONSTRAINT_VIOLATION_EXCEPTION","EMAIL_ALREADY_EXISTS","MAC_ERROR","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","TOKEN_ERROR"]},"error_id":{"type":"string"},"error":{"type":"string"}},"required":["error","error_code","error_id","status"]}},"responses":{"error":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}}}}
```

## DELETE /users/{user\_id}/api\_tokens/{api\_token\_id}

> Delete Api token

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Access Control","description":"Operations related to Access Control, the mechanism to restrict object and record access on the platform for authorized users."}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/users/{user_id}/api_tokens/{api_token_id}":{"delete":{"parameters":[{"required":true,"description":"The id of the user","name":"user_id","schema":{"type":"integer","format":"int64"},"explode":false,"style":"simple","in":"path"},{"style":"simple","in":"path","required":true,"name":"api_token_id","schema":{"type":"integer","format":"int64"},"explode":false,"description":"The api token targeted by the endpoint"}],"summary":"Delete Api token","tags":["Access Control"],"responses":{"200":{"$ref":"#/components/responses/simple"},"400":{"$ref":"#/components/responses/error"},"401":{"$ref":"#/components/responses/error"},"403":{"$ref":"#/components/responses/error"},"404":{"$ref":"#/components/responses/error"},"500":{"$ref":"#/components/responses/error"},"503":{"$ref":"#/components/responses/error"}},"operationId":"deleteApiToken","description":""}}},"components":{"responses":{"simple":{"description":"Success response","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]}},"required":["status"]}}}},"error":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}},"schemas":{"errorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"error_code":{"type":"string","enum":["AUTHENTICATION_ERROR","AUTHORIZATION_ERROR","BAD_REQUEST_DATA","BAD_REQUEST_FORMAT","CONSTRAINT_VIOLATION_EXCEPTION","EMAIL_ALREADY_EXISTS","MAC_ERROR","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","TOKEN_ERROR"]},"error_id":{"type":"string"},"error":{"type":"string"}},"required":["error","error_code","error_id","status"]}}}}
```

## GET /users/{user\_id}

> Find user

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Access Control","description":"Operations related to Access Control, the mechanism to restrict object and record access on the platform for authorized users."}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/users/{user_id}":{"get":{"description":"","summary":"Find user","tags":["Access Control"],"operationId":"findUser","responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"data":{"$ref":"#/components/schemas/GenericUserResource"}},"required":["data","status"]}}}},"400":{"$ref":"#/components/responses/error"},"401":{"$ref":"#/components/responses/error"},"403":{"$ref":"#/components/responses/error"},"404":{"$ref":"#/components/responses/error"},"500":{"$ref":"#/components/responses/error"},"503":{"$ref":"#/components/responses/error"}},"parameters":[{"style":"simple","description":"The id of the user","schema":{"type":"integer","format":"int64"},"explode":false,"required":true,"in":"path","name":"user_id"},{"schema":{"type":"integer","format":"int64"},"explode":true,"style":"form","in":"query","name":"organisation_id","required":true,"description":"The organisation in which to search for the user"}]}}},"components":{"schemas":{"GenericUserResource":{"required":["type"],"oneOf":[{"$ref":"#/components/schemas/UserResource"},{"$ref":"#/components/schemas/ServiceAccountResource"}],"discriminator":{"propertyName":"type","mapping":{"USER":"#/components/schemas/UserResource","SERVICE_ACCOUNT":"#/components/schemas/ServiceAccountResource"}},"properties":{"type":{"type":"string","enum":["USER","SERVICE_ACCOUNT"]}},"allOf":[{"$ref":"#/components/schemas/BaseUserData"}]},"UserResource":{"allOf":[{"$ref":"#/components/schemas/UserResourceData"},{"type":"object","properties":{"created_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"first_name":{"type":"string","readOnly":false},"last_connection_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"last_password_update":{"type":"integer","format":"int64","default":0,"readOnly":true},"type":{"$ref":"#/components/schemas/UserType"},"email":{"type":"string","readOnly":false},"created_by":{"type":"string","readOnly":true},"last_modified_by":{"type":"string","readOnly":true},"organisation_id":{"type":"string","readOnly":false},"last_name":{"type":"string","readOnly":false},"community_id":{"type":"string","readOnly":true},"id":{"type":"string","readOnly":true},"last_modified_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"locale":{"type":"string","readOnly":false}},"required":["community_id","email","first_name","id","last_name","last_password_update","locale","organisation_id","type"]}]},"UserResourceData":{"allOf":[{"$ref":"#/components/schemas/BaseUserData"},{"type":"object"}]},"BaseUserData":{"type":"object"},"UserType":{"type":"string","enum":["USER","SERVICE_ACCOUNT"],"readOnly":false},"ServiceAccountResource":{"allOf":[{"$ref":"#/components/schemas/ServiceAccountData"},{"type":"object","properties":{"description":{"type":"string","readOnly":false},"id":{"type":"string","readOnly":true},"created_by":{"type":"string","readOnly":true},"last_connection_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"type":{"$ref":"#/components/schemas/UserType"},"email":{"type":"string","readOnly":true},"organisation_id":{"type":"string","readOnly":false},"name":{"type":"string","readOnly":false},"contact_email":{"type":"string","readOnly":false},"last_modified_by":{"type":"string","readOnly":true},"community_id":{"type":"string","readOnly":true},"created_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"last_modified_ts":{"type":"integer","format":"int64","default":0,"readOnly":true}},"required":["community_id","contact_email","description","email","id","name","organisation_id","type"]}]},"ServiceAccountData":{"allOf":[{"$ref":"#/components/schemas/BaseUserData"},{"type":"object"}]},"errorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"error_code":{"type":"string","enum":["AUTHENTICATION_ERROR","AUTHORIZATION_ERROR","BAD_REQUEST_DATA","BAD_REQUEST_FORMAT","CONSTRAINT_VIOLATION_EXCEPTION","EMAIL_ALREADY_EXISTS","MAC_ERROR","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","TOKEN_ERROR"]},"error_id":{"type":"string"},"error":{"type":"string"}},"required":["error","error_code","error_id","status"]}},"responses":{"error":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}}}}
```

## PUT /users/{user\_id}

> Update user

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Access Control","description":"Operations related to Access Control, the mechanism to restrict object and record access on the platform for authorized users."}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/users/{user_id}":{"put":{"parameters":[{"name":"user_id","description":"The id of the user","style":"simple","explode":false,"in":"path","schema":{"type":"integer","format":"int64"},"required":true},{"required":true,"description":"The organisation in which to search for the user","in":"query","name":"organisation_id","schema":{"type":"integer","format":"int64"},"explode":true,"style":"form"}],"operationId":"updateUser","summary":"Update user","responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"data":{"$ref":"#/components/schemas/GenericUserResource"}},"required":["data","status"]}}}},"400":{"$ref":"#/components/responses/error"},"401":{"$ref":"#/components/responses/error"},"403":{"$ref":"#/components/responses/error"},"404":{"$ref":"#/components/responses/error"},"500":{"$ref":"#/components/responses/error"},"503":{"$ref":"#/components/responses/error"}},"tags":["Access Control"],"requestBody":{"description":"The updated user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericUserResource"}}},"required":true},"description":""}}},"components":{"schemas":{"GenericUserResource":{"required":["type"],"oneOf":[{"$ref":"#/components/schemas/UserResource"},{"$ref":"#/components/schemas/ServiceAccountResource"}],"discriminator":{"propertyName":"type","mapping":{"USER":"#/components/schemas/UserResource","SERVICE_ACCOUNT":"#/components/schemas/ServiceAccountResource"}},"properties":{"type":{"type":"string","enum":["USER","SERVICE_ACCOUNT"]}},"allOf":[{"$ref":"#/components/schemas/BaseUserData"}]},"UserResource":{"allOf":[{"$ref":"#/components/schemas/UserResourceData"},{"type":"object","properties":{"created_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"first_name":{"type":"string","readOnly":false},"last_connection_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"last_password_update":{"type":"integer","format":"int64","default":0,"readOnly":true},"type":{"$ref":"#/components/schemas/UserType"},"email":{"type":"string","readOnly":false},"created_by":{"type":"string","readOnly":true},"last_modified_by":{"type":"string","readOnly":true},"organisation_id":{"type":"string","readOnly":false},"last_name":{"type":"string","readOnly":false},"community_id":{"type":"string","readOnly":true},"id":{"type":"string","readOnly":true},"last_modified_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"locale":{"type":"string","readOnly":false}},"required":["community_id","email","first_name","id","last_name","last_password_update","locale","organisation_id","type"]}]},"UserResourceData":{"allOf":[{"$ref":"#/components/schemas/BaseUserData"},{"type":"object"}]},"BaseUserData":{"type":"object"},"UserType":{"type":"string","enum":["USER","SERVICE_ACCOUNT"],"readOnly":false},"ServiceAccountResource":{"allOf":[{"$ref":"#/components/schemas/ServiceAccountData"},{"type":"object","properties":{"description":{"type":"string","readOnly":false},"id":{"type":"string","readOnly":true},"created_by":{"type":"string","readOnly":true},"last_connection_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"type":{"$ref":"#/components/schemas/UserType"},"email":{"type":"string","readOnly":true},"organisation_id":{"type":"string","readOnly":false},"name":{"type":"string","readOnly":false},"contact_email":{"type":"string","readOnly":false},"last_modified_by":{"type":"string","readOnly":true},"community_id":{"type":"string","readOnly":true},"created_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"last_modified_ts":{"type":"integer","format":"int64","default":0,"readOnly":true}},"required":["community_id","contact_email","description","email","id","name","organisation_id","type"]}]},"ServiceAccountData":{"allOf":[{"$ref":"#/components/schemas/BaseUserData"},{"type":"object"}]},"errorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"error_code":{"type":"string","enum":["AUTHENTICATION_ERROR","AUTHORIZATION_ERROR","BAD_REQUEST_DATA","BAD_REQUEST_FORMAT","CONSTRAINT_VIOLATION_EXCEPTION","EMAIL_ALREADY_EXISTS","MAC_ERROR","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","TOKEN_ERROR"]},"error_id":{"type":"string"},"error":{"type":"string"}},"required":["error","error_code","error_id","status"]}},"responses":{"error":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}}}}
```

## DELETE /users/{user\_id}

> Delete user

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Access Control","description":"Operations related to Access Control, the mechanism to restrict object and record access on the platform for authorized users."}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/users/{user_id}":{"delete":{"responses":{"200":{"$ref":"#/components/responses/simple"},"400":{"$ref":"#/components/responses/error"},"401":{"$ref":"#/components/responses/error"},"403":{"$ref":"#/components/responses/error"},"404":{"$ref":"#/components/responses/error"},"500":{"$ref":"#/components/responses/error"},"503":{"$ref":"#/components/responses/error"}},"tags":["Access Control"],"operationId":"removeUser","description":"","summary":"Delete user","parameters":[{"explode":false,"required":true,"schema":{"type":"integer","format":"int64"},"name":"user_id","style":"simple","in":"path","description":"The id of the user"},{"description":"The organisation in which to search for the user","explode":true,"in":"query","required":true,"style":"form","schema":{"type":"integer","format":"int64"},"name":"organisation_id"}]}}},"components":{"responses":{"simple":{"description":"Success response","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]}},"required":["status"]}}}},"error":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}},"schemas":{"errorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"error_code":{"type":"string","enum":["AUTHENTICATION_ERROR","AUTHORIZATION_ERROR","BAD_REQUEST_DATA","BAD_REQUEST_FORMAT","CONSTRAINT_VIOLATION_EXCEPTION","EMAIL_ALREADY_EXISTS","MAC_ERROR","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","TOKEN_ERROR"]},"error_id":{"type":"string"},"error":{"type":"string"}},"required":["error","error_code","error_id","status"]}}}}
```

## DELETE /users/{user\_id}/message\_authentication\_keys/{key\_id}

> Delete Message Authentication Key

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Access Control","description":"Operations related to Access Control, the mechanism to restrict object and record access on the platform for authorized users."}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/users/{user_id}/message_authentication_keys/{key_id}":{"delete":{"parameters":[{"in":"path","style":"simple","schema":{"type":"integer","format":"int64"},"name":"user_id","description":"The id of the user","required":true,"explode":false},{"schema":{"type":"integer","format":"int64"},"in":"path","name":"key_id","description":"The id of the key to delete","explode":false,"required":true,"style":"simple"}],"summary":"Delete Message Authentication Key","description":"","tags":["Access Control"],"responses":{"200":{"$ref":"#/components/responses/simple"},"400":{"$ref":"#/components/responses/error"},"401":{"$ref":"#/components/responses/error"},"403":{"$ref":"#/components/responses/error"},"404":{"$ref":"#/components/responses/error"},"500":{"$ref":"#/components/responses/error"},"503":{"$ref":"#/components/responses/error"}},"operationId":"deleteMessageAuthenticationKey"}}},"components":{"responses":{"simple":{"description":"Success response","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]}},"required":["status"]}}}},"error":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}},"schemas":{"errorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"error_code":{"type":"string","enum":["AUTHENTICATION_ERROR","AUTHORIZATION_ERROR","BAD_REQUEST_DATA","BAD_REQUEST_FORMAT","CONSTRAINT_VIOLATION_EXCEPTION","EMAIL_ALREADY_EXISTS","MAC_ERROR","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","TOKEN_ERROR"]},"error_id":{"type":"string"},"error":{"type":"string"}},"required":["error","error_code","error_id","status"]}}}}
```

## GET /users/{user\_id}/message\_authentication\_keys

> Find Message Authentication Keys

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Access Control","description":"Operations related to Access Control, the mechanism to restrict object and record access on the platform for authorized users."}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/users/{user_id}/message_authentication_keys":{"get":{"responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"max_results":{"type":"integer"},"count":{"type":"integer"},"status":{"type":"string","enum":["ok"]},"total":{"type":"integer"},"first_result":{"type":"integer"},"data":{"type":"array","items":{"$ref":"#/components/schemas/MessageAuthenticationKeyResource"}}},"required":["count","data","first_result","max_results","status","total"]}}}},"400":{"$ref":"#/components/responses/error"},"401":{"$ref":"#/components/responses/error"},"403":{"$ref":"#/components/responses/error"},"404":{"$ref":"#/components/responses/error"},"500":{"$ref":"#/components/responses/error"},"503":{"$ref":"#/components/responses/error"}},"tags":["Access Control"],"operationId":"getMessageAuthenticationKey","summary":"Find Message Authentication Keys","description":"","parameters":[{"in":"path","style":"simple","explode":false,"schema":{"type":"integer","format":"int64"},"required":true,"description":"The id of the user","name":"user_id"}]}}},"components":{"schemas":{"MessageAuthenticationKeyResource":{"type":"object","properties":{"user_id":{"type":"string","readOnly":true},"creation_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"key_id":{"type":"string","readOnly":false},"scheme":{"$ref":"#/components/schemas/MessageAuthenticationScheme"},"secret_key":{"type":"string","readOnly":true},"expiration_ts":{"type":"integer","format":"int64","default":0,"readOnly":false},"last_used_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"id":{"type":"string","readOnly":true}},"required":["creation_ts","id","key_id","scheme","secret_key","user_id"]},"MessageAuthenticationScheme":{"type":"string","enum":["HMAC_SHA256"],"readOnly":false},"errorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"error_code":{"type":"string","enum":["AUTHENTICATION_ERROR","AUTHORIZATION_ERROR","BAD_REQUEST_DATA","BAD_REQUEST_FORMAT","CONSTRAINT_VIOLATION_EXCEPTION","EMAIL_ALREADY_EXISTS","MAC_ERROR","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","TOKEN_ERROR"]},"error_id":{"type":"string"},"error":{"type":"string"}},"required":["error","error_code","error_id","status"]}},"responses":{"error":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}}}}
```

## POST /users/{user\_id}/message\_authentication\_keys

> Create new Message Authentication Key

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Access Control","description":"Operations related to Access Control, the mechanism to restrict object and record access on the platform for authorized users."}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/users/{user_id}/message_authentication_keys":{"post":{"parameters":[{"style":"simple","in":"path","schema":{"type":"integer","format":"int64"},"name":"user_id","required":true,"description":"The id of the user","explode":false}],"responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"data":{"$ref":"#/components/schemas/MessageAuthenticationKeyResource"}},"required":["data","status"]}}}},"400":{"$ref":"#/components/responses/error"},"401":{"$ref":"#/components/responses/error"},"403":{"$ref":"#/components/responses/error"},"404":{"$ref":"#/components/responses/error"},"500":{"$ref":"#/components/responses/error"},"503":{"$ref":"#/components/responses/error"}},"summary":"Create new Message Authentication Key","operationId":"createMessageAuthenticationKey","description":"","requestBody":{"description":"The user to create","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageAuthenticationKeyResource"}}},"required":true},"tags":["Access Control"]}}},"components":{"schemas":{"MessageAuthenticationKeyResource":{"type":"object","properties":{"user_id":{"type":"string","readOnly":true},"creation_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"key_id":{"type":"string","readOnly":false},"scheme":{"$ref":"#/components/schemas/MessageAuthenticationScheme"},"secret_key":{"type":"string","readOnly":true},"expiration_ts":{"type":"integer","format":"int64","default":0,"readOnly":false},"last_used_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"id":{"type":"string","readOnly":true}},"required":["creation_ts","id","key_id","scheme","secret_key","user_id"]},"MessageAuthenticationScheme":{"type":"string","enum":["HMAC_SHA256"],"readOnly":false},"errorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"error_code":{"type":"string","enum":["AUTHENTICATION_ERROR","AUTHORIZATION_ERROR","BAD_REQUEST_DATA","BAD_REQUEST_FORMAT","CONSTRAINT_VIOLATION_EXCEPTION","EMAIL_ALREADY_EXISTS","MAC_ERROR","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","TOKEN_ERROR"]},"error_id":{"type":"string"},"error":{"type":"string"}},"required":["error","error_code","error_id","status"]}},"responses":{"error":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}}}}
```

## GET /users/{user\_id}/user\_roles

> Search user roles

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Access Control","description":"Operations related to Access Control, the mechanism to restrict object and record access on the platform for authorized users."}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/users/{user_id}/user_roles":{"get":{"tags":["Access Control"],"description":"","parameters":[{"name":"user_id","schema":{"type":"string"},"in":"path","explode":false,"style":"simple","description":"User ID","required":true}],"operationId":"findUserRoles","summary":"Search user roles","responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer"},"status":{"type":"string","enum":["ok"]},"max_results":{"type":"integer"},"total":{"type":"integer"},"data":{"type":"array","items":{"$ref":"#/components/schemas/UserRoleResource"}},"first_result":{"type":"integer"}},"required":["count","data","first_result","max_results","status","total"]}}}},"400":{"$ref":"#/components/responses/error"},"401":{"$ref":"#/components/responses/error"},"403":{"$ref":"#/components/responses/error"},"404":{"$ref":"#/components/responses/error"},"500":{"$ref":"#/components/responses/error"},"503":{"$ref":"#/components/responses/error"}}}}},"components":{"schemas":{"UserRoleResource":{"type":"object","properties":{"role":{"$ref":"#/components/schemas/UserRoleCode"},"created_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"expiration_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"organisation_id":{"type":"string","readOnly":false},"created_by":{"type":"string","readOnly":true},"id":{"type":"string","readOnly":true}},"required":["id","organisation_id","role"]},"UserRoleCode":{"type":"string","enum":["SUPER_ADMIN","CUSTOMER_ADMIN","COMMUNITY_ADMIN","ORGANISATION_ADMIN","EDITOR","READER"],"readOnly":false},"errorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"error_code":{"type":"string","enum":["AUTHENTICATION_ERROR","AUTHORIZATION_ERROR","BAD_REQUEST_DATA","BAD_REQUEST_FORMAT","CONSTRAINT_VIOLATION_EXCEPTION","EMAIL_ALREADY_EXISTS","MAC_ERROR","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","TOKEN_ERROR"]},"error_id":{"type":"string"},"error":{"type":"string"}},"required":["error","error_code","error_id","status"]}},"responses":{"error":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}}}}
```

## POST /users/{user\_id}/user\_roles

> Create new user role

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Access Control","description":"Operations related to Access Control, the mechanism to restrict object and record access on the platform for authorized users."}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/users/{user_id}/user_roles":{"post":{"parameters":[{"schema":{"type":"string"},"explode":false,"name":"user_id","style":"simple","description":"User ID","in":"path","required":true}],"description":"","operationId":"createNewRole","requestBody":{"description":"The user role to create","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRoleResource"}}},"required":true},"responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"data":{"$ref":"#/components/schemas/UserRoleResource"}},"required":["data","status"]}}}},"400":{"$ref":"#/components/responses/error"},"401":{"$ref":"#/components/responses/error"},"403":{"$ref":"#/components/responses/error"},"404":{"$ref":"#/components/responses/error"},"500":{"$ref":"#/components/responses/error"},"503":{"$ref":"#/components/responses/error"}},"tags":["Access Control"],"summary":"Create new user role"}}},"components":{"schemas":{"UserRoleResource":{"type":"object","properties":{"role":{"$ref":"#/components/schemas/UserRoleCode"},"created_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"expiration_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"organisation_id":{"type":"string","readOnly":false},"created_by":{"type":"string","readOnly":true},"id":{"type":"string","readOnly":true}},"required":["id","organisation_id","role"]},"UserRoleCode":{"type":"string","enum":["SUPER_ADMIN","CUSTOMER_ADMIN","COMMUNITY_ADMIN","ORGANISATION_ADMIN","EDITOR","READER"],"readOnly":false},"errorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"error_code":{"type":"string","enum":["AUTHENTICATION_ERROR","AUTHORIZATION_ERROR","BAD_REQUEST_DATA","BAD_REQUEST_FORMAT","CONSTRAINT_VIOLATION_EXCEPTION","EMAIL_ALREADY_EXISTS","MAC_ERROR","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","TOKEN_ERROR"]},"error_id":{"type":"string"},"error":{"type":"string"}},"required":["error","error_code","error_id","status"]}},"responses":{"error":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}}}}
```

## GET /organisations/{organisation\_id}/api\_tokens

> Find api tokens of all users of a given organisation

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Access Control","description":"Operations related to Access Control, the mechanism to restrict object and record access on the platform for authorized users."}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/organisations/{organisation_id}/api_tokens":{"get":{"description":"","responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/OrganisationApiTokenResource"}},"total":{"type":"integer"},"max_results":{"type":"integer"},"status":{"type":"string","enum":["ok"]},"first_result":{"type":"integer"},"count":{"type":"integer"}},"required":["count","data","first_result","max_results","status","total"]}}}},"400":{"$ref":"#/components/responses/error"},"401":{"$ref":"#/components/responses/error"},"403":{"$ref":"#/components/responses/error"},"404":{"$ref":"#/components/responses/error"},"500":{"$ref":"#/components/responses/error"},"503":{"$ref":"#/components/responses/error"}},"operationId":"findOrganisationApiTokens","summary":"Find api tokens of all users of a given organisation","parameters":[{"schema":{"type":"string"},"required":true,"description":"The organisation of the users for whom api tokens will be retrieved","explode":false,"style":"simple","in":"path","name":"organisation_id"},{"description":"Should include or not tokens that are expired","explode":true,"required":false,"schema":{"type":"boolean"},"style":"form","name":"include_expired_tokens","in":"query"},{"style":"form","description":"Match the token value","name":"keywords","in":"query","required":false,"schema":{"type":"string"},"explode":true},{"required":false,"description":"Fields used to order the result","in":"query","explode":true,"schema":{"type":"array","items":{"type":"string"}},"name":"order_by","style":"form"},{"required":false,"description":"Offset from which the search must be performed","schema":{"type":"integer","format":"int32"},"explode":true,"in":"query","style":"form","name":"first_result"},{"required":false,"name":"max_results","in":"query","style":"form","description":"Number of maximum items that shall be return by this search","explode":true,"schema":{"type":"integer","format":"int32"}}],"tags":["Access Control"]}}},"components":{"schemas":{"OrganisationApiTokenResource":{"type":"object","properties":{"user":{"$ref":"#/components/schemas/GenericUserResource"},"api_token":{"$ref":"#/components/schemas/ApiTokenResource"},"organisation":{"$ref":"#/components/schemas/OrganisationResource"}},"required":["api_token","organisation","user"]},"GenericUserResource":{"required":["type"],"oneOf":[{"$ref":"#/components/schemas/UserResource"},{"$ref":"#/components/schemas/ServiceAccountResource"}],"discriminator":{"propertyName":"type","mapping":{"USER":"#/components/schemas/UserResource","SERVICE_ACCOUNT":"#/components/schemas/ServiceAccountResource"}},"properties":{"type":{"type":"string","enum":["USER","SERVICE_ACCOUNT"]}},"allOf":[{"$ref":"#/components/schemas/BaseUserData"}]},"UserResource":{"allOf":[{"$ref":"#/components/schemas/UserResourceData"},{"type":"object","properties":{"created_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"first_name":{"type":"string","readOnly":false},"last_connection_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"last_password_update":{"type":"integer","format":"int64","default":0,"readOnly":true},"type":{"$ref":"#/components/schemas/UserType"},"email":{"type":"string","readOnly":false},"created_by":{"type":"string","readOnly":true},"last_modified_by":{"type":"string","readOnly":true},"organisation_id":{"type":"string","readOnly":false},"last_name":{"type":"string","readOnly":false},"community_id":{"type":"string","readOnly":true},"id":{"type":"string","readOnly":true},"last_modified_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"locale":{"type":"string","readOnly":false}},"required":["community_id","email","first_name","id","last_name","last_password_update","locale","organisation_id","type"]}]},"UserResourceData":{"allOf":[{"$ref":"#/components/schemas/BaseUserData"},{"type":"object"}]},"BaseUserData":{"type":"object"},"UserType":{"type":"string","enum":["USER","SERVICE_ACCOUNT"],"readOnly":false},"ServiceAccountResource":{"allOf":[{"$ref":"#/components/schemas/ServiceAccountData"},{"type":"object","properties":{"description":{"type":"string","readOnly":false},"id":{"type":"string","readOnly":true},"created_by":{"type":"string","readOnly":true},"last_connection_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"type":{"$ref":"#/components/schemas/UserType"},"email":{"type":"string","readOnly":true},"organisation_id":{"type":"string","readOnly":false},"name":{"type":"string","readOnly":false},"contact_email":{"type":"string","readOnly":false},"last_modified_by":{"type":"string","readOnly":true},"community_id":{"type":"string","readOnly":true},"created_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"last_modified_ts":{"type":"integer","format":"int64","default":0,"readOnly":true}},"required":["community_id","contact_email","description","email","id","name","organisation_id","type"]}]},"ServiceAccountData":{"allOf":[{"$ref":"#/components/schemas/BaseUserData"},{"type":"object"}]},"ApiTokenResource":{"type":"object","properties":{"name":{"type":"string","readOnly":false},"expiration_date":{"type":"integer","format":"int64","default":0,"readOnly":true},"value":{"type":"string","readOnly":true},"last_used_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"creation_date":{"type":"integer","format":"int64","default":0,"readOnly":true},"id":{"type":"string","readOnly":true}},"required":["creation_date","expiration_date","id","value"]},"OrganisationResource":{"type":"object","properties":{"last_modified_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"community_id":{"type":"string","readOnly":true},"market_id":{"type":"string","readOnly":false},"id":{"type":"string","readOnly":true},"technical_name":{"type":"string","readOnly":false},"archived":{"type":"boolean","default":false,"readOnly":true},"administrator_id":{"type":"string","readOnly":false},"name":{"type":"string","readOnly":false},"created_by":{"type":"string","readOnly":true},"created_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"last_modified_by":{"type":"string","readOnly":true},"type":{"$ref":"#/components/schemas/OrganisationType"},"enabled_features":{"type":"array","items":{"$ref":"#/components/schemas/EnabledFeatureResource"},"readOnly":false}},"required":["archived","community_id","enabled_features","id","market_id","name"]},"OrganisationType":{"type":"string","enum":["CUSTOMER","CUSTOMER_POC","DEMO_SANDBOX","TEST_SANDBOX","PARTNER","TECHNICAL"],"readOnly":false},"EnabledFeatureResource":{"type":"object","properties":{"feature_name":{"type":"string","readOnly":false},"enable_on":{"type":"string","readOnly":false}},"required":["enable_on","feature_name"]},"errorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"error_code":{"type":"string","enum":["AUTHENTICATION_ERROR","AUTHORIZATION_ERROR","BAD_REQUEST_DATA","BAD_REQUEST_FORMAT","CONSTRAINT_VIOLATION_EXCEPTION","EMAIL_ALREADY_EXISTS","MAC_ERROR","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","TOKEN_ERROR"]},"error_id":{"type":"string"},"error":{"type":"string"}},"required":["error","error_code","error_id","status"]}},"responses":{"error":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}}}}
```

## GET /communities/{community\_id}/api\_tokens

> Find api tokens of all users of a given community

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Access Control","description":"Operations related to Access Control, the mechanism to restrict object and record access on the platform for authorized users."}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/communities/{community_id}/api_tokens":{"get":{"responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/OrganisationApiTokenResource"}},"first_result":{"type":"integer"},"total":{"type":"integer"},"status":{"type":"string","enum":["ok"]},"count":{"type":"integer"},"max_results":{"type":"integer"}},"required":["count","data","first_result","max_results","status","total"]}}}},"400":{"$ref":"#/components/responses/error"},"401":{"$ref":"#/components/responses/error"},"403":{"$ref":"#/components/responses/error"},"404":{"$ref":"#/components/responses/error"},"500":{"$ref":"#/components/responses/error"},"503":{"$ref":"#/components/responses/error"}},"operationId":"findCommunityApiTokens","description":"","parameters":[{"style":"simple","explode":false,"schema":{"type":"string"},"name":"community_id","required":true,"in":"path","description":"The communitiy of the users for whom api tokens will be retrieved"},{"explode":true,"required":false,"style":"form","in":"query","schema":{"type":"boolean"},"description":"Should include or not tokens that are expired","name":"include_expired_tokens"},{"explode":true,"required":false,"name":"keywords","description":"Match the token value","schema":{"type":"string"},"style":"form","in":"query"},{"schema":{"type":"array","items":{"type":"string"}},"description":"Fields used to order the result","name":"order_by","required":false,"in":"query","explode":true,"style":"form"},{"explode":true,"in":"query","style":"form","required":false,"name":"first_result","description":"Offset from which the search must be performed","schema":{"type":"integer","format":"int32"}},{"schema":{"type":"integer","format":"int32"},"style":"form","in":"query","name":"max_results","required":false,"description":"Number of maximum items that shall be return by this search","explode":true}],"summary":"Find api tokens of all users of a given community","tags":["Access Control"]}}},"components":{"schemas":{"OrganisationApiTokenResource":{"type":"object","properties":{"user":{"$ref":"#/components/schemas/GenericUserResource"},"api_token":{"$ref":"#/components/schemas/ApiTokenResource"},"organisation":{"$ref":"#/components/schemas/OrganisationResource"}},"required":["api_token","organisation","user"]},"GenericUserResource":{"required":["type"],"oneOf":[{"$ref":"#/components/schemas/UserResource"},{"$ref":"#/components/schemas/ServiceAccountResource"}],"discriminator":{"propertyName":"type","mapping":{"USER":"#/components/schemas/UserResource","SERVICE_ACCOUNT":"#/components/schemas/ServiceAccountResource"}},"properties":{"type":{"type":"string","enum":["USER","SERVICE_ACCOUNT"]}},"allOf":[{"$ref":"#/components/schemas/BaseUserData"}]},"UserResource":{"allOf":[{"$ref":"#/components/schemas/UserResourceData"},{"type":"object","properties":{"created_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"first_name":{"type":"string","readOnly":false},"last_connection_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"last_password_update":{"type":"integer","format":"int64","default":0,"readOnly":true},"type":{"$ref":"#/components/schemas/UserType"},"email":{"type":"string","readOnly":false},"created_by":{"type":"string","readOnly":true},"last_modified_by":{"type":"string","readOnly":true},"organisation_id":{"type":"string","readOnly":false},"last_name":{"type":"string","readOnly":false},"community_id":{"type":"string","readOnly":true},"id":{"type":"string","readOnly":true},"last_modified_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"locale":{"type":"string","readOnly":false}},"required":["community_id","email","first_name","id","last_name","last_password_update","locale","organisation_id","type"]}]},"UserResourceData":{"allOf":[{"$ref":"#/components/schemas/BaseUserData"},{"type":"object"}]},"BaseUserData":{"type":"object"},"UserType":{"type":"string","enum":["USER","SERVICE_ACCOUNT"],"readOnly":false},"ServiceAccountResource":{"allOf":[{"$ref":"#/components/schemas/ServiceAccountData"},{"type":"object","properties":{"description":{"type":"string","readOnly":false},"id":{"type":"string","readOnly":true},"created_by":{"type":"string","readOnly":true},"last_connection_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"type":{"$ref":"#/components/schemas/UserType"},"email":{"type":"string","readOnly":true},"organisation_id":{"type":"string","readOnly":false},"name":{"type":"string","readOnly":false},"contact_email":{"type":"string","readOnly":false},"last_modified_by":{"type":"string","readOnly":true},"community_id":{"type":"string","readOnly":true},"created_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"last_modified_ts":{"type":"integer","format":"int64","default":0,"readOnly":true}},"required":["community_id","contact_email","description","email","id","name","organisation_id","type"]}]},"ServiceAccountData":{"allOf":[{"$ref":"#/components/schemas/BaseUserData"},{"type":"object"}]},"ApiTokenResource":{"type":"object","properties":{"name":{"type":"string","readOnly":false},"expiration_date":{"type":"integer","format":"int64","default":0,"readOnly":true},"value":{"type":"string","readOnly":true},"last_used_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"creation_date":{"type":"integer","format":"int64","default":0,"readOnly":true},"id":{"type":"string","readOnly":true}},"required":["creation_date","expiration_date","id","value"]},"OrganisationResource":{"type":"object","properties":{"last_modified_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"community_id":{"type":"string","readOnly":true},"market_id":{"type":"string","readOnly":false},"id":{"type":"string","readOnly":true},"technical_name":{"type":"string","readOnly":false},"archived":{"type":"boolean","default":false,"readOnly":true},"administrator_id":{"type":"string","readOnly":false},"name":{"type":"string","readOnly":false},"created_by":{"type":"string","readOnly":true},"created_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"last_modified_by":{"type":"string","readOnly":true},"type":{"$ref":"#/components/schemas/OrganisationType"},"enabled_features":{"type":"array","items":{"$ref":"#/components/schemas/EnabledFeatureResource"},"readOnly":false}},"required":["archived","community_id","enabled_features","id","market_id","name"]},"OrganisationType":{"type":"string","enum":["CUSTOMER","CUSTOMER_POC","DEMO_SANDBOX","TEST_SANDBOX","PARTNER","TECHNICAL"],"readOnly":false},"EnabledFeatureResource":{"type":"object","properties":{"feature_name":{"type":"string","readOnly":false},"enable_on":{"type":"string","readOnly":false}},"required":["enable_on","feature_name"]},"errorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"error_code":{"type":"string","enum":["AUTHENTICATION_ERROR","AUTHORIZATION_ERROR","BAD_REQUEST_DATA","BAD_REQUEST_FORMAT","CONSTRAINT_VIOLATION_EXCEPTION","EMAIL_ALREADY_EXISTS","MAC_ERROR","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","TOKEN_ERROR"]},"error_id":{"type":"string"},"error":{"type":"string"}},"required":["error","error_code","error_id","status"]}},"responses":{"error":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}}}}
```

## GET /community/{community\_id}/users.user\_roles

> Search user roles within a community

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Access Control","description":"Operations related to Access Control, the mechanism to restrict object and record access on the platform for authorized users."}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/community/{community_id}/users.user_roles":{"get":{"description":"","summary":"Search user roles within a community","parameters":[{"required":true,"name":"community_id","in":"path","schema":{"type":"string"},"explode":false,"description":"The community in which the search is performed","style":"simple"},{"in":"query","style":"form","name":"organisation_id","description":"The organisation to which the user belong","required":false,"explode":true,"schema":{"type":"string"}},{"name":"first_result","required":false,"in":"query","schema":{"type":"integer","format":"int32"},"style":"form","description":"Offset from which the search must be performed","explode":true},{"required":false,"in":"query","style":"form","explode":true,"name":"max_results","description":"Number of maximum items that shall be return by this search","schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"total":{"type":"integer"},"max_results":{"type":"integer"},"count":{"type":"integer"},"first_result":{"type":"integer"},"data":{"type":"array","items":{"$ref":"#/components/schemas/MemberWithUserRoleResource"}}},"required":["count","data","first_result","max_results","status","total"]}}}},"400":{"$ref":"#/components/responses/error"},"401":{"$ref":"#/components/responses/error"},"403":{"$ref":"#/components/responses/error"},"404":{"$ref":"#/components/responses/error"},"500":{"$ref":"#/components/responses/error"},"503":{"$ref":"#/components/responses/error"}},"tags":["Access Control"],"operationId":"findUsersWithCommunityAccess"}}},"components":{"schemas":{"MemberWithUserRoleResource":{"type":"object"},"errorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"error_code":{"type":"string","enum":["AUTHENTICATION_ERROR","AUTHORIZATION_ERROR","BAD_REQUEST_DATA","BAD_REQUEST_FORMAT","CONSTRAINT_VIOLATION_EXCEPTION","EMAIL_ALREADY_EXISTS","MAC_ERROR","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","TOKEN_ERROR"]},"error_id":{"type":"string"},"error":{"type":"string"}},"required":["error","error_code","error_id","status"]}},"responses":{"error":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}}}}
```

## GET /users

> Find users

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Access Control","description":"Operations related to Access Control, the mechanism to restrict object and record access on the platform for authorized users."}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/users":{"get":{"parameters":[{"description":"The organisation in which to perform the action","schema":{"type":"integer","format":"int64"},"in":"query","required":false,"style":"form","name":"organisation_id","explode":true},{"name":"user_ids","style":"form","required":false,"schema":{"type":"array","items":{"type":"string"}},"explode":true,"description":"ids of the user to search","in":"query"},{"required":false,"style":"form","in":"query","schema":{"type":"string"},"description":"keywords to be used for the search","explode":true,"name":"keywords"},{"style":"form","schema":{"type":"integer","format":"int32"},"in":"query","explode":true,"description":"Offset from which the search must be performed","required":false,"name":"first_result"},{"required":false,"style":"form","explode":true,"schema":{"type":"integer","format":"int32"},"description":"Number of maximum items that shall be return by this search","in":"query","name":"max_results"}],"responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/GenericUserResource"}},"max_results":{"type":"integer"},"first_result":{"type":"integer"},"count":{"type":"integer"},"total":{"type":"integer"},"status":{"type":"string","enum":["ok"]}},"required":["count","data","first_result","max_results","status","total"]}}}},"400":{"$ref":"#/components/responses/error"},"401":{"$ref":"#/components/responses/error"},"403":{"$ref":"#/components/responses/error"},"404":{"$ref":"#/components/responses/error"},"500":{"$ref":"#/components/responses/error"},"503":{"$ref":"#/components/responses/error"}},"operationId":"findUsers","description":"","summary":"Find users","tags":["Access Control"]}}},"components":{"schemas":{"GenericUserResource":{"required":["type"],"oneOf":[{"$ref":"#/components/schemas/UserResource"},{"$ref":"#/components/schemas/ServiceAccountResource"}],"discriminator":{"propertyName":"type","mapping":{"USER":"#/components/schemas/UserResource","SERVICE_ACCOUNT":"#/components/schemas/ServiceAccountResource"}},"properties":{"type":{"type":"string","enum":["USER","SERVICE_ACCOUNT"]}},"allOf":[{"$ref":"#/components/schemas/BaseUserData"}]},"UserResource":{"allOf":[{"$ref":"#/components/schemas/UserResourceData"},{"type":"object","properties":{"created_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"first_name":{"type":"string","readOnly":false},"last_connection_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"last_password_update":{"type":"integer","format":"int64","default":0,"readOnly":true},"type":{"$ref":"#/components/schemas/UserType"},"email":{"type":"string","readOnly":false},"created_by":{"type":"string","readOnly":true},"last_modified_by":{"type":"string","readOnly":true},"organisation_id":{"type":"string","readOnly":false},"last_name":{"type":"string","readOnly":false},"community_id":{"type":"string","readOnly":true},"id":{"type":"string","readOnly":true},"last_modified_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"locale":{"type":"string","readOnly":false}},"required":["community_id","email","first_name","id","last_name","last_password_update","locale","organisation_id","type"]}]},"UserResourceData":{"allOf":[{"$ref":"#/components/schemas/BaseUserData"},{"type":"object"}]},"BaseUserData":{"type":"object"},"UserType":{"type":"string","enum":["USER","SERVICE_ACCOUNT"],"readOnly":false},"ServiceAccountResource":{"allOf":[{"$ref":"#/components/schemas/ServiceAccountData"},{"type":"object","properties":{"description":{"type":"string","readOnly":false},"id":{"type":"string","readOnly":true},"created_by":{"type":"string","readOnly":true},"last_connection_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"type":{"$ref":"#/components/schemas/UserType"},"email":{"type":"string","readOnly":true},"organisation_id":{"type":"string","readOnly":false},"name":{"type":"string","readOnly":false},"contact_email":{"type":"string","readOnly":false},"last_modified_by":{"type":"string","readOnly":true},"community_id":{"type":"string","readOnly":true},"created_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"last_modified_ts":{"type":"integer","format":"int64","default":0,"readOnly":true}},"required":["community_id","contact_email","description","email","id","name","organisation_id","type"]}]},"ServiceAccountData":{"allOf":[{"$ref":"#/components/schemas/BaseUserData"},{"type":"object"}]},"errorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"error_code":{"type":"string","enum":["AUTHENTICATION_ERROR","AUTHORIZATION_ERROR","BAD_REQUEST_DATA","BAD_REQUEST_FORMAT","CONSTRAINT_VIOLATION_EXCEPTION","EMAIL_ALREADY_EXISTS","MAC_ERROR","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","TOKEN_ERROR"]},"error_id":{"type":"string"},"error":{"type":"string"}},"required":["error","error_code","error_id","status"]}},"responses":{"error":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}}}}
```

## POST /users

> Create new user

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Access Control","description":"Operations related to Access Control, the mechanism to restrict object and record access on the platform for authorized users."}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/users":{"post":{"tags":["Access Control"],"responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"data":{"$ref":"#/components/schemas/GenericUserResource"}},"required":["data","status"]}}}},"400":{"$ref":"#/components/responses/error"},"401":{"$ref":"#/components/responses/error"},"403":{"$ref":"#/components/responses/error"},"404":{"$ref":"#/components/responses/error"},"500":{"$ref":"#/components/responses/error"},"503":{"$ref":"#/components/responses/error"}},"description":"","operationId":"createUser","parameters":[{"name":"organisation_id","in":"query","explode":true,"schema":{"type":"integer","format":"int64"},"required":false,"style":"form","description":"The organisation in which to perform the action"}],"requestBody":{"description":"The user to create","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericUserCreationResource"}}},"required":true},"summary":"Create new user"}}},"components":{"schemas":{"GenericUserResource":{"required":["type"],"oneOf":[{"$ref":"#/components/schemas/UserResource"},{"$ref":"#/components/schemas/ServiceAccountResource"}],"discriminator":{"propertyName":"type","mapping":{"USER":"#/components/schemas/UserResource","SERVICE_ACCOUNT":"#/components/schemas/ServiceAccountResource"}},"properties":{"type":{"type":"string","enum":["USER","SERVICE_ACCOUNT"]}},"allOf":[{"$ref":"#/components/schemas/BaseUserData"}]},"UserResource":{"allOf":[{"$ref":"#/components/schemas/UserResourceData"},{"type":"object","properties":{"created_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"first_name":{"type":"string","readOnly":false},"last_connection_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"last_password_update":{"type":"integer","format":"int64","default":0,"readOnly":true},"type":{"$ref":"#/components/schemas/UserType"},"email":{"type":"string","readOnly":false},"created_by":{"type":"string","readOnly":true},"last_modified_by":{"type":"string","readOnly":true},"organisation_id":{"type":"string","readOnly":false},"last_name":{"type":"string","readOnly":false},"community_id":{"type":"string","readOnly":true},"id":{"type":"string","readOnly":true},"last_modified_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"locale":{"type":"string","readOnly":false}},"required":["community_id","email","first_name","id","last_name","last_password_update","locale","organisation_id","type"]}]},"UserResourceData":{"allOf":[{"$ref":"#/components/schemas/BaseUserData"},{"type":"object"}]},"BaseUserData":{"type":"object"},"UserType":{"type":"string","enum":["USER","SERVICE_ACCOUNT"],"readOnly":false},"ServiceAccountResource":{"allOf":[{"$ref":"#/components/schemas/ServiceAccountData"},{"type":"object","properties":{"description":{"type":"string","readOnly":false},"id":{"type":"string","readOnly":true},"created_by":{"type":"string","readOnly":true},"last_connection_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"type":{"$ref":"#/components/schemas/UserType"},"email":{"type":"string","readOnly":true},"organisation_id":{"type":"string","readOnly":false},"name":{"type":"string","readOnly":false},"contact_email":{"type":"string","readOnly":false},"last_modified_by":{"type":"string","readOnly":true},"community_id":{"type":"string","readOnly":true},"created_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"last_modified_ts":{"type":"integer","format":"int64","default":0,"readOnly":true}},"required":["community_id","contact_email","description","email","id","name","organisation_id","type"]}]},"ServiceAccountData":{"allOf":[{"$ref":"#/components/schemas/BaseUserData"},{"type":"object"}]},"errorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"error_code":{"type":"string","enum":["AUTHENTICATION_ERROR","AUTHORIZATION_ERROR","BAD_REQUEST_DATA","BAD_REQUEST_FORMAT","CONSTRAINT_VIOLATION_EXCEPTION","EMAIL_ALREADY_EXISTS","MAC_ERROR","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","TOKEN_ERROR"]},"error_id":{"type":"string"},"error":{"type":"string"}},"required":["error","error_code","error_id","status"]},"GenericUserCreationResource":{"discriminator":{"propertyName":"type","mapping":{"USER":"#/components/schemas/UserCreationResource","SERVICE_ACCOUNT":"#/components/schemas/ServiceAccountCreationResource"}},"required":["type"],"allOf":[{"$ref":"#/components/schemas/UserCreationResourceData"}],"properties":{"type":{"type":"string","enum":["USER","SERVICE_ACCOUNT"]}},"oneOf":[{"$ref":"#/components/schemas/UserCreationResource"},{"$ref":"#/components/schemas/ServiceAccountCreationResource"}]},"UserCreationResourceData":{"type":"object"},"UserCreationResource":{"allOf":[{"$ref":"#/components/schemas/UserResourceData"},{"type":"object","properties":{"id":{"type":"string","readOnly":true},"community_id":{"type":"string","readOnly":true},"organisation_id":{"type":"string","readOnly":false},"locale":{"type":"string","readOnly":false},"role":{"$ref":"#/components/schemas/UserRoleCode"},"created_by":{"type":"string","readOnly":true},"last_modified_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"email":{"type":"string","readOnly":false},"last_modified_by":{"type":"string","readOnly":true},"first_name":{"type":"string","readOnly":false},"created_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"type":{"$ref":"#/components/schemas/UserType"},"last_name":{"type":"string","readOnly":false}},"required":["community_id","email","first_name","id","last_name","locale","organisation_id","type"]}]},"UserRoleCode":{"type":"string","enum":["SUPER_ADMIN","CUSTOMER_ADMIN","COMMUNITY_ADMIN","ORGANISATION_ADMIN","EDITOR","READER"],"readOnly":false},"ServiceAccountCreationResource":{"type":"object","properties":{"last_modified_by":{"type":"string","readOnly":true},"role":{"$ref":"#/components/schemas/UserRoleCode"},"description":{"type":"string","readOnly":false},"name":{"type":"string","readOnly":false},"organisation_id":{"type":"string","readOnly":false},"created_by":{"type":"string","readOnly":true},"type":{"$ref":"#/components/schemas/UserType"},"id":{"type":"string","readOnly":true},"created_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"community_id":{"type":"string","readOnly":true},"contact_email":{"type":"string","readOnly":false},"last_modified_ts":{"type":"integer","format":"int64","default":0,"readOnly":true}},"required":["community_id","contact_email","description","id","name","organisation_id","type"]}},"responses":{"error":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}}}}
```

## GET /users/{user\_id}/api\_tokens

> Find api tokens

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Access Control","description":"Operations related to Access Control, the mechanism to restrict object and record access on the platform for authorized users."}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/users/{user_id}/api_tokens":{"get":{"parameters":[{"name":"user_id","schema":{"type":"integer","format":"int64"},"in":"path","required":true,"description":"The user owning the api token","style":"simple","explode":false},{"required":false,"style":"form","schema":{"type":"integer","format":"int32"},"in":"query","name":"first_result","explode":true,"description":"Offset from which the search must be performed"},{"description":"Number of maximum items that shall be return by this search","schema":{"type":"integer","format":"int32"},"in":"query","style":"form","name":"max_results","required":false,"explode":true}],"description":"","operationId":"findApiTokens","summary":"Find api tokens","tags":["Access Control"],"responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer"},"max_results":{"type":"integer"},"first_result":{"type":"integer"},"total":{"type":"integer"},"data":{"type":"array","items":{"$ref":"#/components/schemas/ApiTokenResource"}},"status":{"type":"string","enum":["ok"]}},"required":["count","data","first_result","max_results","status","total"]}}}},"400":{"$ref":"#/components/responses/error"},"401":{"$ref":"#/components/responses/error"},"403":{"$ref":"#/components/responses/error"},"404":{"$ref":"#/components/responses/error"},"500":{"$ref":"#/components/responses/error"},"503":{"$ref":"#/components/responses/error"}}}}},"components":{"schemas":{"ApiTokenResource":{"type":"object","properties":{"name":{"type":"string","readOnly":false},"expiration_date":{"type":"integer","format":"int64","default":0,"readOnly":true},"value":{"type":"string","readOnly":true},"last_used_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"creation_date":{"type":"integer","format":"int64","default":0,"readOnly":true},"id":{"type":"string","readOnly":true}},"required":["creation_date","expiration_date","id","value"]},"errorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"error_code":{"type":"string","enum":["AUTHENTICATION_ERROR","AUTHORIZATION_ERROR","BAD_REQUEST_DATA","BAD_REQUEST_FORMAT","CONSTRAINT_VIOLATION_EXCEPTION","EMAIL_ALREADY_EXISTS","MAC_ERROR","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","TOKEN_ERROR"]},"error_id":{"type":"string"},"error":{"type":"string"}},"required":["error","error_code","error_id","status"]}},"responses":{"error":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}}}}
```

## POST /users/{user\_id}/api\_tokens

> Create user api token

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Access Control","description":"Operations related to Access Control, the mechanism to restrict object and record access on the platform for authorized users."}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/users/{user_id}/api_tokens":{"post":{"requestBody":{"description":"The name of the api token to create","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiTokenResource"}}},"required":true},"parameters":[{"explode":false,"in":"path","required":true,"name":"user_id","style":"simple","schema":{"type":"integer","format":"int64"},"description":"The user owning the api token"}],"responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"data":{"$ref":"#/components/schemas/ApiTokenResource"}},"required":["data","status"]}}}},"400":{"$ref":"#/components/responses/error"},"401":{"$ref":"#/components/responses/error"},"403":{"$ref":"#/components/responses/error"},"404":{"$ref":"#/components/responses/error"},"500":{"$ref":"#/components/responses/error"},"503":{"$ref":"#/components/responses/error"}},"description":"","summary":"Create user api token","operationId":"createApiToken","tags":["Access Control"]}}},"components":{"schemas":{"ApiTokenResource":{"type":"object","properties":{"name":{"type":"string","readOnly":false},"expiration_date":{"type":"integer","format":"int64","default":0,"readOnly":true},"value":{"type":"string","readOnly":true},"last_used_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"creation_date":{"type":"integer","format":"int64","default":0,"readOnly":true},"id":{"type":"string","readOnly":true}},"required":["creation_date","expiration_date","id","value"]},"errorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"error_code":{"type":"string","enum":["AUTHENTICATION_ERROR","AUTHORIZATION_ERROR","BAD_REQUEST_DATA","BAD_REQUEST_FORMAT","CONSTRAINT_VIOLATION_EXCEPTION","EMAIL_ALREADY_EXISTS","MAC_ERROR","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","TOKEN_ERROR"]},"error_id":{"type":"string"},"error":{"type":"string"}},"required":["error","error_code","error_id","status"]}},"responses":{"error":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}}}}
```

## DELETE /users/{user\_id}/user\_roles/{role\_id}

> Delete a role

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Access Control","description":"Operations related to Access Control, the mechanism to restrict object and record access on the platform for authorized users."}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/users/{user_id}/user_roles/{role_id}":{"delete":{"parameters":[{"name":"user_id","explode":false,"schema":{"type":"string"},"style":"simple","in":"path","description":"User ID","required":true},{"required":true,"schema":{"type":"string"},"style":"simple","name":"role_id","in":"path","explode":false,"description":"User role ID"}],"operationId":"removeUserRole","responses":{"200":{"$ref":"#/components/responses/simple"},"400":{"$ref":"#/components/responses/error"},"401":{"$ref":"#/components/responses/error"},"403":{"$ref":"#/components/responses/error"},"404":{"$ref":"#/components/responses/error"},"500":{"$ref":"#/components/responses/error"},"503":{"$ref":"#/components/responses/error"}},"description":"","tags":["Access Control"],"summary":"Delete a role"}}},"components":{"responses":{"simple":{"description":"Success response","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]}},"required":["status"]}}}},"error":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}},"schemas":{"errorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"error_code":{"type":"string","enum":["AUTHENTICATION_ERROR","AUTHORIZATION_ERROR","BAD_REQUEST_DATA","BAD_REQUEST_FORMAT","CONSTRAINT_VIOLATION_EXCEPTION","EMAIL_ALREADY_EXISTS","MAC_ERROR","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","TOKEN_ERROR"]},"error_id":{"type":"string"},"error":{"type":"string"}},"required":["error","error_code","error_id","status"]}}}}
```


---

# 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://docs.mediarithmics.io/api-reference/identity-and-access-management-iam/access-control.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.
