Dev's NoxDev's Nox
Activity

Create activity event

Manually emit an activity event. Admin only.

POST
/api/activity

Authorization

bearer
AuthorizationBearer token

User session token. Obtained from POST /api/auth/login.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://loading/api/activity" \  -H "Content-Type: application/json" \  -d '{    "type": "user.registered",    "message": "A new user registered."  }'
{
  "data": {
    "id": 1,
    "type": "user.registered",
    "message": "A new user registered.",
    "details": null,
    "author": "u:1@my-server.com",
    "created_at": "2024-01-01T00:00:00.000Z"
  },
  "error": null,
  "time": 1680000000000,
  "request": "/api/endpoint"
}
{
  "data": null,
  "error": {
    "code": "NOT_FOUND",
    "message": "Resource not found.",
    "status": 404
  },
  "time": 1680000000000,
  "request": "/api/endpoint"
}
{
  "data": null,
  "error": {
    "code": "NOT_FOUND",
    "message": "Resource not found.",
    "status": 404
  },
  "time": 1680000000000,
  "request": "/api/endpoint"
}
{
  "data": null,
  "error": {
    "code": "NOT_FOUND",
    "message": "Resource not found.",
    "status": 404
  },
  "time": 1680000000000,
  "request": "/api/endpoint"
}