# Audits

## List audit entries

> Returns a list of audit entries

```json
{"openapi":"3.0.0","info":{"title":"Lenses API","version":"6.1"},"tags":[{"name":"agent_Audits"}],"servers":[{"url":"{server}","variables":{"server":{"default":"https://api.example.com"}}}],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"The bearer token can be obtained by creating a ServiceAccount.\n"},"cookieAuth":{"type":"apiKey","in":"cookie","name":"session_id","description":"On successful SAML/SSO login, the API will set a cookie with a session id.\n"}},"schemas":{"agent_AuditChange":{"type":"string","enum":["ADD","REMOVE","UPDATE","PATCH","INSERT","STARTED","STOPPED","SCALED","RESTARTED","PAUSED","VIEWED","LOGIN","LOGOUT","REQUESTED","REJECTED","APPROVED","FAILED","UNKNOWN"]},"agent_AuditResource":{"type":"string","enum":["TOPIC","TOPIC_REQUEST","TOPIC_DATA","DATASET","QUOTAS","BROKER_CONFIG","ACL","SCHEMA","PROCESSOR","CONNECTOR","KUBERNETES_EXTERNAL_APP","KUBERNETES_SECRET","KUBERNETES_NAMESPACE","KUBERNETES_SERVICE_ACCOUNT","KUBERNETES_SERVICE","KUBERNETES_INGRESS","CONSUMER_OFFSET","CONSUMER_GROUP","DATA_POLICIES","USER_MANAGEMENT_GROUP","USER_MANAGEMENT_USER","USER_MANAGEMENT_SERVICE_ACCOUNT","LENSES","USER","CREDENTIALS","CONNECTION","ALERT_EVENT","ALERT_RULE","ALERT_CHANNEL","AUDIT_CHANNEL","EXTERNAL_APP","UNKNOWN","TOPIC_SETTINGS"]},"agent_Page_Audit":{"required":["pagesAmount","totalCount"],"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/agent_Audit"}},"pagesAmount":{"type":"integer","format":"int64"},"totalCount":{"type":"integer","format":"int64"}}},"agent_Audit":{"required":["type","action","user","timestamp","content"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/agent_AuditResource"},"action":{"$ref":"#/components/schemas/agent_AuditChange"},"user":{"type":"string"},"timestamp":{"type":"integer","format":"int64"},"resourceId":{"type":"string"},"resourceName":{"type":"string"},"content":{"$ref":"#/components/schemas/agent_Map_String_String"}}},"agent_Map_String_String":{"type":"object","additionalProperties":{"type":"string"}},"agent_BadRequest":{"required":["error"],"type":"object","properties":{"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"error":{"type":"string"},"errorType":{"type":"string"}}},"agent_FieldError":{"required":["field","error"],"type":"object","properties":{"field":{"type":"string"},"error":{"type":"string"},"lineNumber":{"type":"integer"},"columnNumber":{"type":"integer"}}},"agent_Unauthorized":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"errorType":{"type":"string"}}},"agent_LicenseError":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"errorType":{"type":"string"}}},"agent_Forbidden":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"errorType":{"type":"string"}}},"agent_NotFound":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"errorType":{"type":"string"}}},"agent_InternalError":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"errorType":{"type":"string"}}}}},"paths":{"/api/v1/environments/{environment}/proxy/api/audit":{"get":{"tags":["agent_Audits"],"summary":"List audit entries","description":"Returns a list of audit entries","operationId":"listAudits","parameters":[{"name":"environment","in":"path","required":true,"schema":{"type":"string"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer"}},{"name":"user","in":"query","required":false,"schema":{"type":"string"}},{"name":"action","in":"query","required":false,"schema":{"$ref":"#/components/schemas/agent_AuditChange"}},{"name":"type","in":"query","required":false,"schema":{"$ref":"#/components/schemas/agent_AuditResource"}},{"name":"filter","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_Page_Audit"}}}},"400":{"description":"The request input was invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_BadRequest"}}}},"401":{"description":"Authentication error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_Unauthorized"}}}},"402":{"description":"The purchased Lenses license does not provide access to this feature","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_LicenseError"}}}},"403":{"description":"Authorisation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_Forbidden"}}}},"404":{"description":"The requested resource cannot be found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_NotFound"}}}},"500":{"description":"An internal server error has occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_InternalError"}}}}}}}}}
```

