> ## Documentation Index
> Fetch the complete documentation index at: https://docs.energy.nayax.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get an incident's session and command timeline

> The sessions and OCPP commands on the incident's roster stations within the incident's window, merged chronologically, keyset-paginated. Each entry carries a kind (SESSION or ACTIVITY) and the full detail for that row.



## OpenAPI

````yaml /api/specs/incident-management-api.json get /incident-management/v1/incidents/{id}/timeline
openapi: 3.0.0
info:
  title: Lynkwell API
  version: 1.377.0
  description: API Documentation for the Incident Management Service
servers:
  - url: https://api.lynkwell.com
security: []
tags: []
paths:
  /incident-management/v1/incidents/{id}/timeline:
    get:
      tags:
        - Incidents
      summary: Get an incident's session and command timeline
      description: >-
        The sessions and OCPP commands on the incident's roster stations within
        the incident's window, merged chronologically, keyset-paginated. Each
        entry carries a kind (SESSION or ACTIVITY) and the full detail for that
        row.
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
        - in: query
          name: limit
          schema:
            type: string
            pattern: ^[1-9][0-9]?$|^100$
        - in: query
          name: startingAfter
          schema:
            type: string
        - in: query
          name: networkId
          schema:
            type: string
      responses:
        '200':
          description: A page of timeline entries.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      items:
                        type: array
                        items:
                          description: >-
                            A timeline entry; its kind (SESSION or ACTIVITY)
                            determines its fields. A SESSION entry is an
                            IncidentSession plus a resolved startToken; an
                            ACTIVITY entry is an IncidentActivity. The card
                            credentials in an activity's OCPP metadata are
                            masked.
                          oneOf:
                            - allOf:
                                - type: object
                                  required:
                                    - kind
                                  properties:
                                    kind:
                                      type: string
                                      enum:
                                        - SESSION
                                    startToken:
                                      type: object
                                      description: >-
                                        The resolved start token; absent when
                                        unmatched.
                                      properties:
                                        tokenId:
                                          type: string
                                        type:
                                          type: string
                                        name:
                                          type: string
                                - $ref: '#/components/schemas/IncidentSession'
                            - allOf:
                                - type: object
                                  required:
                                    - kind
                                  properties:
                                    kind:
                                      type: string
                                      enum:
                                        - ACTIVITY
                                - $ref: '#/components/schemas/IncidentActivity'
                      hasMore:
                        type: boolean
                    required:
                      - items
                      - hasMore
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IncidentBadRequestError'
        '401':
          description: Missing or invalid token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IncidentUnauthorizedError'
        '403':
          description: Insufficient scope. The body is a plain-text message, not JSON.
          content:
            text/plain:
              schema:
                type: string
        '404':
          description: Incident not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IncidentNotFoundError'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IncidentInternalServerError'
      security:
        - oauth2:
            - read:incident
