List Department Audit Log Events

Lists a department's audit log events.

GET

/api/v1/server/departments/{departmentId}/audit-logs

Request

curl -X GET "https://api.melonly.com/api/v1/server/departments/{departmentId}/audit-logs" \
  -H "Authorization: Bearer YOUR_TOKEN"

Response

200

Success

{
  "data": [
    {
      "description": {
        "further": [
          "For a duration of 1 hour"
        ],
        "label": "Created shift for Builderman"
      },
      "id": "7527833441069436928",
      "serverId": "7294057520392310784",
      "timestamp": 1794776859830,
      "type": 8,
      "userId": "7308965405773533184"
    }
  ],
  "page": 1,
  "pageSize": 10,
  "total": 1,
  "totalPages": 1
}

You can order by timestamp (default) or id.

Authorization

Authorizationstringrequired
Your API token as Bearer YOUR_TOKEN. Create one in your server's dashboard settings.

Path parameters

departmentIdstringrequired

Query parameters

pageintegerdefault: 1
1-based page number. Defaults to 1.
pageSizeintegerdefault: 10
Items per page, clamped to 1-100. Defaults to 10.
orderBystring
Field to sort by. See the endpoint description for the accepted values.
sortstring
Sort direction. Defaults to desc.
Allowed values:ascdesc

Response

200 Success. Results are paged and also include page, pageSize, total and totalPages.

idstringrequired
Unique ID.
serverIdstringrequired
Server ID, or department ID for department events.
timestampintegerrequired
When it happened.
userIdstringrequired
Member ID of who did it, or SYSTEM.
applicationIdstring | null
Application the event relates to.
descriptionobject | null
What happened, as { label, further }.
typeinteger | null
Event type.

Errors

StatusMeaning
400Invalid request. validation_failed lists each invalid field in details.fields.
401Missing, invalid or expired token
404Not found
429Rate limited. See Retry-After and details.
500Internal server error