## Delete audit entries up to timestamp

> Deletes the audit entries up to the timestamp

```json
{"openapi":"3.0.0","info":{"title":"Lenses API","version":"6.1"},"tags":[{"name":"agent_Audits"}],"servers":[{"url":"{server}","variables":{"server":{"default":"https://api.example.com"}}}],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"The bearer token can be obtained by creating a ServiceAccount.\n"},"cookieAuth":{"type":"apiKey","in":"cookie","name":"session_id","description":"On successful SAML/SSO login, the API will set a cookie with a session id.\n"}},"schemas":{"agent_BadRequest":{"required":["error"],"type":"object","properties":{"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"error":{"type":"string"},"errorType":{"type":"string"}}},"agent_FieldError":{"required":["field","error"],"type":"object","properties":{"field":{"type":"string"},"error":{"type":"string"},"lineNumber":{"type":"integer"},"columnNumber":{"type":"integer"}}},"agent_Unauthorized":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"errorType":{"type":"string"}}},"agent_LicenseError":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"errorType":{"type":"string"}}},"agent_Forbidden":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"errorType":{"type":"string"}}},"agent_NotFound":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"errorType":{"type":"string"}}},"agent_InternalError":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"errorType":{"type":"string"}}}}},"paths":{"/api/v1/environments/{environment}/proxy/api/audit":{"delete":{"tags":["agent_Audits"],"summary":"Delete audit entries up to timestamp","description":"Deletes the audit entries up to the timestamp","operationId":"deleteAudits","parameters":[{"name":"environment","in":"path","required":true,"schema":{"type":"string"}},{"name":"timestamp","in":"query","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":""},"400":{"description":"The request input was invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_BadRequest"}}}},"401":{"description":"Authentication error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_Unauthorized"}}}},"402":{"description":"The purchased Lenses license does not provide access to this feature","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_LicenseError"}}}},"403":{"description":"Authorisation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_Forbidden"}}}},"404":{"description":"The requested resource cannot be found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_NotFound"}}}},"500":{"description":"An internal server error has occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_InternalError"}}}}}}}}}
```

## Get audit metadata information

> Returns the audits metadata information

