Session

Archived sessions

Changed on

Retrieves completed charge sessions accessible by the current user, filtered by date range and exactly one of: an installation, a single charger, or an authorized user (the calling user's own id; support may pass any user's id). Results are returned in cursor-paginated pages in the requested order (oldest first by default); when hasMore is true, send the returned cursor as ?cursor= on the next request to fetch the next page. Default page size: 50. Max: 200.

get/api/sessions/archived

Request

  • Base URL
    https://api.zaptec.com
  • URL
    https://api.zaptec.com/api/sessions/archived
  • Auth
    OAuth 2
    Password
    Token URL: https://api.zaptec.com/oauth/token

Query parameters

Fromstring date-time

Inclusive lower bound for session end time. Required.

Tostring date-time

Exclusive upper bound for session end time. Required, must be after from.

InstallationIdstring uuid

Installation to list sessions for. Requires owner role on the installation. Exactly one of installationId, chargerId or authorizedUserId is required.

ChargerIdstring uuid

Single charger to list sessions for. Requires owner role on the charger. Exactly one of installationId, chargerId or authorizedUserId is required.

AuthorizedUserIdstring uuid

User whose sessions to list. Must be the id of the calling user, unless the caller has an Administrator permission covering that user (support access). Exactly one of installationId, chargerId or authorizedUserId is required.

PageSizeinteger

Page size. Default 50, max 200.

Order0 | 1

Sort order for archived sessions, by the time the session was recognized and finalized by the archive (see recognizedDateTime).

0 = RecognizedTimeAscending

1 = RecognizedTimeDescending

Sort order, by the time the session was recognized by the archive. Defaults to RecognizedTimeAscending (oldest first).

0 = RecognizedTimeAscending

1 = RecognizedTimeDescending

Cursorstring

Opaque cursor from a previous response's cursor field. Omit to start from the first page.

Response

OK

cursorstring nullable

Opaque cursor to fetch the next page. Send as ?cursor= on the next request when hasMore is true. Null when there are no further pages.

hasMoreboolean

True when more pages are available beyond this one.

Changes

    • info

      the endpoint scheme security legacy_auth was removed from the API

    • info

      added the new optional query request parameter AuthorizedUserId

    • info

      added the new optional query request parameter Order

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status