Create activity log
POST /api/v1/activity-logs Select code sample Fetch cURL
Overview Next
List activity logs by organization
const url = 'https://localhost:10001/api/v1/activity-logs';const options = { method: 'POST', headers: {Authorization: '
', 'Content-Type': 'application/json'}, body: '{"action":"example","createdAt":"example","id":1,"logs":{},"organizationId":1,"organizationName":"example","projectId":1,"projectName":"example","resource":"example","userEmail":"example","userId":"example","userName":"example"}'}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}
curl --request POST \ --url https://localhost:10001/api/v1/activity-logs \ --header 'Authorization:
' \ --header 'Content-Type: application/json' \ --data '{ "action": "example", "createdAt": "example", "id": 1, "logs": {}, "organizationId": 1, "organizationName": "example", "projectId": 1, "projectName": "example", "resource": "example", "userEmail": "example", "userId": "example", "userName": "example" }'
Record a new activity log for the active organization or a project and return the persisted record
Authorizations
Section titled “Authorizations ”Request Body
Section titled “Request Body ”Activity log payload
Media type application/json object action string createdAt string id integer logs object organizationId integer organizationName string projectId integer projectName string resource string userEmail string userId string userName stringExample generated
{ "action": "example", "createdAt": "example", "id": 1, "logs": {}, "organizationId": 1, "organizationName": "example", "projectId": 1, "projectName": "example", "resource": "example", "userEmail": "example", "userId": "example", "userName": "example"}
Responses
Section titled “ Responses ”201
Section titled “201 ”Created activity log
Media type application/json object action string createdAt string id integer logs object organizationId integer organizationName string projectId integer projectName string resource string userEmail string userId string userName stringExample generated
{ "action": "example", "createdAt": "example", "id": 1, "logs": {}, "organizationId": 1, "organizationName": "example", "projectId": 1, "projectName": "example", "resource": "example", "userEmail": "example", "userId": "example", "userName": "example"}
400
Section titled “400 ”Bad request - Invalid request body or project not in active organization
Media type application/json object key additional properties stringExample generated
{ "additionalProperty": "example"}
401
Section titled “401 ”Unauthorized - Authentication required
Media type application/json object key additional properties stringExample generated
{ "additionalProperty": "example"}
403
Section titled “403 ”Forbidden - No access to the organization or project
Media type application/json object key additional properties stringExample generated
{ "additionalProperty": "example"}
404
Section titled “404 ”Organization or project not found
Media type application/json object key additional properties stringExample generated
{ "additionalProperty": "example"}
500
Section titled “500 ”Internal server error
Media type application/json object key additional properties stringExample generated
{ "additionalProperty": "example"}
Previous Overview Next
List activity logs by organization