```json
{"openapi":"3.0.0","info":{"title":"Lenses API","version":"6.1"},"tags":[{"name":"agent_Audits"}],"servers":[{"url":"{server}","variables":{"server":{"default":"https://api.example.com"}}}],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"The bearer token can be obtained by creating a ServiceAccount.\n"},"cookieAuth":{"type":"apiKey","in":"cookie","name":"session_id","description":"On successful SAML/SSO login, the API will set a cookie with a session id.\n"}},"schemas":{"agent_AuditMetadata":{"type":"object","properties":{"users":{"type":"array","items":{"type":"string"}},"actions":{"type":"array","items":{"$ref":"#/components/schemas/agent_AuditChange"}},"types":{"type":"array","items":{"$ref":"#/components/schemas/agent_AuditResource"}}}},"agent_AuditChange":{"type":"string","enum":["ADD","REMOVE","UPDATE","PATCH","INSERT","STARTED","STOPPED","SCALED","RESTARTED","PAUSED","VIEWED","LOGIN","LOGOUT","REQUESTED","REJECTED","APPROVED","FAILED","UNKNOWN"]},"agent_AuditResource":{"type":"string","enum":["TOPIC","TOPIC_REQUEST","TOPIC_DATA","DATASET","QUOTAS","BROKER_CONFIG","ACL","SCHEMA","PROCESSOR","CONNECTOR","KUBERNETES_EXTERNAL_APP","KUBERNETES_SECRET","KUBERNETES_NAMESPACE","KUBERNETES_SERVICE_ACCOUNT","KUBERNETES_SERVICE","KUBERNETES_INGRESS","CONSUMER_OFFSET","CONSUMER_GROUP","DATA_POLICIES","USER_MANAGEMENT_GROUP","USER_MANAGEMENT_USER","USER_MANAGEMENT_SERVICE_ACCOUNT","LENSES","USER","CREDENTIALS","CONNECTION","ALERT_EVENT","ALERT_RULE","ALERT_CHANNEL","AUDIT_CHANNEL","EXTERNAL_APP","UNKNOWN","TOPIC_SETTINGS"]},"agent_BadRequest":{"required":["error"],"type":"object","properties":{"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"error":{"type":"string"},"errorType":{"type":"string"}}},"agent_FieldError":{"required":["field","error"],"type":"object","properties":{"field":{"type":"string"},"error":{"type":"string"},"lineNumber":{"type":"integer"},"columnNumber":{"type":"integer"}}},"agent_Unauthorized":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"errorType":{"type":"string"}}},"agent_LicenseError":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"errorType":{"type":"string"}}},"agent_Forbidden":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"errorType":{"type":"string"}}},"agent_NotFound":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"errorType":{"type":"string"}}},"agent_InternalError":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"errorType":{"type":"string"}}}}},"paths":{"/api/v1/environments/{environment}/proxy/api/audit/values":{"get":{"tags":["agent_Audits"],"summary":"Get audit metadata information","description":"Returns the audits metadata information","operationId":"getAuditMetadata","parameters":[{"name":"environment","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_AuditMetadata"}}}},"400":{"description":"The request input was invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_BadRequest"}}}},"401":{"description":"Authentication error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_Unauthorized"}}}},"402":{"description":"The purchased Lenses license does not provide access to this feature","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_LicenseError"}}}},"403":{"description":"Authorisation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_Forbidden"}}}},"404":{"description":"The requested resource cannot be found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_NotFound"}}}},"500":{"description":"An internal server error has occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_InternalError"}}}}}}}}}
```

## List audit channels

> Lists audit channels ordered by their creation time (most recent first)

