Get events

GET /events

Returns api usage events which give insights on what endpoints were called and, therefore, which actions were performed. API usage events include and are not limited to

  • creation, deletion and management of queues
  • creation, deletion and management of listeners
  • creation, deletion and management of api keys
  • creation and broadcasting/publising of messages

Returned data is always limited to the past 24 hours.

Authentication

The target organization for this request will be determined by the supplied access token.

As a prerequisite you need to create an accountopen in new window and follow the onboarding process to also create an organization and an API key.

See also: Authentication.

Examples

curl -X GET http://api.discue.io/v1/events \
  -H 'Accept: application/json' \
  -H 'X-API-KEY: API_KEY'
const headers = {
  'Accept':'application/json',
  'X-API-KEY':'API_KEY'
}

const response = await fetch('http://api.discue.io/v1/events', {
  method: 'GET',  headers
})

const body = await response.json()
import requests
headers = {
  'Accept': 'application/json',
  'X-API-KEY': 'API_KEY'
}

r = requests.get('http://api.discue.io/v1/events', headers = headers)
package main

import (
  "bytes"
  "net/http"
)

func main() {

  headers := map[string][]string{
      "Accept": []string{"application/json"},
      "X-API-KEY": []string{"API_KEY"},
  }

  data := bytes.NewBuffer([]byte{jsonReq})
  req, err := http.NewRequest("GET", "http://api.discue.io/v1/events", data)
  req.Header = headers

  client := &http.Client{}
  resp, err := client.Do(req)
}

Parameters

NameInTypeRequiredDescription
prettyquerybooleanReturn the response pretty printed
eventsquerystringLimit the returned array to a certain number of elements
limitquerynumberLimit the returned array to a certain number of elements
startAfterquerynumber(int64)Return only elements that were stored after the given timestamp. Must be used in conjunction with startAfterId to have an effect
startAfterIdqueryResourceIdMust be used in conjunction with startAfterId to have an effect

Enumerated Values

ParameterValue
eventsall
eventsapi_keys
eventslisteners
eventsmessages
eventsqueues

Responses

200 Response

{
  "events": [
    {
      "id": "string",
      "type": "api_key_added",
      "stored_at": 1657027948150,
      "client": {
        "id": "string"
      },
      "message": {
        "id": "string",
        "name": "string"
      },
      "api_key": {
        "id": "string",
        "name": "string"
      },
      "queue": {
        "id": "string",
        "name": "string"
      },
      "listener": {
        "id": "string",
        "name": "string"
      }
    }
  ],
  "_links": {
    "self": {
      "href": "https://api.discue.io/events"
    }
  }
}

400 Response

{
  "title": "Bad Request",
  "status": 400
}

401 Response

{
  "title": "Unauthorized",
  "status": 401
}

402 Response

{
  "title": "Payment Required",
  "status": 402
}

403 Response

{
  "title": "Forbidden",
  "status": 403
}

404 Response

{
  "title": "Not Found",
  "status": 404
}

405 Response

{
  "title": "Method Not Allowed",
  "status": 405
}

406 Response

{
  "title": "Not Acceptable",
  "status": 406
}

409 Response

{
  "title": "Conflict",
  "status": 409
}

415 Response

{
  "title": "Unsupported Media Type",
  "status": 415
}

422 Response

{
  "title": "Unprocessable Entity",
  "status": 422
}

423 Response

{
  "title": "Locked",
  "status": 423
}

429 Response

{
  "title": "Too Many Requests",
  "status": 429
}

500 Response

{
  "title": "Internal Server Error",
  "status": 500
}

501 Response

{
  "title": "Not Implemented",
  "status": 501
}

503 Response

{
  "title": "Service Unavailable",
  "status": 503
}
StatusMeaningDescriptionSchema
200OKopen in new windowOkGetEventsResponse
400Bad Requestopen in new windowBad RequestInline
401Unauthorizedopen in new windowUnauthorizedInline
402Payment Requiredopen in new windowPayment RequiredInline
403Forbiddenopen in new windowForbiddenInline
404Not Foundopen in new windowNot FoundInline
405Method Not Allowedopen in new windowMethod Not AllowedInline
406Not Acceptableopen in new windowNot AcceptableInline
409Conflictopen in new windowConflictInline
415Unsupported Media Typeopen in new windowUnsupported Media TypeInline
422Unprocessable Entityopen in new windowUnprocessable EntityInline
423Lockedopen in new windowLockedInline
429Too Many Requestsopen in new windowToo Many RequestsInline
500Internal Server Erroropen in new windowInternal Server ErrorInline
501Not Implementedopen in new windowNot ImplementedInline
503Service Unavailableopen in new windowService UnavailableInline

Last Updated:
Contributors: Stefan Pfaffel