Create Audit Log


Create a record of audit logs.

Operation Permissions


Users need to log in to EnOS Application Portal and select an OU.

Request Format


POST https://{apigw-address}/app-portal-service/v2.3/event/log/produce

Request Parameters (Header)


Name Mandatory/Optional Data Type Description
Authorization Optional String
The access token (or bearer token). The format of the parameter’s string is Bearer {your token}. Refer to Log In or Refresh Access Token to learn how to get the access token.
  • If the parameter is specified, the OU information in Access Token should be the same as the orgID parameter.
  • If the parameter is not specified, the operator will be regarded as the Access Key associated with the Service Account.

Request Parameters (Query)


Name Mandatory/Optional Data Type Description
orgId Mandatory String OU ID.

Request Parameters (Body)


Name Mandatory/Optional Data Type Description
subjectId Mandatory String The ID of the audit log subject, such as menu ID or application ID. The parameter value should be up to 64 characters.
subjectType Mandatory String The type of the audit log subject. The parameter value should be up to 64 characters.
upstreamId Optional String The ID of the upstream subject for the audit log subject. For example, the upstream subject of a menu is an application. The parameter value should be up to 64 characters.
upstreamType Optional String The type of the upstream subject for the audit log subject. The parameter value should be up to 64 characters.

Response Parameters


Name Data Type Description
data Boolean The parameter always responses true.

Error Codes


Error Code Description
31400
  • The required parameters are missing.
  • The lengths of parameters are invalid.
  • The OU information in your token does not match the OU information in the orgId parameter.
  • The OU does not acquire this application.
31401 The token is not valid.
31404 The OU does not exist.

Samples

Request Sample


url: /app-portal-service/api/v3/event/log/produce
method: POST

requestBody:
{
    "subjectId": "your_subject_id",
    "subjectType": "your_subject_type",
    "upstreamId": "your_upstream_id",
    "upstreamType": "your_upstream_type"
}

Return Sample


{
  "code": 0,
  "data": true,
  "message": "OK"
}