```json
{"openapi":"3.0.0","info":{"title":"Lenses API","version":"6.1"},"tags":[{"name":"agent_Audits"}],"servers":[{"url":"{server}","variables":{"server":{"default":"https://api.example.com"}}}],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"The bearer token can be obtained by creating a ServiceAccount.\n"},"cookieAuth":{"type":"apiKey","in":"cookie","name":"session_id","description":"On successful SAML/SSO login, the API will set a cookie with a session id.\n"}},"schemas":{"agent_ChannelField":{"type":"string","enum":["name","templateName","createdAt","updatedAt"]},"agent_Order":{"type":"string","enum":["asc","desc"]},"agent_Page_HttpChannelEntity":{"required":["pagesAmount","totalCount"],"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/agent_HttpChannelEntity"}},"pagesAmount":{"type":"integer","format":"int64"},"totalCount":{"type":"integer","format":"int64"}}},"agent_HttpChannelEntity":{"required":["id","name","templateName","templateVersion","connectionName","createdAt","createdBy","updatedAt","updatedBy","enabled","lrn"],"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"templateName":{"type":"string"},"templateVersion":{"type":"integer"},"connectionName":{"type":"string"},"properties":{"type":"array","items":{"$ref":"#/components/schemas/agent_PropertyValue"}},"createdAt":{"type":"string","format":"date-time"},"createdBy":{"type":"string"},"updatedAt":{"type":"string","format":"date-time"},"updatedBy":{"type":"string"},"enabled":{"type":"boolean"},"lrn":{"type":"string"}}},"agent_PropertyValue":{"required":["key","value"],"type":"object","properties":{"key":{"type":"string"},"value":{"$ref":"#/components/schemas/agent_Json"}}},"agent_Json":{},"agent_BadRequest":{"required":["error"],"type":"object","properties":{"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"error":{"type":"string"},"errorType":{"type":"string"}}},"agent_FieldError":{"required":["field","error"],"type":"object","properties":{"field":{"type":"string"},"error":{"type":"string"},"lineNumber":{"type":"integer"},"columnNumber":{"type":"integer"}}},"agent_Unauthorized":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"errorType":{"type":"string"}}},"agent_LicenseError":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"errorType":{"type":"string"}}},"agent_Forbidden":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"errorType":{"type":"string"}}},"agent_NotFound":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"errorType":{"type":"string"}}},"agent_InternalError":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"errorType":{"type":"string"}}}}},"paths":{"/api/v1/environments/{environment}/proxy/api/v1/audit/channels":{"get":{"tags":["agent_Audits"],"summary":"List audit channels","description":"Lists audit channels ordered by their creation time (most recent first)","operationId":"listAuditChannels","parameters":[{"name":"environment","in":"path","required":true,"schema":{"type":"string"}},{"name":"page","in":"query","description":"The page number to be returned, must be greater than zero. Defaults to 1.","required":false,"schema":{"type":"integer"}},{"name":"pageSize","in":"query","description":"The elements amount on a single page, must be greater than zero.","required":true,"schema":{"type":"integer"}},{"name":"templateName","in":"query","description":"Filter by channel template name","required":false,"schema":{"type":"string"}},{"name":"channelName","in":"query","description":"Matches channels by name","required":false,"schema":{"type":"string"}},{"name":"sortField","in":"query","description":"The field to sort results by","required":false,"schema":{"$ref":"#/components/schemas/agent_ChannelField"}},{"name":"sortOrder","in":"query","description":"Sorting order. Defaults to ascending","required":false,"schema":{"$ref":"#/components/schemas/agent_Order"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_Page_HttpChannelEntity"}}}},"400":{"description":"The request input was invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_BadRequest"}}}},"401":{"description":"Authentication error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_Unauthorized"}}}},"402":{"description":"The purchased Lenses license does not provide access to this feature","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_LicenseError"}}}},"403":{"description":"Authorisation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_Forbidden"}}}},"404":{"description":"The requested resource cannot be found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_NotFound"}}}},"500":{"description":"An internal server error has occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_InternalError"}}}}}}}}}
```

## Create audit channel

> The JSON object representing the properties to set this channel with

```json
{"openapi":"3.0.0","info":{"title":"Lenses API","version":"6.1"},"tags":[{"name":"agent_Audits"}],"servers":[{"url":"{server}","variables":{"server":{"default":"https://api.example.com"}}}],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"The bearer token can be obtained by creating a ServiceAccount.\n"},"cookieAuth":{"type":"apiKey","in":"cookie","name":"session_id","description":"On successful SAML/SSO login, the API will set a cookie with a session id.\n"}},"schemas":{"agent_NewChannelApiEntity":{"required":["name","templateName","connectionName"],"type":"object","properties":{"name":{"type":"string"},"templateName":{"type":"string"},"connectionName":{"type":"string"},"properties":{"type":"array","items":{"$ref":"#/components/schemas/agent_PropertyValue"}},"propertiesObject":{"$ref":"#/components/schemas/agent_JsonObject"}}},"agent_PropertyValue":{"required":["key","value"],"type":"object","properties":{"key":{"type":"string"},"value":{"$ref":"#/components/schemas/agent_Json"}}},"agent_Json":{},"agent_JsonObject":{"type":"object","description":"JSON Schema representation of the configuration properties"},"agent_NewChannelResponse":{"required":["id"],"type":"object","properties":{"id":{"type":"string"}}},"agent_BadRequest":{"required":["error"],"type":"object","properties":{"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"error":{"type":"string"},"errorType":{"type":"string"}}},"agent_FieldError":{"required":["field","error"],"type":"object","properties":{"field":{"type":"string"},"error":{"type":"string"},"lineNumber":{"type":"integer"},"columnNumber":{"type":"integer"}}},"agent_Unauthorized":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"errorType":{"type":"string"}}},"agent_LicenseError":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"errorType":{"type":"string"}}},"agent_Forbidden":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"errorType":{"type":"string"}}},"agent_NotFound":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"errorType":{"type":"string"}}},"agent_Conflict":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"errorType":{"type":"string"}}},"agent_InternalError":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"errorType":{"type":"string"}}}}},"paths":{"/api/v1/environments/{environment}/proxy/api/v1/audit/channels":{"post":{"tags":["agent_Audits"],"summary":"Create audit channel","description":"The JSON object representing the properties to set this channel with","operationId":"createAuditChannel","parameters":[{"name":"environment","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_NewChannelApiEntity"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_NewChannelResponse"}}}},"400":{"description":"The request input was invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_BadRequest"}}}},"401":{"description":"Authentication error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_Unauthorized"}}}},"402":{"description":"The purchased Lenses license does not provide access to this feature","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_LicenseError"}}}},"403":{"description":"Authorisation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_Forbidden"}}}},"404":{"description":"The requested resource cannot be found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_NotFound"}}}},"409":{"description":"The supplied identifier is already being used by another resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_Conflict"}}}},"500":{"description":"An internal server error has occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_InternalError"}}}}}}}}}
```

