Skip to content

Create activity log

POST
/api/v1/activity-logs
curl --request POST \
--url https://localhost:10001/api/v1/activity-logs \
--header 'Authorization: <Authorization>' \
--header 'Content-Type: application/json' \
--data '{ "action": "example", "logs": {}, "projectId": 1, "resource": "example" }'

Record a new activity log for the active organization or a project and return the persisted record

Activity log payload

Media type application/json
object
action
required
string
logs
required
object
projectId

Must be in the active org; optional

integer
resource
required
string
Example generated
{
"action": "example",
"logs": {},
"projectId": 1,
"resource": "example"
}

Created activity log

Media type application/json

An audit entry recording who acted on which resource and when

object
action
string
createdAt
string format: date-time
id
integer
logs
object
organizationId

Resolved from the active org

integer
organizationName

Resolved from organizationId

string
projectId

Must be in the active org

integer
projectName
string
resource
string
userEmail
string
userId
string
userName
string
uuid

Urn:uuid form

string
Example generated
{
"action": "example",
"logs": {},
"projectId": 1,
"resource": "example",
"userEmail": "example",
"userId": "example",
"userName": "example"
}

Bad request - Invalid request body or project not in active organization

Media type application/json

Error body returned by the governance endpoints; the message is human-readable and not a stable identifier

object
error
string
Example
{
"error": "Invalid request body"
}

Unauthorized - Authentication required

Media type application/json

Error body returned by the governance endpoints; the message is human-readable and not a stable identifier

object
error
string
Example
{
"error": "Invalid request body"
}

Forbidden - No access to the organization or project

Media type application/json

Error body returned by the governance endpoints; the message is human-readable and not a stable identifier

object
error
string
Example
{
"error": "Invalid request body"
}

Organization or project not found

Media type application/json

Error body returned by the governance endpoints; the message is human-readable and not a stable identifier

object
error
string
Example
{
"error": "Invalid request body"
}

Internal server error

Media type application/json

Error body returned by the governance endpoints; the message is human-readable and not a stable identifier

object
error
string
Example
{
"error": "Invalid request body"
}