components:
  schemas:
    IncidentSession:
      type: object
      description: >-
        A charging session on a station — the SESSION rows of the timeline and
        feed, and the session drill-down. On a timeline or feed SESSION row the
        record additionally carries a `kind` discriminator and a resolved
        `startToken` ({ tokenId, type, name }); the session drill-down (GET
        /sessions/{id}) appends `startToken` without the `kind`. `metadata` is
        absent on a session whose metadata was never written.
      properties:
        id:
          type: string
        networkId:
          type: string
        stationId:
          type: string
        connectorId:
          type: integer
        tokenId:
          type: string
          description: >-
            Identity-service id of the token the session was started with, when
            known.
        outcome:
          type: string
          description: >-
            Absent while the session is in flight. Current values are COMPLETED,
            FAILED_TO_START, FAILED_DURING_CHARGE.
        startedAt:
          type: string
          format: date-time
        endedAt:
          type: string
          format: date-time
        pluggedInAt:
          type: string
          format: date-time
          description: Start of the physical occupancy window.
        pluggedOutAt:
          type: string
          format: date-time
          description: End of the physical occupancy window; absent while still plugged in.
        metadata:
          type: object
          additionalProperties: true
          description: >-
            Open session metadata (e.g. observedActive, stopReason). The card
            credential keys (idTag, idToken, parentIdTag, groupIdToken,
            additionalIdToken) are masked here as well, though no producer
            writes one today.
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
      required:
        - id
        - networkId
        - stationId
        - startedAt
        - createdAt
        - updatedAt
    IncidentActivity:
      type: object
      description: >-
        An operator or CSMS action on a station — the OCPP command records that
        make up the ACTIVITY rows of the timeline and feed.
      properties:
        id:
          type: string
        networkId:
          type: string
        stationId:
          type: string
        connectorId:
          type: integer
          description: >-
            Set for connector-scoped commands (e.g. UnlockConnector,
            RemoteStart).
        incidentId:
          type: string
          description: The incident this command was tagged to, when any.
        type:
          type: string
          description: >-
            The command. Current values are RESET, FIRMWARE_UPDATE,
            DIAGNOSTICS_PULL, CONFIG_CHANGE, REMOTE_START_TRANSACTION,
            REMOTE_STOP_TRANSACTION, UNLOCK_CONNECTOR.
        status:
          type: string
          description: The outcome. Current values are PENDING, SUCCEEDED, FAILED.
        initiatedBy:
          type: string
          description: >-
            NetworkUser id of the operator, or 'CSMS' when the platform
            initiated it.
        result:
          type: string
          description: The command result string, when one was returned.
        metadata:
          type: object
          additionalProperties: true
          description: >-
            The verbatim OCPP request/response payloads. An open bag whose keys
            vary by command and OCPP version. The card credentials — idTag,
            idToken, parentIdTag, groupIdToken, additionalIdToken — are masked
            to "XXXX" plus their last four characters wherever they nest, and
            any username/password embedded in a destination URL (location,
            remoteLocation) is blanked; every other value, including ids, URL
            host/path, and configuration key/values, is returned as the station
            sent it.
        initiatedAt:
          type: string
          format: date-time
        completedAt:
          type: string
          format: date-time
      required:
        - id
        - networkId
        - stationId
        - type
        - status
        - initiatedBy
        - metadata
        - initiatedAt
    IncidentBadRequestError:
      type: object
      description: The response body for a 400 request.
      properties:
        type:
          type: string
          enum:
            - BAD_REQUEST
        code:
          type: string
          description: >-
            A stable machine-readable error code identifying the specific
            validation failure.
        message:
          type: string
      required:
        - type
        - code
        - message
    IncidentUnauthorizedError:
      type: object
      description: The response body for a 401 request (missing or invalid token).
      properties:
        message:
          type: string
      required:
        - message
    IncidentNotFoundError:
      type: object
      description: The response body for a 404 request.
      properties:
        type:
          type: string
          enum:
            - NOT_FOUND
        code:
          type: string
        message:
          type: string
      required:
        - type
        - code
        - message
    IncidentInternalServerError:
      type: object
      description: The response body for a 500 request.
      properties:
        type:
          type: string
          enum:
            - INTERNAL_ERROR
        message:
          type: string
      required:
        - type
        - message
  securitySchemes:
    oauth2:
      type: oauth2
      description: OAuth2 Client Credentials Flow
      flows:
        clientCredentials:
          tokenUrl: https://lynkwell-prod.us.auth0.com/oauth/token
          scopes:
            read:asset: Retrieve assets
            write:asset: Create and update assets
            read:assetgroup: Retrieve asset groups
            write:assetgroup: Create and update asset groups
            read:assetstatus: Retrieve asset statuses
            read:chargingstationmodel: Retrieve charging station models
            write:chargingstationmodel: Create and update charging station models
            write:network: Create and update networks
            write:sitepartner: Create and update site partners
            read:sitepartner: Retrieve site partners
            write:sitepartneruser: Create and update site partner users
            read:sitepartneruser: Retrieve site partner users
            read:networkaccessprofile: Retrieve network access profiles
            write:paymentprofile: Create payment profile
            write:onboardinglink: Create an onboarding link
            read:invoice: Retrieve an invoice
            write:session: Create or update a session
            read:session: Retrieve a session
            write:ticket: Create a ticket
            write:verificationcode: Send and confirm verification codes
            write:driver: Create and update drivers
            read:driver: Retrieve drivers
            write:token: Create and update tokens
            read:token: Retrieve tokens
            read:tokenvalue: Retrieve token by ID including its value
            write:invitecode: Create and update invite codes
            write:invitation: Create and update invitations
            read:invitation: Retrieve invitations
            read:payment_terminals_payment: Read payments from payment terminal
            abort:session: Abruptly end session
            read:paymentprofile: Retrieve payment profile from payment terminal
            write:ocpp: Sends request over OCPP
            write:ocpp.raw_request: Sends raw request over OCPP
            write:notification.email: Create and update email
            read:invoiceitem: Retrieve invoice item
            read:subscription: Retrieve subscription
            write:plugandcharge_enrollment: Update Plug and Charge enrollment status
            write:projects: Create and update projects
            read:projects: Retrieve projects
            write:project_stations: Create and update project stations
            write:panel: Create and update panels.
            read:panel: Retrieve panels.
            write:webhooks: Create, update, and delete webhooks
            read:webhooks: Retrieve webhooks
            read:incident: Retrieve incidents and their sub-resources
            write:incident: Create, update, comment on, merge, split, and link incidents

````