## Get audit channel details

> Get the audit channel details

```json
{"openapi":"3.0.0","info":{"title":"Lenses API","version":"6.1"},"tags":[{"name":"agent_Audits"}],"servers":[{"url":"{server}","variables":{"server":{"default":"https://api.example.com"}}}],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"The bearer token can be obtained by creating a ServiceAccount.\n"},"cookieAuth":{"type":"apiKey","in":"cookie","name":"session_id","description":"On successful SAML/SSO login, the API will set a cookie with a session id.\n"}},"schemas":{"agent_HttpChannelEntity":{"required":["id","name","templateName","templateVersion","connectionName","createdAt","createdBy","updatedAt","updatedBy","enabled","lrn"],"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"templateName":{"type":"string"},"templateVersion":{"type":"integer"},"connectionName":{"type":"string"},"properties":{"type":"array","items":{"$ref":"#/components/schemas/agent_PropertyValue"}},"createdAt":{"type":"string","format":"date-time"},"createdBy":{"type":"string"},"updatedAt":{"type":"string","format":"date-time"},"updatedBy":{"type":"string"},"enabled":{"type":"boolean"},"lrn":{"type":"string"}}},"agent_PropertyValue":{"required":["key","value"],"type":"object","properties":{"key":{"type":"string"},"value":{"$ref":"#/components/schemas/agent_Json"}}},"agent_Json":{},"agent_BadRequest":{"required":["error"],"type":"object","properties":{"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"error":{"type":"string"},"errorType":{"type":"string"}}},"agent_FieldError":{"required":["field","error"],"type":"object","properties":{"field":{"type":"string"},"error":{"type":"string"},"lineNumber":{"type":"integer"},"columnNumber":{"type":"integer"}}},"agent_Unauthorized":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"errorType":{"type":"string"}}},"agent_LicenseError":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"errorType":{"type":"string"}}},"agent_Forbidden":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"errorType":{"type":"string"}}},"agent_NotFound":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"errorType":{"type":"string"}}},"agent_InternalError":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"errorType":{"type":"string"}}}}},"paths":{"/api/v1/environments/{environment}/proxy/api/v1/audit/channels/{id}":{"get":{"tags":["agent_Audits"],"summary":"Get audit channel details","description":"Get the audit channel details","operationId":"getAuditChannel","parameters":[{"name":"environment","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","description":"The channel id","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_HttpChannelEntity"}}}},"400":{"description":"The request input was invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_BadRequest"}}}},"401":{"description":"Authentication error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_Unauthorized"}}}},"402":{"description":"The purchased Lenses license does not provide access to this feature","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_LicenseError"}}}},"403":{"description":"Authorisation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_Forbidden"}}}},"404":{"description":"The requested resource cannot be found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_NotFound"}}}},"500":{"description":"An internal server error has occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_InternalError"}}}}}}}}}
```

