1. Resource Central
  2. arrow-right
  3. API Calls

API Calls

Records of API calls and their responses are accessible via the API itself.

Attributes

  • id uuid

    The unique ID of the API call.

  • body integer

    The body that was sent in the API call.

  • code integer

    The HTTP status code given in response to the call.

  • creationDate datetime

    The date and time the API call was made.

  • duration integer

    The time in milliseconds lapsed between when the call was made and the response was received.

  • endpoint string

    The type of call and URL.

  • error string

    The returned error message, if any.

  • response string

    The JSON response to the API call.

  • username string

    The username of the user who made the secure call.

Endpoints

List API Calls /api/calls
get

See recent API calls with their codes and responses. View the guide on adding filters to List API calls.

Body Parameters

  • code integer

    The HTTP status code given in response to the call.

  • creationDate datetime

    The date and time the API call was made.

  • endpoint string

    The type of call and URL.

  • userId string

    The ID of the user who made the secure call.

  • countOnly boolean

    When "true", will only return a count of the amount of items in the query.

    Default value:

    false

  • limit integer

    A limit on the number of objects to be returned. Limit can range between 1 and 1000, and the default is 250.

    Default value:

    250

  • page integer

    Page-numbering is based on the value of the "limit" argument. If limit=20, then page=0 will display the hits from 1 to 20. (Page numbers are zero-based.) Using page without a limit returns all items.

  • oderBy string, array

    Order the response by the selected field. Multiple values can be passed, separated by a comma.

Request with curl
-d 'curl -L -g 'http://[subdomain.itempath.com or IP]/api/calls?limit=1&creationDate=[gt]lastWeek&orderby=creationDate' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJmcmVzaCI6ZmFsc2UsImlhdCI6MTY5NzU1NjAyNywianRpIjoiNGZlNjBjYjMtYWQ0NC00YmE0LTg2OTMtMzI5MzFhZjEwZTRjIiwidHlwZSI6ImFjY2VzcyIsImlkZW50aXR5IjoiU2FtcGxlIEFQSSIsIm5iZiI6MTY5NzU1NjAyNywiZXhwIjoxNjk3NTU2OTI3fQ.O3tgEYd-wEHVjLv-fN_9Cm30gwuzHLvQk9L1Ku7VjHk''
Example Response
{
    "calls": [
        {
            "body": null,
            "code": 200,
            "creationDate": "2023-10-10T16:56:07",
            "duration": 31.00728988647461,
            "endpoint": "GET http://test.itempath.com/api/calls/delete",
            "error": null,
            "id": 1,
            "response": "(<Response 24 bytes [200 OK]>, 200)",
            "username": "Sample API"
        }
    ]
}