## Update audit channel

> Update audit channel

```json
{"openapi":"3.0.0","info":{"title":"Lenses API","version":"6.1"},"tags":[{"name":"agent_Audits"}],"servers":[{"url":"{server}","variables":{"server":{"default":"https://api.example.com"}}}],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"The bearer token can be obtained by creating a ServiceAccount.\n"},"cookieAuth":{"type":"apiKey","in":"cookie","name":"session_id","description":"On successful SAML/SSO login, the API will set a cookie with a session id.\n"}},"schemas":{"agent_UpdateChannelApiEntity":{"required":["name","connectionName"],"type":"object","properties":{"name":{"type":"string"},"connectionName":{"type":"string"},"enabled":{"type":"boolean"},"properties":{"type":"array","items":{"$ref":"#/components/schemas/agent_PropertyValue"}},"propertiesObject":{"$ref":"#/components/schemas/agent_JsonObject"}}},"agent_PropertyValue":{"required":["key","value"],"type":"object","properties":{"key":{"type":"string"},"value":{"$ref":"#/components/schemas/agent_Json"}}},"agent_Json":{},"agent_JsonObject":{"type":"object","description":"JSON Schema representation of the configuration properties"},"agent_BadRequest":{"required":["error"],"type":"object","properties":{"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"error":{"type":"string"},"errorType":{"type":"string"}}},"agent_FieldError":{"required":["field","error"],"type":"object","properties":{"field":{"type":"string"},"error":{"type":"string"},"lineNumber":{"type":"integer"},"columnNumber":{"type":"integer"}}},"agent_Unauthorized":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"errorType":{"type":"string"}}},"agent_LicenseError":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"errorType":{"type":"string"}}},"agent_Forbidden":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"errorType":{"type":"string"}}},"agent_NotFound":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"errorType":{"type":"string"}}},"agent_Conflict":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"errorType":{"type":"string"}}},"agent_InternalError":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"errorType":{"type":"string"}}}}},"paths":{"/api/v1/environments/{environment}/proxy/api/v1/audit/channels/{id}":{"put":{"tags":["agent_Audits"],"summary":"Update audit channel","description":"Update audit channel","operationId":"updateAuditChannel","parameters":[{"name":"environment","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","description":"The channel id","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"description":"The JSON object representing the properties to set this channel with","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_UpdateChannelApiEntity"}}},"required":true},"responses":{"200":{"description":""},"400":{"description":"The request input was invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_BadRequest"}}}},"401":{"description":"Authentication error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_Unauthorized"}}}},"402":{"description":"The purchased Lenses license does not provide access to this feature","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_LicenseError"}}}},"403":{"description":"Authorisation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_Forbidden"}}}},"404":{"description":"The requested resource cannot be found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_NotFound"}}}},"409":{"description":"The supplied identifier is already being used by another resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_Conflict"}}}},"500":{"description":"An internal server error has occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_InternalError"}}}}}}}}}
```

## Delete a channel

> Permanently delete a channel

```json
{"openapi":"3.0.0","info":{"title":"Lenses API","version":"6.1"},"tags":[{"name":"agent_Audits"}],"servers":[{"url":"{server}","variables":{"server":{"default":"https://api.example.com"}}}],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"The bearer token can be obtained by creating a ServiceAccount.\n"},"cookieAuth":{"type":"apiKey","in":"cookie","name":"session_id","description":"On successful SAML/SSO login, the API will set a cookie with a session id.\n"}},"schemas":{"agent_BadRequest":{"required":["error"],"type":"object","properties":{"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"error":{"type":"string"},"errorType":{"type":"string"}}},"agent_FieldError":{"required":["field","error"],"type":"object","properties":{"field":{"type":"string"},"error":{"type":"string"},"lineNumber":{"type":"integer"},"columnNumber":{"type":"integer"}}},"agent_Unauthorized":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"errorType":{"type":"string"}}},"agent_LicenseError":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"errorType":{"type":"string"}}},"agent_Forbidden":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"errorType":{"type":"string"}}},"agent_NotFound":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"errorType":{"type":"string"}}},"agent_InternalError":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"errorType":{"type":"string"}}}}},"paths":{"/api/v1/environments/{environment}/proxy/api/v1/audit/channels/{id}":{"delete":{"tags":["agent_Audits"],"summary":"Delete a channel","description":"Permanently delete a channel","operationId":"deleteAuditChannel","parameters":[{"name":"environment","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","description":"The channel id","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":""},"400":{"description":"The request input was invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_BadRequest"}}}},"401":{"description":"Authentication error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_Unauthorized"}}}},"402":{"description":"The purchased Lenses license does not provide access to this feature","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_LicenseError"}}}},"403":{"description":"Authorisation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_Forbidden"}}}},"404":{"description":"The requested resource cannot be found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_NotFound"}}}},"500":{"description":"An internal server error has occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_InternalError"}}}}}}}}}
```

## Patch audit channel

> Patch an audit channel

```json
{"openapi":"3.0.0","info":{"title":"Lenses API","version":"6.1"},"tags":[{"name":"agent_Audits"}],"servers":[{"url":"{server}","variables":{"server":{"default":"https://api.example.com"}}}],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"The bearer token can be obtained by creating a ServiceAccount.\n"},"cookieAuth":{"type":"apiKey","in":"cookie","name":"session_id","description":"On successful SAML/SSO login, the API will set a cookie with a session id.\n"}},"schemas":{"agent_PatchChannelApiEntity":{"type":"object","properties":{"name":{"type":"string"},"connectionName":{"type":"string"},"enabled":{"type":"boolean"},"properties":{"type":"array","items":{"$ref":"#/components/schemas/agent_PropertyValue"}},"propertiesObject":{"$ref":"#/components/schemas/agent_JsonObject"}}},"agent_PropertyValue":{"required":["key","value"],"type":"object","properties":{"key":{"type":"string"},"value":{"$ref":"#/components/schemas/agent_Json"}}},"agent_Json":{},"agent_JsonObject":{"type":"object","description":"JSON Schema representation of the configuration properties"},"agent_BadRequest":{"required":["error"],"type":"object","properties":{"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"error":{"type":"string"},"errorType":{"type":"string"}}},"agent_FieldError":{"required":["field","error"],"type":"object","properties":{"field":{"type":"string"},"error":{"type":"string"},"lineNumber":{"type":"integer"},"columnNumber":{"type":"integer"}}},"agent_Unauthorized":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"errorType":{"type":"string"}}},"agent_LicenseError":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"errorType":{"type":"string"}}},"agent_Forbidden":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"errorType":{"type":"string"}}},"agent_NotFound":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"errorType":{"type":"string"}}},"agent_Conflict":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"errorType":{"type":"string"}}},"agent_InternalError":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"errorType":{"type":"string"}}}}},"paths":{"/api/v1/environments/{environment}/proxy/api/v1/audit/channels/{id}":{"patch":{"tags":["agent_Audits"],"summary":"Patch audit channel","description":"Patch an audit channel","operationId":"patchAuditChannel","parameters":[{"name":"environment","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","description":"The channel id","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"description":"The JSON object representing the properties to set this channel with","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_PatchChannelApiEntity"}}},"required":true},"responses":{"200":{"description":""},"400":{"description":"The request input was invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_BadRequest"}}}},"401":{"description":"Authentication error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_Unauthorized"}}}},"402":{"description":"The purchased Lenses license does not provide access to this feature","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_LicenseError"}}}},"403":{"description":"Authorisation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_Forbidden"}}}},"404":{"description":"The requested resource cannot be found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_NotFound"}}}},"409":{"description":"The supplied identifier is already being used by another resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_Conflict"}}}},"500":{"description":"An internal server error has occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_InternalError"}}}}}}}}}
```

## List audit channel templates

> List channel templates and their applicable connections

```json
{"openapi":"3.0.0","info":{"title":"Lenses API","version":"6.1"},"tags":[{"name":"agent_Audits"}],"servers":[{"url":"{server}","variables":{"server":{"default":"https://api.example.com"}}}],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"The bearer token can be obtained by creating a ServiceAccount.\n"},"cookieAuth":{"type":"apiKey","in":"cookie","name":"session_id","description":"On successful SAML/SSO login, the API will set a cookie with a session id.\n"}},"schemas":{"agent_ChannelTemplate":{"required":["id","name","templateVersion","version","enabled","builtIn","metadata","jsonSchema"],"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"templateVersion":{"type":"integer"},"version":{"type":"string"},"enabled":{"type":"boolean"},"builtIn":{"type":"boolean"},"metadata":{"$ref":"#/components/schemas/agent_TemplateMetadata"},"configuration":{"type":"array","items":{"$ref":"#/components/schemas/agent_TemplateProperty"}},"suitableConnections":{"type":"array","items":{"$ref":"#/components/schemas/agent_SuitableConnection"}},"jsonSchema":{"$ref":"#/components/schemas/agent_JsonObject"}}},"agent_TemplateMetadata":{"required":["author"],"type":"object","properties":{"author":{"type":"string"},"description":{"type":"string"}}},"agent_TemplateProperty":{"required":["id","key","displayName","type","required","provided"],"type":"object","properties":{"id":{"type":"integer"},"key":{"type":"string"},"displayName":{"type":"string"},"placeholder":{"type":"string"},"description":{"type":"string"},"type":{"$ref":"#/components/schemas/agent_TemplatePropertyType"},"required":{"type":"boolean"},"provided":{"type":"boolean"}}},"agent_TemplatePropertyType":{"required":["name","displayName"],"type":"object","properties":{"name":{"$ref":"#/components/schemas/agent_KeyDataType"},"displayName":{"type":"string"},"enumValues":{"type":"array","items":{"type":"string"},"minItems":1}}},"agent_KeyDataType":{"type":"string","description":"The data type of the property","enum":["STRING","ARRAY","MULTILINE","SECRET","DOUBLE","LONG","BOOLEAN","BASE64","ENUM","MAP"]},"agent_SuitableConnection":{"required":["templateName","name"],"type":"object","properties":{"templateName":{"type":"string"},"name":{"type":"string"}}},"agent_JsonObject":{"type":"object","description":"JSON Schema representation of the configuration properties"},"agent_BadRequest":{"required":["error"],"type":"object","properties":{"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"error":{"type":"string"},"errorType":{"type":"string"}}},"agent_FieldError":{"required":["field","error"],"type":"object","properties":{"field":{"type":"string"},"error":{"type":"string"},"lineNumber":{"type":"integer"},"columnNumber":{"type":"integer"}}},"agent_Unauthorized":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"errorType":{"type":"string"}}},"agent_LicenseError":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"errorType":{"type":"string"}}},"agent_Forbidden":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"errorType":{"type":"string"}}},"agent_NotFound":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"errorType":{"type":"string"}}},"agent_InternalError":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"errorType":{"type":"string"}}}}},"paths":{"/api/v1/environments/{environment}/proxy/api/v1/audit/channel-templates":{"get":{"tags":["agent_Audits"],"summary":"List audit channel templates","description":"List channel templates and their applicable connections","operationId":"listAuditChannelTemplates","parameters":[{"name":"environment","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/agent_ChannelTemplate"}}}}},"400":{"description":"The request input was invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_BadRequest"}}}},"401":{"description":"Authentication error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_Unauthorized"}}}},"402":{"description":"The purchased Lenses license does not provide access to this feature","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_LicenseError"}}}},"403":{"description":"Authorisation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_Forbidden"}}}},"404":{"description":"The requested resource cannot be found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_NotFound"}}}},"500":{"description":"An internal server error has occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_InternalError"}}}}}}}}}
```
