openapi: 3.1.0
info:
  title: ThingPark things management Devices API
  description: |
    REST interface for Devices management.
  version: "8.1"
servers:
  - url: https://community.thingpark.io/thingpark/wireless/rest
    description: Community
  - url: https://thingparkenterprise.eu.actility.com/thingpark/wireless/rest
    description: Europe
  - url: https://thingparkenterprise.us.actility.com/thingpark/wireless/rest
    description: United-States
  - url: https://thingparkenterprise.au.actility.com/thingpark/wireless/rest
    description: Australia
  - url: https://{hostname}/thingpark/wireless/rest
    description: Self-hosted TPE
    variables:
      hostname:
        default: enterprise.actility.local
        description: Hostname of the self-hosted TPE deployment
paths:
  /subscriptions/mine:
    get:
      tags:
        - subscriptions
      summary: Retrieve Subscription
      description: |
        Retrieve a Subscription detail.

        ### Access rights:
        - `<Subscription>/x`
      responses:
        "200":
          $ref: "#/components/responses/Subscription"
        default:
          $ref: "#/components/responses/Error"
    put:
      tags:
        - subscriptions
      summary: Update Subscription
      description: |
        Update a Subscription.

        ### Access rights:
        - `<Subscription>/RA`
        - `<Subscription>/s1`: `MANAGE_SUBSCRIBER`

        ### Optimistic locking:
        - `<subscription>.occ`
      parameters:
        - $ref: "#/components/parameters/Force"
      requestBody:
        $ref: "#/components/requestBodies/Subscription"
      responses:
        "200":
          $ref: "#/components/responses/Subscription"
        default:
          $ref: "#/components/responses/Error"
    parameters: []
  /subscriptions/mine/appServers:
    get:
      tags:
        - app-servers
      summary: Retrieve application servers
      description: >
        Retrieve the list of application servers of the subscription:

        - application servers with the `SUBSCRIPTION` scope are managed in the
          scope of this subscription,
        - application servers with the `OPERATOR` scope are provided by the
          operator and can't be modified.

        ### Access rights:

        - `<Subscription>/x`

        - `LPWA_MGR::READ_AS_ROUTING_PROFILE`

        - If the authenticated user has domain restrictions, only the following application servers are returned:
          - Application servers not associated with any domain
          - Application servers associated with domains and matching the domain restrictions
      parameters:
        - $ref: "#/components/parameters/PageIndex"
        - name: destinationsRequired
          in: query
          description: >
            TRUE when only Application Servers with at least one destination

            must be returned.


            Only applicable to application servers with the `SUBSCRIPTION` scope.
          schema:
            type: boolean
        - name: query
          in: query
          description: |
            Search appServers with an ID or a name containing the provided term.
            (prefix match)
          schema:
            type: string
        - name: name
          in: query
          description: App server name filtering (prefix match)
          schema:
            type: string
        - name: ID
          in: query
          description: App server ID filtering (prefix match)
          schema:
            type: string
        - name: type
          in: query
          description: >
            Returns Application Servers matching type:

            - `HTTP`

            - `HTTP_CELLULAR`

            - `KAFKA`


            Multiple "type" query parameters can be encoded in the URI (OR

            operation).


            By default, all Application Servers are returned.


            `HTTP_CELLULAR` is deprecated and silently replaced by `HTTP`.


            Only applicable to application servers with the `SUBSCRIPTION` scope.
          style: form
          explode: true
          schema:
            type: array
            items:
              type: string
              enum:
                - HTTP
                - HTTP_CELLULAR
                - KAFKA
        - name: tpxIotFlowConnectorId
          in: query
          description: >
            Returns Application Servers matching TPX IoT Flow Connector ID.


            Multiple "tpxIotFlowConnectorId" query parameters can be encoded in the URI

            (OR operation).


            By default, all Application Servers are returned.


            Only applicable to application servers with the `SUBSCRIPTION` scope.
          style: form
          explode: true
          schema:
            type: array
            items:
              type: string
        - name: tpxIotFlowConnectionId
          in: query
          description: >
            Returns Application Server matching TPX IoT Flow Connection ID.


            By default, all Application Servers are returned.


            Only applicable to application servers with the `SUBSCRIPTION` scope.
          schema:
            type: string
        - name: tpxIotFlowId
          in: query
          description: >
            Returns Application Server matching TPX IoT Flow ID.


            By default, all Application Servers are returned.


            Only applicable to application servers with the `SUBSCRIPTION` scope.
          schema:
            type: string
        - name: baseStationAlarmNotification
          in: query
          description: >
            Returns Kafka Application Servers for which the notification of Base

            Station alarms is enabled.


            By default, all Application Servers are returned.


            Only applicable to application servers with the `SUBSCRIPTION` scope.
          schema:
            type: string
        - name: deviceAlarmNotification
          in: query
          description: >
            Returns Kafka Application Servers for which the notification of

            Device alarms is enabled.


            By default, all Application Servers are returned.


            Only applicable to application servers with the `SUBSCRIPTION` scope.
          schema:
            type: string
        - name: scope
          in: query
          description: |
            Returns application servers matching the scope:
            - `SUBSCRIPTION`
            - `OPERATOR`

            Multiple `scope` query parameters can be encoded in the URI (OR
            operation).

            By default, only application servers in the `SUBSCRIPTION` scope are
            returned.
          style: form
          explode: true
          schema:
            type: array
            items:
              type: string
              enum:
                - SUBSCRIPTION
                - OPERATOR
        - name: sort
          in: query
          description: |
            Defines how results are sorted (&lt;attribute&gt;,&lt;order&gt;).

            The following attributes are supported:
            - 'ID': results are sorted by ID
            - 'name': results are sorted by name

            The following orders are supported:
            - 'asc': ascending order
            - 'desc': descending order

            By default, results are sorted by ID
          schema:
            type: string
            example: name,asc
      responses:
        "200":
          $ref: "#/components/responses/AppServers"
        default:
          $ref: "#/components/responses/Error"
    post:
      tags:
        - app-servers
      summary: Add an application server
      description: >
        Add an application server in the `SUBSCRIPTION` scope.


        The ID of the application server is automatically generated as follow:


        `TWA_<subscriberID>.<uid>.AS`


        Sample:


        `TWA_199906537.7.AS`


        In **ThingPark Enterprise**, this endpoint must not be used to create a

        TPX IoT Flow connection. The Dx-Core API must be used for that purpose.


        ### Access rights:

        - `<Subscription>/a`

        - `LPWA_MGR::WRITE_AS_ROUTING_PROFILE`

        - If the authenticated user has domain restrictions, the application server must match the domain restrictions.
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/AppServer"
            examples:
              HTTP:
                $ref: "#/components/examples/AppServerHttpPost"
        required: true
      responses:
        "201":
          $ref: "#/components/responses/AppServer"
        default:
          $ref: "#/components/responses/Error"
    parameters: []
  "/subscriptions/mine/appServers/{appServerUid}":
    get:
      tags:
        - app-servers
      summary: Retrieve an application server
      description: >
        Retrieve an application server.


        ### Access rights:

        - `<Subscription>/x`

        - `LPWA_MGR::READ_AS_ROUTING_PROFILE`

        - If the authenticated user has domain restrictions, one of the following conditions must be satisfied:
          - The application server is not associated with any domain
          - The application server is associated with at least one domain and matches the domain restrictions
      responses:
        "200":
          $ref: "#/components/responses/AppServer"
        default:
          $ref: "#/components/responses/Error"
    put:
      tags:
        - app-servers
      summary: Update an application server
      description: >
        Update an application server in the `SUBSCRIPTION` scope.


        The uplink/downlink security must be activated if required in TWA

        system-wide configuration (app_server.ul_dl_security_required=1).


        Destination URLs must be HTTPS if required in TWA system-wide

        configuration (app_server.https_destinations_required=1).


        In **ThingPark Enterprise**, this endpoint must not be used to update a

        TPX IoT Flow connection. The Dx-Core API must be used for that purpose.


        ### Access rights:

        - `<Subscription>/a`

        - `LPWA_MGR::WRITE_AS_ROUTING_PROFILE`

        - If the authenticated user has domain restrictions, the application server must match the domain restrictions before and after the update.


        ### Optimistic locking:

        - `<appServer>.occ`
      parameters:
        - $ref: "#/components/parameters/Force"
      requestBody:
        $ref: "#/components/requestBodies/AppServer"
      responses:
        "200":
          $ref: "#/components/responses/AppServer"
        default:
          $ref: "#/components/responses/Error"
    delete:
      tags:
        - app-servers
      summary: Delete an application server
      description: >
        Delete an application server in the `SUBSCRIPTION` scope.


        In **ThingPark Enterprise**, this endpoint must not be used to delete a

        TPX IoT Flow connection. The Dx-Core API must be used for that purpose.


        ### Access rights:

        - `<Subscription>/a`

        - `LPWA_MGR::WRITE_AS_ROUTING_PROFILE`

        - If the authenticated user has domain restrictions, the application server must match the domain restrictions.
      responses:
        "204":
          $ref: "#/components/responses/Delete"
        default:
          $ref: "#/components/responses/Error"
    parameters:
      - $ref: "#/components/parameters/AppServer"
  "/subscriptions/mine/appServers/{appServerUid}/security":
    get:
      tags:
        - app-servers
      summary: Retrieve the security status of an application server
      description: >
        Retrieve the security status of an application server in the
        `SUBSCRIPTION` scope.


        ### Access rights:

        - `<Subscription>/x`

        - `LPWA_MGR::READ_AS_ROUTING_PROFILE`

        - If the authenticated user has domain restrictions, one of the following conditions must be satisfied:
          - The application server is not associated with any domain
          - The application server is associated with at least one domain and matches the domain restrictions
      responses:
        "200":
          $ref: "#/components/responses/SecurityAppServer"
        default:
          $ref: "#/components/responses/Error"
    put:
      tags:
        - app-servers
      summary: Update the security status of an application server
      description: >
        Update the security status of an application server.


        The uplink/downlink security must be activated if required in TWA

        system-wide configuration (app_server.ul_dl_security_required=1).


        ### Access rights:

        - `<Subscription>/a`

        - `LPWA_MGR::WRITE_AS_ROUTING_PROFILE`

        - If the authenticated user has domain restrictions, the application server must match the domain restrictions.


        ### Optimistic locking:

        - `<appServer>.occ`
      parameters:
        - $ref: "#/components/parameters/Force"
      requestBody:
        $ref: "#/components/requestBodies/SecurityAppServer"
      responses:
        "200":
          $ref: "#/components/responses/SecurityAppServer"
        default:
          $ref: "#/components/responses/Error"
    parameters:
      - $ref: "#/components/parameters/AppServer"
  "/subscriptions/mine/appServers/{appServerUid}/iotFlowConnector/metrics":
    get:
      tags:
        - app-servers
      summary: Retrieve the IoT Flow connector metrics of an application server
      description: >
        Retrieve the IoT Flow connector metrics of an application server in the
        `SUBSCRIPTION` scope.


        ### Access rights:

        - `<Subscription>/x`

        - `LPWA_MGR::READ_AS_ROUTING_PROFILE`

        - If the authenticated user has domain restrictions, one of the following condition must be satisfied:
          - The application server is not associated with any domain
          - The application server is associated with at least one domain and matches the domain restrictions
      responses:
        "200":
          $ref: "#/components/responses/AppServerIotFlowConnectorMetrics"
        default:
          $ref: "#/components/responses/Error"
    parameters:
      - $ref: "#/components/parameters/AppServer"
  /subscriptions/mine/asTransportKeys:
    get:
      tags:
        - as-transport-keys
      summary: List AS transport keys
      description: >
        Retrieve all AS transport keys.


        ### Access rights:

        - `<Subscription>/x`

        - `LPWA_MGR::READ_AS_ROUTING_PROFILE`

        - If the authenticated user has domain restrictions, only the following AS transport keys are returned:
          - AS transport keys not associated with any domain
          - AS transport keys associated with domains and matching the domain restrictions
      parameters:
        - $ref: "#/components/parameters/PageIndex"
      responses:
        "200":
          $ref: "#/components/responses/AsTransportKeys"
        default:
          $ref: "#/components/responses/Error"
    post:
      tags:
        - as-transport-keys
      summary: Create an AS transport key
      description: >
        Create an AS transport key.


        ### Access rights:

        - `<Subscription>/a`

        - `LPWA_MGR::WRITE_AS_ROUTING_PROFILE`

        - If the authenticated user has domain restrictions, the AS transport key must match the domain restrictions.
      requestBody:
        $ref: "#/components/requestBodies/AsTransportKey"
      responses:
        "201":
          $ref: "#/components/responses/AsTransportKey"
        default:
          $ref: "#/components/responses/Error"
    parameters: []
  "/subscriptions/mine/asTransportKeys/{asTransportKeyID}":
    get:
      tags:
        - as-transport-keys
      summary: Retrieve an AS transport key
      description: >
        Retrieve an AS transport key.


        ### Access rights:

        - `<Subscription>/x`

        - `LPWA_MGR::READ_AS_ROUTING_PROFILE`

        - If the authenticated user has domain restrictions, one of the following conditions must be satisfied:
          - The AS transport key is not associated with any domain
          - The AS transport key is associated with at least one domain and matches the domain restrictions
      responses:
        "200":
          $ref: "#/components/responses/AsTransportKey"
        default:
          $ref: "#/components/responses/Error"
    put:
      tags:
        - as-transport-keys
      summary: Update an AS transport key
      description: >
        Update an AS transport key.

        ### Access rights:

        - `<Subscription>/a`

        - `LPWA_MGR::WRITE_AS_ROUTING_PROFILE`

        - If the authenticated user has domain restrictions, the AS transport key must match the domain restrictions before and after the update.


        ### Optimistic locking:

        - `<asTransportKey>.occ`
      parameters:
        - $ref: "#/components/parameters/Force"
      requestBody:
        $ref: "#/components/requestBodies/AsTransportKey"
      responses:
        "200":
          $ref: "#/components/responses/AsTransportKey"
        default:
          $ref: "#/components/responses/Error"
    delete:
      tags:
        - as-transport-keys
      summary: Delete an AS transport key
      description: >
        Delete an AS transport key.


        ### Access rights:

        - `<Subscription>/a`

        - `LPWA_MGR::WRITE_AS_ROUTING_PROFILE`

        - If the authenticated user has domain restrictions, the AS transport key must match the domain restrictions.
      responses:
        "204":
          $ref: "#/components/responses/Delete"
        default:
          $ref: "#/components/responses/Error"
    parameters:
      - $ref: "#/components/parameters/AsTransportKey"
  /subscriptions/mine/cellularNetworkContexts:
    get:
      tags:
        - cellular-network-contexts
      summary: List cellular network contexts
      description: |
        Retrieve all cellular network contexts.

        ### Access rights:
        - `<Subscription>/a`
        - `LPWA_MGR::READ_AS_ROUTING_PROFILE`
      parameters:
        - $ref: "#/components/parameters/PageIndex"
      responses:
        "200":
          $ref: "#/components/responses/CellularNetworkContexts"
        default:
          $ref: "#/components/responses/Error"
    post:
      tags:
        - cellular-network-contexts
      summary: Create a cellular network context
      description: |
        Create a cellular network context.

        ### Access rights:
        - `<Subscription>/a`
        - `LPWA_MGR::WRITE_AS_ROUTING_PROFILE`
      requestBody:
        $ref: "#/components/requestBodies/CellularNetworkContext"
      responses:
        "201":
          $ref: "#/components/responses/CellularNetworkContext"
        default:
          $ref: "#/components/responses/Error"
    parameters: []
  "/subscriptions/mine/cellularNetworkContexts/{networkContextID}":
    get:
      tags:
        - cellular-network-contexts
      summary: Retrieve a cellular network context
      description: |
        Retrieve a cellular network context.

        ### Access rights:
        - `<Subscription>/a`
        - `LPWA_MGR::READ_AS_ROUTING_PROFILE`

        ### Optimistic locking:
        - `<cellularNetworkContext>.occ`
      responses:
        "200":
          $ref: "#/components/responses/CellularNetworkContext"
        default:
          $ref: "#/components/responses/Error"
    put:
      tags:
        - cellular-network-contexts
      summary: Update a cellular network context
      description: |
        Update a cellular network context.
        ### Access rights:
        - `<Subscription>/a`
        - `LPWA_MGR::WRITE_AS_ROUTING_PROFILE`

        ### Optimistic locking:
        - `<cellularNetworkContext>.occ`
      parameters:
        - $ref: "#/components/parameters/Force"
      requestBody:
        $ref: "#/components/requestBodies/CellularNetworkContext"
      responses:
        "200":
          $ref: "#/components/responses/CellularNetworkContext"
        default:
          $ref: "#/components/responses/Error"
    delete:
      tags:
        - cellular-network-contexts
      summary: Delete a cellular network context
      description: |
        Delete a cellular network context.

        ### Access rights:
        - `<Subscription>/a`
        - `LPWA_MGR::WRITE_AS_ROUTING_PROFILE`
      responses:
        "204":
          $ref: "#/components/responses/Delete"
        default:
          $ref: "#/components/responses/Error"
    parameters:
      - $ref: "#/components/parameters/CellularNetworkContext"
  /subscriptions/mine/deviceProfiles:
    get:
      tags:
        - device-profiles
      summary: Retrieve DeviceProfiles
      description: |
        Retrieve the list of device profile accessible to the Subscription.

        ### Access rights:
        - `<Subscription>/x`
      parameters:
        - $ref: "#/components/parameters/PageIndex"
        - name: typeMAC
          in: query
          description: Returns Device Profiles matching typeMAC (exact match).
          schema:
            type: string
        - name: vendorID
          in: query
          description: Device Vendor ID filtering (exact match)
          schema:
            type: string
        - name: ismBandID
          in: query
          description: >
            ISM band ID filtering (exact match)


            If multiple ismBandID, return Device Profiles supporting any of ISM Band
          schema:
            type: array
            items:
              $ref: "#/components/schemas/IsmBandID"
        - $ref: "#/components/parameters/Language-tag"
        - name: connectivity
          in: query
          description: |
            Returns Device Profiles matching connectivity (exact match).

            `CELLULAR` is only applicable if the
            cellular connectivity is enabled.
          schema:
            enum:
              - LORAWAN
              - CELLULAR
            type: string
        - name: ID
          in: query
          description: Returns Device Profiles matching any of ID.
          schema:
            type: array
            items:
              type: string
      responses:
        "200":
          $ref: "#/components/responses/DeviceProfiles"
        default:
          $ref: "#/components/responses/Error"
    parameters: []
  /subscriptions/mine/deviceProfiles/export:
    get:
      tags:
        - device-profiles
      summary: Export DeviceProfiles
      description: |
        Export the list of device profiles in a CSV file.

        ### Access rights:
        - `<Subscription>/x`
      parameters:
        - name: ismBandID
          in: query
          description: >
            ISM band ID filtering (exact match)


            If multiple ismBandID, return Device Profiles supporting any of ISM Band
          schema:
            type: array
            items:
              type: string
        - $ref: "#/components/parameters/Language-tag"
      responses:
        "200":
          description: >
            The device profiles CSV file is directly transported in the HTTP
            payload
          content:
            application/csv:
              example: |
                #Manufacturer name,Device model name,Device model ID,Device connectivity,ISM bands
                Abeeway,Micro-Tracker,ABEE/DEABE001-159US.1.0.2b_FCC_Rx2-SF12,LORAWAN,"us915,au915,cn470"
                Abeeway,Micro-Tracker,ABEE/DEABE003-167EU.1.0.2b_ETSI_Rx2-SF12,LORAWAN,"eu868,cn779,in865,eu433,kr920,ru864"
                Abeeway,Micro-Tracker,ABEE/DEABE005-168AS.1.0.2b_AS_Rx2-SF10,LORAWAN,"as923"
                Abeeway,Master-Tracker,ABEE/DEABE202-152EU.1.0.2b_ETSI_Rx2-SF12,LORAWAN,"eu868,cn779,in865,eu433,kr920,ru864"
                Abeeway,Master-Tracker,ABEE/DEABE203-162US.1.0.2b_FCC_Rx2-SF12,LORAWAN,"us915,au915,cn470"
                Abeeway,Compact-Tracker,ABEE/DEABE205-177EU.1.0.2b_ETSI_Rx2-SF12,LORAWAN,"eu868,cn779,in865,eu433,kr920,ru864"
                Abeeway,Compact-Tracker,ABEE/DEABE206-178US.1.0.2b_FCC_Rx2-SF12,LORAWAN,"us915,au915,cn470"
                Abeeway,Compact-Tracker,ABEE/DEABE206-179AS.1.0.2b_AS_Rx2-SF10,LORAWAN,"as923"
                Abeeway,Master-Tracker,ABEE/DEBAE203-163AS.1.0.2b_AS_Rx2-SF10,LORAWAN,"as923"
              schema:
                type: string
                format: binary
                description: >
                  The CSV contains the following columns:


                  <html><table>
                    <thead><tr><th><strong>Column</strong></th><th><strong>Definition</strong></th></tr></thead>
                    <tbody>
                      <tr><td>A</td><td>Device manufacturer name</td></tr>
                      <tr><td>B</td><td>Device model name</td></tr>
                      <tr><td>C</td><td>Device model ID</td></tr>
                      <tr><td>D</td><td>Device connectivity: LORAWAN or CELLULAR</td></tr>
                      <tr><td>E</td><td>LORAWAN: supported ISM bands (comma-separated list)<br/>CELLULAR: n/a</td></tr>
                    </tbody>
                  </table></html>
        default:
          $ref: "#/components/responses/Error"
    parameters: []
  /subscriptions/mine/deviceVendors:
    get:
      tags:
        - device-profiles
      summary: Retrieve DeviceVendors
      description: |
        Retrieve the list of Device Vendors accessible to the Subscription.

        ### Access rights:
        - `<Subscription>/x`
      parameters:
        - $ref: "#/components/parameters/PageIndex"
        - name: name
          deprecated: true
          in: query
          description: >
            Device Vendor name filtering (prefix match)


            This parameter must no longer be used: name filtering is limited to the en-US language.
          schema:
            type: string
        - name: ID
          in: query
          description: Device Vendor ID filtering (exact match)
          schema:
            type: array
            items:
              type: string
        - name: connectivity
          in: query
          description: |
            Only return Device Vendors having at least one Device Profile
            supporting this connectivity (exact match).

            `CELLULAR` is only applicable if the
            cellular connectivity is enabled.
          schema:
            enum:
              - LORAWAN
              - CELLULAR
            type: string
        - name: ismBandID
          in: query
          description: >
            ISM band ID filtering (exact match)


            Only return Device Vendors having at least one Device Profile supporting this ISM band

            If multiple ismBandID, return Device Vendors having at least one Device Profile supporting any of ISM Band
          schema:
            type: array
            items:
              $ref: "#/components/schemas/IsmBandID"
        - name: sort
          in: query
          description: >
            Defines how results are sorted:

            - BY_NAME: Device Vendors are ordered by name (lexicographic order)

            - BY_LAST_CREATED: Device Vendors of last created Devices are

            returned first (reverse creation date order) then remaining Device

            Vendors are ordered by name (lexicographic order)


            When this query parameter is not specified, BY_NAME is used by default.
          schema:
            enum:
              - BY_NAME
              - BY_LAST_CREATED
            type: string
        - $ref: "#/components/parameters/Language-tag"
      responses:
        "200":
          $ref: "#/components/responses/DeviceVendors"
        default:
          $ref: "#/components/responses/Error"
    parameters: []
  /subscriptions/mine/devices:
    get:
      tags:
        - devices
      summary: Retrieve Devices
      description: |
        Retrieve the list of long range Devices attached to a Subscription.

        Two pagination modes are available:
        * *Cursor-based pagination* relies on `pageSize` and `pageAfter` query
          parameters
          * Allows to retrieve all pages one after the other: this mode ensure
            that no device is skipped when iterating over all pages
          * To retrieve the next page, `pageAfter` must contain the cursor of
            the last item of the current page
          * Only compatible with sort by DevEUI
        * *Offset-based pagination* relies on `pageSize` and `pageIndex` query
          parameters
          * Allows to reach a page based on its index but the total number of
            devices that can be retrieved is limited
          * `pageIndex` must contain the index of the requested page
          * Compatible with any sort criteria

        ### Access rights:
        - `<Subscription>/x`
        - `LPWA_MGR::READ_NODE`
        - If the authenticated user has domain restrictions, only devices
          matching the domain restrictions can be retrieved.
      x-rateLimit:
        category: MEDIUM_IMPACT
      parameters:
        - name: pageAfter
          in: query
          description: |
            Returns the page following the provided cursor.
            Cursor strings typically end with the `=` character. It must be encoded
            as `%3D`.
            Only supported if sort by DevEUI is used.
          schema:
            type: string
            example: eyJFVUkiOiIwMDAwMDAwMDA1MjJEOEVCIn0=
        - $ref: "#/components/parameters/PageIndex"
        - $ref: "#/components/parameters/PageSize"
        - $ref: "#/components/parameters/Language-tag"
        - $ref: "#/components/parameters/DevEUIFilter"
        - $ref: "#/components/parameters/DeviceNameFilter"
        - $ref: "#/components/parameters/DeviceConnectivityPlanFilter"
        - $ref: "#/components/parameters/DeviceNetworkSubscriptionIDFilter"
        - $ref: "#/components/parameters/DeviceNwGeolocalizationFilter"
        - $ref: "#/components/parameters/DevicePrAllowedFilter"
        - $ref: "#/components/parameters/DeviceBatteryLevel"
        - $ref: "#/components/parameters/DeviceInfRSSI"
        - $ref: "#/components/parameters/DeviceInfSNR"
        - $ref: "#/components/parameters/DeviceSupSNR"
        - $ref: "#/components/parameters/DeviceAlarmLevel"
        - name: minLat
          in: query
          description: >
            Only returns Devices that match the geolocation rectangle
            (minLat/minLon/maxLat/maxLon).


            When no localization query parameter are set, non-localized devices will be also returned.
          schema:
            type: number
            format: float
        - name: minLon
          in: query
          description: >
            Only returns Devices that match the geolocation rectangle
            (minLat/minLon/maxLat/maxLon).


            When no localization query parameter are set, non-localized devices will be also returned.
          schema:
            type: number
            format: float
        - name: maxLat
          in: query
          description: >
            Only returns Devices that match the geolocation rectangle
            (minLat/minLon/maxLat/maxLon).


            When no localization query parameter are set, non-localized devices will be also returned.
          schema:
            type: number
            format: float
        - name: maxLon
          in: query
          description: >
            Only returns Devices that match the geolocation rectangle
            (minLat/minLon/maxLat/maxLon).


            When no localization query parameter are set, non-localized devices will be also returned.
          schema:
            type: number
            format: float
        - $ref: "#/components/parameters/DeviceHealthState"
        - $ref: "#/components/parameters/DeviceAppServerID"
        - $ref: "#/components/parameters/DeviceConnectivity"
        - $ref: "#/components/parameters/DeviceQuery"
        - $ref: "#/components/parameters/DeviceFrom"
        - $ref: "#/components/parameters/DeviceTo"
        - $ref: "#/components/parameters/DeviceTag"
        - $ref: "#/components/parameters/Domain"
        - $ref: "#/components/parameters/DeviceCellularNetworkContext"
        - $ref: "#/components/parameters/DeviceCellularSimID"
        - $ref: "#/components/parameters/DeviceCellularIMEI"
        - $ref: "#/components/parameters/DeviceLoraWanAsTransportKey"
        - $ref: "#/components/parameters/DeviceLoraWanRelayEnabled"
        - name: sort
          in: query
          description: |
            Defines how results are sorted (`attribute`,`order`).

            The following attributes are supported:
            - `name`: by name
            - `avgSNR`: by average SNR
            - `avgESP`: by average ESP
            - `lastSF`: by spreading factor of the last uplink frame
            - `lastUpTimestamp`: by timestamp of the last downlink frame
            - `lastDwTimestamp`: by timestamp of the last uplink frame
            - `lastBatLevel`: by battery level
            - `creationDate`: by date of creation of the device
            - `lastMeanPER`: by last mean PER without consideration for LRRs
            - `EUI`: by DevEUI

            The following orders are supported:
            - `asc`: ascending order
            - `desc`: descending order

            By default, results are sorted by creation date ascending order.
          schema:
            type: string
            example: name,asc
      responses:
        "200":
          $ref: "#/components/responses/Devices"
        default:
          $ref: "#/components/responses/Error"
    post:
      tags:
        - devices
      summary: Create Device
      description: |
        Create a Device.

        ### Access rights:
        - `<Subscription>/a`
        - If the authenticated user has domain restrictions, the device must
          match the domain restrictions.
      x-rateLimit:
        category: MEDIUM_IMPACT
      parameters:
        - $ref: "#/components/parameters/Async"
        - $ref: "#/components/parameters/NetworkSubscriptionsHandlingMode"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/Device"
            examples:
              TpeLorawanOTAA:
                $ref: "#/components/examples/DeviceTpeLorawanOtaaPost"
              TpeLorawanABP:
                $ref: "#/components/examples/DeviceTpeLorawanAbpPost"
        required: true
      responses:
        "201":
          $ref: "#/components/responses/Device"
        "202":
          $ref: "#/components/responses/Async"
        default:
          $ref: "#/components/responses/Error"
    parameters: []
  /subscriptions/mine/devices/alarms:
    get:
      tags:
        - devices
      summary: Retrieve Alarms of all Devices
      description: |
        Retrieve a list of alarms associated with all devices.

        Alarms are filtered and sorted according to the query parameters.

        Two pagination modes are available:
        * *Cursor-based pagination* relies on `pageSize` and `pageAfter` query
          parameters
          * Allows to retrieve all pages one after the other: this mode ensure
            that no alarm is skipped when iterating over all pages
          * To retrieve the next page, `pageAfter` must contain the cursor of
            the last item of the current page
          * Only compatible with sort by alarm Uid
        * *Offset-based pagination* relies on `pageSize` and `pageIndex` query
          parameters
          * Allows to reach a page based on its index but the total number of
            alarms that can be retrieved is limited
          * `pageIndex` must contain the index of the requested page
          * Compatible with any sort criteria

        For more information about possible alarms, see <a
        href="./alarms">Alarms</a>.

        ### Access rights:
        - `<Subscription>/x`
        - `LPWA_MGR::READ_NODE`
        - If the authenticated user has domain restrictions, only alarms of
          devices matching the domain restrictions can be retrieved.
      parameters:
        - name: pageAfter
          in: query
          description: |
            Returns the page following the provided cursor.
            Cursor strings typically end with the `=` character. It must be encoded
            as `%3D`.
            Only supported if sort by alarm Uid is used.
          schema:
            type: string
            example: eyJhbGFybVVpZCI6IjVkMzFiOTFjY2M5Y2M2MDY2MDdiYzBhOCJ9
        - $ref: "#/components/parameters/PageIndex"
        - $ref: "#/components/parameters/PageSize"
        - $ref: "#/components/parameters/Language-tag"
        - $ref: "#/components/parameters/TimestampFrom"
        - $ref: "#/components/parameters/TimestampTo"
        - $ref: "#/components/parameters/AlarmID"
        - $ref: "#/components/parameters/AlarmUid"
        - name: devEUI
          in: query
          description: DevEUI filtering (prefix match)
          schema:
            type: array
            items:
              type: string
        - name: state
          in: query
          description: >
            State of the alarm:

            - 6: CRITICAL 

            - 5: MAJOR

            - 4: MINOR

            - 3: WARNING

            - 2: INDETERMINATE

            - 1: CLEARED


            The state filtering strategy is defined by the query parameter stateFiltering

            Note: When this query parameter is not specified, alarms  are returned without consideration for the state (i.e. alarms can be UNCLEARED or CLEARED)
          schema:
            type: integer
            format: int32
            minimum: 1
            maximum: 6
        - name: stateFiltering
          in: query
          description: >
            Alarm state filtering strategy:

            - 'EQUAL_OR_UPPER': Only returns alarms for which the state is equal to or upper than the provided level in query parameter state

            - 'EQUAL': Only returns alarms for which the state is equal to the provided level in query parameter state


            By default, 'EQUAL_OR_UPPER' mode is used.
          schema:
            type: string
            enum:
              - EQUAL_OR_UPPER
              - EQUAL
            default: EQUAL_OR_UPPER
        - $ref: "#/components/parameters/AlarmAcked"
        - $ref: "#/components/parameters/Domain"
        - name: sort
          in: query
          description: |
            Defines how results are sorted (`attribute`,`order`).

            The following attributes are supported:
            - `state`: by state then by update timestamp (decreasing order)
            - `acked`: by acked status then by update timestamp (decreasing order)
            - `alarmUid`: by alarm Uid

            The following orders are supported:
            - `asc`: ascending order
            - `desc`: descending order

            By default, results are sorted by update timestamp (decreasing
            order)
          schema:
            type: string
            example: state,desc
        - name: limit
          in: query
          description: |
            Limit the number of results. By default, no limit is applied.
          schema:
            type: integer
            format: int32
      responses:
        "200":
          $ref: "#/components/responses/AlarmsDeviceActive"
        default:
          $ref: "#/components/responses/Error"
    parameters: []
  /subscriptions/mine/devices/alarms/ack:
    post:
      tags:
        - devices
      summary: Ack Alarms of all Devices
      description: |
        Acknowledge a list of alarms associated with all devices.
        Alarms to acknowledge are identified by their Uids.

        ### Access rights:
        - `<Subscription>/a`
        - `LPWA_MGR::WRITE_NODE`
        - If the authenticated user has domain restrictions, only alarms of
          devices matching the domain restrictions can be acknowledged.
      requestBody:
        $ref: "#/components/requestBodies/AlarmsAck"
      responses:
        "204":
          description: Operation success
        default:
          $ref: "#/components/responses/Error"
    parameters: []
  /subscriptions/mine/devices/alarms/histories:
    get:
      tags:
        - devices
      summary: Retrieve Alarms History of all Devices
      deprecated: true
      description: >
        This endpoint must no longer be used: the endpoint `GET
        /subscriptions/{subscriptionUid}/devices/{deviceUid}/alarms/histories`
        must be used in replacement.


        ---


        Retrieve the alarms history (cleared alarms) associated with all devices.

        Alarms are filtered according to the query parameters.


        Alarms are sorted by clearance timestamp in descending order.



        For more information about possible alarms, see <a

        href="./alarms">Alarms</a>.



        ### Access rights:


        - `<Subscription>/x`


        - `LPWA_MGR::READ_NODE`


        - If the authenticated user has domain restrictions, only alarms of
          devices matching the domain restrictions can be retrieved.
      parameters:
        - $ref: "#/components/parameters/PageIndex"
        - $ref: "#/components/parameters/Language-tag"
        - $ref: "#/components/parameters/TimestampFrom"
        - $ref: "#/components/parameters/TimestampTo"
        - $ref: "#/components/parameters/AlarmID"
        - $ref: "#/components/parameters/AlarmUid"
        - $ref: "#/components/parameters/AlarmIndex"
        - $ref: "#/components/parameters/AlarmHistoryState"
        - $ref: "#/components/parameters/AlarmAcked"
        - name: devEUI
          in: query
          description: DevEUI filtering (prefix match)
          schema:
            type: array
            items:
              type: string
      responses:
        "200":
          $ref: "#/components/responses/AlarmsDevice"
        default:
          $ref: "#/components/responses/Error"
    parameters: []
  /subscriptions/mine/devices/alarms/stateDistributions:
    get:
      tags:
        - devices
      summary: Retrieve Alarm States Distribution of all Devices
      description: |
        Retrieve the states distribution of alarms associated with all devices.
        Alarms are filtered according to the query parameters.

        ### Access rights:
        - `<Subscription>/x`
        - `LPWA_MGR::READ_NODE`
        - If the authenticated user has domain restrictions, only alarms of
          devices matching the domain restrictions are counted.
      x-rateLimit:
        category: MEDIUM_IMPACT
      parameters:
        - $ref: "#/components/parameters/TimestampFrom"
        - $ref: "#/components/parameters/TimestampTo"
        - $ref: "#/components/parameters/AlarmState"
        - $ref: "#/components/parameters/AlarmAcked"
      responses:
        "200":
          $ref: "#/components/responses/AlarmsDevicesStateDistributions"
        default:
          $ref: "#/components/responses/Error"
    parameters: []
  /subscriptions/mine/devices/clusters:
    parameters: []
    get:
      tags:
        - devices
      summary: Retrieve Devices clusters
      description: |
        Retrieve the list of devices attached to the subscription
        having known geographical coordinates. Devices that are close
        to each other are grouped in the same cluster.
        Distance threshold to group two devices in the same cluster is
        evaluated to ensure that at most 64 clusters are returned for the 
        given bounding box.

        ### Access rights:
        - `<Subscription>/x`
        - `LPWA_MGR::READ_NODE`
        - If the authenticated user has domain restrictions, only devices
          matching the domain restrictions can be retrieved.
      x-rateLimit:
        category: HIGH_IMPACT
      parameters:
        - $ref: "#/components/parameters/Language-tag"
        - name: minLat
          in: query
          required: true
          description: |
            Only returns devices that match the geolocation rectangle.
          schema:
            type: number
            format: float
        - name: minLon
          in: query
          required: true
          description: |
            Only returns devices that match the geolocation rectangle.
          schema:
            type: number
            format: float
        - name: maxLat
          in: query
          required: true
          description: |
            Only returns devices that match the geolocation rectangle.
          schema:
            type: number
            format: float
        - name: maxLon
          in: query
          required: true
          description: |
            Only returns devices that match the geolocation rectangle.
          schema:
            type: number
            format: float
        - $ref: "#/components/parameters/DevEUIFilter"
        - $ref: "#/components/parameters/DeviceNameFilter"
        - $ref: "#/components/parameters/DeviceConnectivityPlanFilter"
        - $ref: "#/components/parameters/DeviceNetworkSubscriptionIDFilter"
        - $ref: "#/components/parameters/DeviceNwGeolocalizationFilter"
        - $ref: "#/components/parameters/DevicePrAllowedFilter"
        - $ref: "#/components/parameters/DeviceBatteryLevel"
        - $ref: "#/components/parameters/DeviceInfRSSI"
        - $ref: "#/components/parameters/DeviceInfSNR"
        - $ref: "#/components/parameters/DeviceSupSNR"
        - $ref: "#/components/parameters/DeviceAlarmLevel"
        - $ref: "#/components/parameters/DeviceHealthState"
        - $ref: "#/components/parameters/DeviceAppServerID"
        - $ref: "#/components/parameters/DeviceConnectivity"
        - $ref: "#/components/parameters/DeviceQuery"
        - $ref: "#/components/parameters/DeviceFrom"
        - $ref: "#/components/parameters/DeviceTo"
        - $ref: "#/components/parameters/DeviceTag"
        - $ref: "#/components/parameters/Domain"
        - $ref: "#/components/parameters/DeviceLoraWanRelayEnabled"
      responses:
        "200":
          $ref: "#/components/responses/DevicesClusters"
        default:
          $ref: "#/components/responses/Error"
  /subscriptions/mine/devices/counters:
    get:
      tags:
        - devices
      summary: Retrieve Counters
      description: |
        Retrieve the number of Devices per health state.

        ### Access rights:
        - `<Subscription>/x`
        - If the authenticated user has domain restrictions, only devices
          matching the domain restrictions are counted.
      x-rateLimit:
        category: MEDIUM_IMPACT
      responses:
        "200":
          $ref: "#/components/responses/Counters"
        default:
          $ref: "#/components/responses/Error"
    parameters: []
  /subscriptions/mine/devices/domains:
    post:
      tags:
        - devices
      summary: Associate Domains with Devices
      description: |
        Add or remove a list of domains on a list of Devices.

        When adding a domain, any existing domain belonging to the same group is
        replaced by the new one.

        When removing a domain, no error is returned if the domain is not
        associated with a subset or all targeted Devices.

        ### Access rights:
        - `<Subscription>/a`
        - If the authenticated user has domain restrictions, devices must match
          the domain restrictions before and after the operation.
      requestBody:
        $ref: "#/components/requestBodies/DevicesDomains"
      responses:
        "204":
          description: Operation success
        default:
          $ref: "#/components/responses/Error"
    parameters: []
  /subscriptions/mine/devices/frames:
    get:
      tags:
        - devices
      summary: Retrieve FramesDevices
      description: |
        Retrieve the uplink and downlink frames history:
        - Number of uplink and downlink frame per aggregated time slot,
        - Cumulated payload size (expressed in bytes) for uplink and downlink
          frame per aggregated time slot.

        ### Access rights:
        - `<Subscription>/x`
        - `LPWA_MGR::READ_NODE`
        - If the authenticated user has domain restrictions, only frames of
          devices matching the domain restrictions can be retrieved.
      x-rateLimit:
        category: MEDIUM_IMPACT
      parameters:
        - name: appServerID
          in: query
          description: Application Server ID filtering (exact match)
          schema:
            type: string
        - $ref: "#/components/parameters/AggregationBegin"
        - name: duration
          in: query
          description: >
            Window duration to retrieve.


            Default value: When this query parameter is not specified, the **P7D** duration is used by default.


            Supported duration value: **PxD** (x days) and **PTxH** (x hours)
          schema:
            type: string
        - $ref: "#/components/parameters/AggregationStep"
        - name: type
          in: query
          description: >
            Type of the frames to consider: 


            - 0: Uplink

            - 1: downlink 

            - 4: Microflow event frame indicator.


            Multiple type query parameters can be encoded in the URI: all specified frames are considered.


            By default all frames are considered.
          schema:
            type: array
            items:
              type: integer
              enum:
                - 0
                - 1
                - 4
        - $ref: "#/components/parameters/Timezone"
      responses:
        "200":
          $ref: "#/components/responses/FramesDevices"
        default:
          $ref: "#/components/responses/Error"
    parameters: []
  /subscriptions/mine/devices/import:
    parameters: []
    post:
      tags:
        - devices
      summary: Import device operations
      description: |
        Create, update and delete devices in bulk using a CSV file.

        The CSV file is directly transported in the HTTP
        payload.

        ### Access rights:
        - `<Subscription>/a`
        - If the authenticated user has domain restrictions, the import must
          match the domain restrictions.
      x-rateLimit:
        category: HIGH_IMPACT
      parameters:
        - $ref: "#/components/parameters/Async"
        - name: forceDevAddrs
          description: |
            When enabled, DevAddr of OTAA devices present in the import file are
            assigned permanently. When disabled, a different DevAddr is used on
            join request if it is not part of the DevAddr pool.

            This parameter must no longer be used: the DevAddr of an OTAA device
            should not be permanently assigned to let the network server allocate
            a DevAddr in the range of the configured NetID during the join
            procedure.
          in: query
          deprecated: true
          required: false
          schema:
            type: boolean
            default: false
        - name: domain
          in: query
          deprecated: true
          description: |
            List of domains associated with the import file:

            - Created devices are associated with these domains after creation only if the column AC is empty
            - Updated devices are associated with these domains after update only if the column AC is empty

            The list cannot contain more than one domain for a given group.

            For each domain, domain group name and domain name must be provided
            as follow: `domain.group.name`:`domain.name`

            This parameter must no longer be used: the column AC in the CSV file must be used in replacement.
          style: form
          explode: true
          schema:
            type: array
            items:
              type: string
            example:
              - Site:France/Caen
              - Vertical:Location
        - $ref: "#/components/parameters/NetworkSubscriptionsHandlingMode"
      requestBody:
        description: |
          The CSV file is transported in a multipart body with
          `Content-Disposition: form-data` and `Content-Type: text/csv`.

          If the `filename` directive is filled in the `Content-Disposition`
          header of the multipart body, it is used as `resourceID` in the
          notification associated with the import.
        content:
          multipart/form-data:
            example:
              csv: |
                -----------------------------9051914041544843365972754266
                Content-Disposition: form-data; name="csv"; filename="myimport.csv"
                Content-Type: text/csv

                CREATE_OTAA,F03D291000F00001,,LORA/GenericA.1.0.2b_ETSI_Rx2-SF12,8899AABBCCDDEEFF,8899AABBCCDDEEFF8899AABBCCDDEEFF,"<modelCfgs><modelCfg Port=""1"">TemperatureService</modelCfg><modelCfg Port=""2"">ElecRealtime</modelCfg></modelCfgs>",actility-cs/tpw-cp,,,My first OTAA device,50.859988,4.35826,"Mme Michu, Appt 434 3ième gauche, 8 rue de fleurs, Toulouse",,,,,,TWA_1100000114.658.AS,,,,,,,,"tag1,tag2,tag3"
                CREATE_OTAA,F03D291000F00002,00ABC490,LORA/GenericA.1.1a_ETSI_Rx2-SF12,,xeFyrVZaL4E2VInvZOZvTB8hWpYonpb8mz4VCb1wJmo5W2sbAI2lrx+LfN8ZhWZqiZGWAps4NBLWA4NbMKt+wpiSJqgBzuSb1bOvTEQTzMSR8VECeR2U+0gbwJEm1nZYLo8xgqu52fONycbBlXdKgP3h70e1bpcvWSu9608+uaY=,,actility-cs/tpw-cp-geoloc,,,Another OTAA device,,,"John Doe 123 Main St Anytown, USA","<alarm004><threshold1 status=""ENABLE"" level=""3"" duration=""P2D""/><threshold2 status=""ENABLE"" level=""5"" duration=""P7D""/></alarm004>",,BIKE_SPEED,,,"TWA_1100000114.658.AS,TWA_1100000114.751.AS",YLRnZCoYixP5/IMGriO0TIo8XdShfihyWYR9/kM2P5a/IMMnZXnXgBGaqJEA5k23dPtmsfCr381wzW2jORg52gPHfRzqSXAkUyoca9rYxm+jijF6sE0F1p0pr+w822iH53NHSoc2Xgxnsa5R29AKlSTBIH1nM3w651MveVOzTfU=,,,TWK1,,custom:driver:1,,,"Site:France/Paris,Vertical:Location",20268,20280,2,869.525,3,1,0,0,00000A,D047,fGvsXGk5Ka+Z8G3vq+llxERSRq1eoTR2O5SrWc4LPdL5mGgqtg+vQNc1imP5i5mRbIarXWXPX6shDMVUsnQMUc73MMJop3aUksjyWETt4DnQnY68e0A62Wpu9ohb+wN9KREGBHBV8hzl/EwAdV06q8p+5U27mi4MybQKmt9JFog=,N+Tefq1lWtL/qKkqF6BxaY8X1wZ3GOoq8UhtX5qVvcPIlYAEHJgv7CqtwAp73+2Ahq90kKBoBENQ935g6yt/rMru54S0o3rz4wfBkJ96/5IP1kX4glxu32aWTO7OUml127k3G1C1c9s+1D1wkPBcxd0NFamjYyuVZ3fVpbyCYmI=
                CREATE_OTAA,F03D291000F00021,,LORA/GenericA.1.0.2b_ETSI_Rx2-SF12,8899AABBCCDDEEFF,,"<modelCfgs><modelCfg Port=""1"">TemperatureService</modelCfg><modelCfg Port=""2"">ElecRealtime</modelCfg></modelCfgs>",actility-cs/tpw-cp,,,My first OTAA device,50.859988,4.35826,"Mme Michu, Appt 434 3ième gauche, 8 rue de fleurs, Toulouse",,,,,,TWA_1100000114.658.AS,,,,,BEC499C69E9C939E413B663961636C61,,,"tag1,tag2,tag3"
                CREATE_OTAA,F03D291000F00022,00ABC490,LORA/GenericA.1.1a_ETSI_Rx2-SF12,1234AABBCCDDEEFF,,,actility-cs/tpw-cp-geoloc,,,Another OTAA device,,,"John Doe 123 Main St Anytown, USA","<alarm004><threshold1 status=""ENABLE"" level=""3"" duration=""P2D""/><threshold2 status=""ENABLE"" level=""5"" duration=""P7D""/></alarm004>",,BIKE_SPEED,,,"TWA_1100000114.658.AS,TWA_1100000114.751.AS",,,,,,custom:driver:1,,,"Site:France/Paris,Vertical:Location"
                CREATE_ABP,F03D291000F00011,00ABC489,LORA/GenericA.1.0.2b_ETSI_Rx2-SF12,0011AABBCCDDEEFF8899AABBCCDDEEFF,1122AABBCCDDEEFF8899AABBCCDDEEFF,"<modelCfgs><modelCfg Port=""1"">TemperatureService</modelCfg><modelCfg Port=""2"">ElecRealtime</modelCfg></modelCfgs>",actility-cs/tpw-cp-pr,,,My first ABP device,50.859988,4.35826,"Mme Michu, Appt 434 3ième gauche, 8 rue de fleurs, Toulouse",,,,,,TWA_1100000114.658.AS,,,,,,,,"tag1,tag2,tag3"
                CREATE_ABP,F03D291000F00012,00ABC490,LORA/GenericA.1.1a_ETSI_Rx2-SF12,q3Hg9DU1ReU0IjWIu0neKJgVlsaiFJBotccstaxvJXS0dLc1ccOrcZcJIs1+tJk0LBOZgtLTucsTBVc6Pu6EH6btr5tRAis1fgj3Fz7NbHjFza7kjq8PbBNML6DYUvRhmA5hS0GTkCfWLdq8fci33bl3bpAgw0X/AV0cRPDCmvI=,,,actility-cs/tpw-cp-geoloc-pr,,,Another ABP device,,,"John Doe 123 Main St Anytown, USA","<alarm004><threshold1 status=""ENABLE"" level=""3"" duration=""P2D""/><threshold2 status=""ENABLE"" level=""5"" duration=""P7D""/></alarm004>",,BIKE_SPEED,,,"TWA_1100000114.658.AS,TWA_1100000114.751.AS",HqnBMb4kJXfpimwlqXQOFEz+efCjHcE5C4QbGRSiBy6tDskir8NeREzOy1D9Ajl+fmtWd5I+G2V5dVCuhS+/C6Ci020TFrHK1X/m52EetEo5zm27bBUdxS31PGgc9rpO31q6LPgrznVzPzflnsEyuMv6qoUptWdbrZCCCK92R6Q=,i4duFFqTm0RwdJwp2/+Qqss9AsVga6Z0trskxcKjkKl+e82R9XoYqXrJSchtMZvJrBcLrCj6CFTg/XJcrA6/ki4dpx/nggLgMkRieroUAz+7KUbJB/JnyG6IMA37P40jEAcWg7saNSP2Sn/HhU364MeFsda84b3ysv7Un3zMUx4=,,TWK1,,custom:driver:1,,,"Site:France/Paris,Vertical:Location",20268,20280,2,869.525,3,1,0,0
                CREATE_CELLULAR,,89208013535718672291,CELLULAR/Generic,,,,actility-cs/tpw-cp-cellular,,,My first cellular device,,,,,,,,,"TWA_1100000114.658.AS,TWA_1100000114.751.AS",,,1AF3B,,,,,"tag1,tag2,tag3"
                UPDATE_OTAA,F03D291000F00001,,,8899AABBCCDDEEFF,,"<modelCfgs><modelCfg Port=""1"">TemperatureService</modelCfg><modelCfg Port=""2"">ElecRealtime</modelCfg></modelCfgs>",,,,My first OTAA device,50.859988,4.35826,,_unset,,,,,TWA_1100000114.658.AS,,,,,,,,"tag1,tag2,tag3"
                UPDATE_OTAA,F03D291000F00002,,LORA/GenericA.1.1a_ETSI_Rx2-SF12,,xeFyrVZaL4E2VInvZOZvTB8hWpYonpb8mz4VCb1wJmo5W2sbAI2lrx+LfN8ZhWZqiZGWAps4NBLWA4NbMKt+wpiSJqgBzuSb1bOvTEQTzMSR8VECeR2U+0gbwJEm1nZYLo8xgqu52fONycbBlXdKgP3h70e1bpcvWSu9608+uaY=,,actility-tpe-cs/tpe-cp-geoloc,,,,,,"John Doe 123 Main St Anytown, USA","<alarm004><threshold1 status=""ENABLE"" level=""3"" duration=""P2D""/><threshold2 status=""ENABLE"" level=""5"" duration=""P7D""/></alarm004>",,BIKE_SPEED,,,,YLRnZCoYixP5/IMGriO0TIo8XdShfihyWYR9/kM2P5a/IMMnZXnXgBGaqJEA5k23dPtmsfCr381wzW2jORg52gPHfRzqSXAkUyoca9rYxm+jijF6sE0F1p0pr+w822iH53NHSoc2Xgxnsa5R29AKlSTBIH1nM3w651MveVOzTfU=,,,TWK1,,custom:driver:1,,_unset,"Site:France/Paris,Vertical:Location",20268,20280,2,869.525,3,1,0,0,00000A,D047,fGvsXGk5Ka+Z8G3vq+llxERSRq1eoTR2O5SrWc4LPdL5mGgqtg+vQNc1imP5i5mRbIarXWXPX6shDMVUsnQMUc73MMJop3aUksjyWETt4DnQnY68e0A62Wpu9ohb+wN9KREGBHBV8hzl/EwAdV06q8p+5U27mi4MybQKmt9JFog=,N+Tefq1lWtL/qKkqF6BxaY8X1wZ3GOoq8UhtX5qVvcPIlYAEHJgv7CqtwAp73+2Ahq90kKBoBENQ935g6yt/rMru54S0o3rz4wfBkJ96/5IP1kX4glxu32aWTO7OUml127k3G1C1c9s+1D1wkPBcxd0NFamjYyuVZ3fVpbyCYmI=
                UPDATE_OTAA,F03D291000F00021,,,8899AABBCCDDEEFF,,"<modelCfgs><modelCfg Port=""1"">TemperatureService</modelCfg><modelCfg Port=""2"">ElecRealtime</modelCfg></modelCfgs>",,,,My first OTAA device,50.859988,4.35826,,_unset,,,,,TWA_1100000114.658.AS,,,,,,,,"tag1,tag2,tag3"
                UPDATE_OTAA,F03D291000F00022,,LORA/GenericA.1.1a_ETSI_Rx2-SF12,,,,actility-tpe-cs/tpe-cp-geoloc,,,,,,"John Doe 123 Main St Anytown, USA","<alarm004><threshold1 status=""ENABLE"" level=""3"" duration=""P2D""/><threshold2 status=""ENABLE"" level=""5"" duration=""P7D""/></alarm004>",,BIKE_SPEED,,,,,,,,,custom:driver:1,,_unset,"Site:France/Paris,Vertical:Location"
                UPDATE_ABP,F03D291000F00011,,,0011AABBCCDDEEFF8899AABBCCDDEEFF,1122AABBCCDDEEFF8899AABBCCDDEEFF,"<modelCfgs><modelCfg Port=""1"">TemperatureService</modelCfg><modelCfg Port=""2"">ElecRealtime</modelCfg></modelCfgs>",,,,My first ABP device,50.859988,4.35826,,_unset,,,,,TWA_1100000114.658.AS,,,,,,,,"tag1,tag2,tag3"
                UPDATE_ABP,F03D291000F00012,,LORA/GenericA.1.1a_ETSI_Rx2-SF12,,,,actility-tpe-cs/tpe-cp-geoloc-pr,,,,,,"John Doe 123 Main St Anytown, USA","<alarm004><threshold1 status=""ENABLE"" level=""3"" duration=""P2D""/><threshold2 status=""ENABLE"" level=""5"" duration=""P7D""/></alarm004>",,BIKE_SPEED,,,,,,,,,custom:driver:1,,_unset,"Site:France/Paris,Vertical:Location",20268,20280,2,869.525,3,1,0,0
                DELETE,F03D291000F00011
                DELETE,F03D291000F00012
            schema:
              type: object
              required:
                - csv
              properties:
                csv:
                  type: string
                  format: binary
                  description: |
                    Each line in the CSV file describes a device operation to be executed.

                    The column A of the CSV file defines the type of operation:


                    - `CREATE_ABP` (or `CREATE`, or empty for compatibility):
                    Create a LoRaWAN ABP
                      device.
                    - `CREATE_OTAA`: Create a LoRaWAN OTAA device.
                    - `CREATE_CELLULAR`: Create a cellular device. Only applicable if the cellular connectivity is enabled.
                    - `UPDATE_ABP`: Update a LoRaWAN ABP device.
                    - `UPDATE_OTAA`: Update a LoRaWAN OTAA device.
                    - `UPDATE_CELLULAR`: Update a cellular device. Only applicable if the cellular connectivity is enabled.
                    - `DELETE`: Delete a device.

                    The meaning of the subsequent columns (starting from column B) depends on this type of operation.

                    ### Columns for `CREATE_ABP` operation

                    <html><table>
                      <thead><tr><th><strong>Column</strong></th><th><strong>Definition</strong></th><th><strong>Cardinality</strong></th></tr></thead>
                      <tbody>
                        <tr>
                          <td>A</td>
                          <td>Type of operation: <code>CREATE_ABP</code></td>
                          <td><strong>Mandatory</strong></td>
                        </tr>
                        <tr>
                          <td>B</td>
                          <td>LoRaWAN DevEUI</td>
                          <td><strong>Mandatory</strong></td>
                        </tr>
                        <tr>
                          <td>C</td>
                          <td>LoRaWAN DevAddr</td>
                          <td><strong>Mandatory</strong></td>
                        </tr>
                        <tr>
                          <td>D</td>
                          <td>Device profile ID</td>
                          <td><strong>Mandatory</strong></td>
                        </tr>
                        <tr>
                          <td>E</td>
                          <td>LoRaWAN FNwkSIntKey/NwkSKey<br/>Supported encoding modes:
                            <ul>
                              <li>Clear text (hexadecimal encoding)</li>
                              <li>Encrypted with TWA Exchange Key (RSA) version specified in column X (base64 encoding)</li>
                            </ul>
                          </td>
                          <td><strong>Mandatory</strong></td>
                        </tr>
                        <tr>
                          <td>F</td>
                          <td>LoRaWAN AppSKey<br/>Supported encoding modes:
                            <ul>
                              <li>Clear text (hexadecimal encoding)</li>
                              <li>Encrypted with TWA Exchange Key (RSA) version specified in column X (base64 encoding)</li>
                            </ul>
                            For backward compatibility, an XML document can be also provided but this format is DEPRECATED:
                            <ul>
                              <li>The root XML element is <code>AppSKeys</code></li>
                              <li>The enclosed <code>AppSKey</code> XML element contains the AppSKey value (see above for the supported encoding modes)</li>
                              <li>The <code>AppSKey@Port</code> attribute must be set to <code>*</code></li>
                            </ul>
                          </td>
                          <td><strong>Optional</strong></td>
                        </tr>
                        <tr>
                          <td>G</td>
                          <td>ThingPark X IoT Flow matcher tags XML document:
                            <ul>
                              <li>The root XML element is <code>modelCfgs</code></li>
                              <li>The value of each enclosed <code>modelCfg</code> XML element is a flow matcher tag</li>
                              <li>The <code>modelCfg@Port</code> attribute must be incremented for each new flow matcher tag (starting from 1)</li>
                            </ul>
                          </td>
                          <td><strong>Optional</strong>.<br/>Not applicable to <strong>ThingPark Enterprise</strong>.</td>
                        </tr>
                        <tr>
                          <td>H</td>
                          <td>
                            Network Subscription associated with the device.<br/>
                            The selection of the network subscription depends on
                            networkSubscriptionsHandlingMode query parameter:
                            <ul>
                              <li>BASIC: Provide a comma-separated list of features to automatically select the network subscription.
                                  Available features are 'NetworkGeolocation' and 'PassiveRoaming'. If empty, the network subscription
                                  without 'NetworkGeolocation' and 'PassiveRoaming' features is selected. If several network subscriptions match,
                                  the network subscription with the oldest subscription date is selected. Only applicable to ThingPark Enterprise.</li>
                              <li>ADVANCED: Provide the ID of the network subscription. If empty, the device is not associated with
                                  a network subscription and is automatically suspended: all its packets are ignored by the network server.</li>
                            </ul>
                          </td>
                          <td><strong>Optional</strong></td>
                        </tr>
                        <tr>
                          <td>I</td>
                          <td>AS routing profile ID (DEPRECATED)<br/>
                            This column must no longer be used: Application server IDs (T) must be used in replacement.
                          </td>
                          <td><strong>Optional</strong></td>
                        </tr>
                        <tr>
                          <td>J</td>
                          <td>Marker ID (DEPRECATED)<br/>
                            This column must no longer be used: it is no more used in ThingPark UI.
                          </td>
                          <td><strong>Optional</strong>. The default marker will be used when no marker are specified at the creation.</td>
                        </tr>
                        <tr>
                          <td>K</td>
                          <td>Device name</td>
                          <td><strong>Optional</strong>. The device name is automatically set to the DevEUI when not provided at creation.</td>
                        </tr>
                        <tr>
                          <td>L</td>
                          <td>Admin LAT</td>
                          <td><strong>Optional</strong>. When provided the manual location is automatically activated,
                            otherwise the network location is automatically activated.</td>
                        </tr>
                        <tr>
                          <td>M</td>
                          <td>Admin LON</td>
                          <td><strong>Optional</strong>. When provided the manual location is automatically activated,
                            otherwise the network location is automatically activated.</td>
                        </tr>
                        <tr>
                          <td>N</td>
                          <td>Other admin info</td>
                          <td><strong>Optional</strong></td>
                        </tr>
                        <tr>
                          <td>O</td>
                          <td>Alarm 004 configuration XML document:
                            <ul>
                              <li>The root XML element is <code>alarm004</code></li>
                              <li>The enclosed <code>threshold1</code> self-closing XML element configures the first threshold of the alarm</li>
                              <li>The enclosed <code>threshold2</code> self-closing XML element configures the second threshold of the alarm</li>
                              <li>For each threshold XML element the following attributes are available:
                                <ul>
                                  <li><code>status</code>: <code>ENABLE</code> or <code>DISABLE</code> this threshold</li>
                                  <li><code>level</code>: severity (2-6) of the alarm for this threshold</li>
                                  <li><code>duration</code>: inactivity period (ISO 8601 duration among <code>PT1H</code>, <code>PT2H</code>,
                                    <code>PT5H</code>, <code>PT10H</code>, <code>P1D</code>, <code>P2D</code>, <code>P4D</code>, <code>P7D</code>
                                    and <code>P15D</code>) after which the alarm is triggered for this threshold</li>
                                </ul>
                              </li>
                              <li>The following constraints must be satisfied:
                                <ul>
                                  <li><code>threshold2@status</code> can be set to <code>ENABLE</code> only if <code>threshold1@status</code> is <code>ENABLE</code></li>
                                  <li><code>threshold1@level</code> must be lower than <code>threshold2@level</code></li>
                                  <li><code>threshold1@duration</code> must be lower than <code>threshold2@duration</code></li>
                                </ul>
                              </li>
                            </ul>
                            <p>Default: <code>&lt;alarm004&gt;&lt;threshold1 status="ENABLE" level="3" duration="P2D"/&gt;&lt;threshold2 status="ENABLE" level="5" duration="P4D"/&gt;&lt;/alarm004&gt;</code></p>
                          </td>
                          <td><strong>Optional</strong></td>
                        </tr>
                        <tr>
                          <td>P</td>
                          <td>ADM verification code (DEPRECATED)<br/>
                            This column must no longer be used: the associated feature is no more available in the product.
                          </td>
                          <td><strong>Optional</strong>. Must be provided if the <strong>"ABP address validation"</strong> option is activated
                            on the associated device manager subscription.</td>
                        </tr>
                        <tr>
                          <td>Q</td>
                          <td>Motion indicator</td>
                          <td><strong>Optional</strong>. The motion indicator of the device profile will be used when no motion indicator is
                            specified at the creation.</td>
                        </tr>
                        <tr>
                          <td>R</td>
                          <td>n/a</td>
                          <td></td>
                        </tr>
                        <tr>
                          <td>S</td>
                          <td>n/a</td>
                          <td></td>
                        </tr>
                        <tr>
                          <td>T</td>
                          <td>Application server IDs<br/>
                            Multiple application server IDs may be provided, separated by a comma.<br/>
                            If the authenticated user has domain restrictions, only the following application servers can be associated with a device:
                            <ul>
                              <li>Application servers not associated with any domain</li>
                              <li>Application servers associated with domains and matching the domain restrictions</li>
                            </ul>
                          </td>
                          <td><strong>Optional</strong><br/>
                            <strong>Forbidden</strong> if AS routing profile ID (I) is provided.
                          </td>
                        </tr>
                        <tr>
                          <td>U</td>
                          <td>LoRaWAN SNwkSIntKey<br/>Supported encoding modes:
                            <ul>
                              <li>Clear text (hexadecimal encoding)</li>
                              <li>Encrypted with TWA Exchange Key (RSA) version specified in column X (base64 encoding)</li>
                            </ul>
                          </td>
                          <td><strong>Mandatory</strong> for LoRaWAN 1.1 device, <strong>Forbidden</strong> otherwise.</td>
                        </tr>
                        <tr>
                          <td>V</td>
                          <td>LoRaWAN NwkSEncKey<br/>Supported encoding modes:
                            <ul>
                              <li>Clear text (hexadecimal encoding)</li>
                              <li>Encrypted with TWA Exchange Key (RSA) version specified in column X (base64 encoding)</li>
                            </ul>
                          </td>
                          <td><strong>Mandatory</strong> for LoRaWAN 1.1 device, <strong>Forbidden</strong> otherwise.</td>
                        </tr>
                        <tr>
                          <td>W</td>
                          <td>n/a</td>
                          <td></td>
                        </tr>
                        <tr>
                          <td>X</td>
                          <td>TWA Exchange Key (RSA) version used to encrypt the keys</td>
                          <td><strong>Optional</strong></td>
                        </tr>
                        <tr>
                          <td>Y</td>
                          <td>n/a</td>
                          <td></td>
                        </tr>
                        <tr>
                          <td>Z</td>
                          <td>Protocol Identifier</td>
                          <td><strong>Optional</strong>. The default Protocol Identifier defined in Device Profile will be used when no Protocol Identifier
                            is specified at the creation.</td>
                        </tr>
                        <tr>
                          <td>AA</td>
                          <td>Device LoRaWAN® state (internal usage only)</td>
                          <td><strong>Optional</strong></td>
                        </tr>
                        <tr>
                          <td>AB</td>
                          <td>Comma-separated list of tag names</td>
                          <td><strong>Optional</strong></td>
                        </tr>
                        <tr>
                          <td>AC</td>
                          <td>Comma-separated list of associated domains. The list cannot contain more than one domain for a given group.<br/>
                            The domain group name and the domain name must be provided as follow: <code>domain.group.name:domain.name</code>.<br/>
                            Each domain must exist in the subscriber account and must be in <code>ACTIVE</code> state to be used.<br/>
                            If the authenticated user has domain restrictions, the list of domains must match the domain restrictions.
                          </td>
                          <td><strong>Optional</strong></td>
                        </tr>
                        <tr>
                          <td>AD</td>
                          <td>32 bits integer representation of the last FCntDn received by the device</td>
                          <td><strong>Mandatory</strong> for a LoRaWAN 1.0 device migrated from another network server, <strong>Forbidden</strong> otherwise.</td>
                        </tr>
                        <tr>
                          <td>AE</td>
                          <td>32 bits integer representation of the last FCntUp sent by the device</td>
                          <td><strong>Optional</strong> for a LoRaWAN 1.0 device migrated from another network server, <strong>Forbidden</strong> otherwise.</td>
                        </tr>
                        <tr>
                          <td>AF</td>
                          <td>RX1 data rate offset (0..7)</td>
                          <td><strong>Optional</strong> for a LoRaWAN 1.0 device migrated from another network server, <strong>Forbidden</strong> otherwise.</td>
                        </tr>
                        <tr>
                          <td>AG</td>
                          <td>RX2 frequency in MHz (433..928 up to 6 decimal places)</td>
                          <td><strong>Optional</strong> for a LoRaWAN 1.0 device migrated from another network server, <strong>Forbidden</strong> otherwise.</td>
                        </tr>
                        <tr>
                          <td>AH</td>
                          <td>RX2 data rate (0..15)</td>
                          <td><strong>Optional</strong> for a LoRaWAN 1.0 device migrated from another network server, <strong>Forbidden</strong> otherwise.</td>
                        </tr>
                        <tr>
                          <td>AI</td>
                          <td>RX1 delay in seconds (1..15)</td>
                          <td><strong>Optional</strong> for a LoRaWAN 1.0 device migrated from another network server, <strong>Forbidden</strong> otherwise.</td>
                        </tr>
                        <tr>
                          <td>AJ</td>
                          <td>Downlink dwell time: 0 (no limit) or 1 (400 ms)</td>
                          <td><strong>Optional</strong> for a LoRaWAN 1.0 device in AS923 or AU915 ISM band migrated from another network server, <strong>Forbidden</strong> otherwise.</td>
                        </tr>
                        <tr>
                          <td>AK</td>
                          <td>Uplink dwell time: 0 (no limit) or 1 (400 ms)</td>
                          <td><strong>Optional</strong> for a LoRaWAN 1.0 device in AS923 or AU915 ISM band migrated from another network server, <strong>Forbidden</strong> otherwise.</td>
                        </tr>
                      </tbody>
                    </table>
                    <br/></html>

                    Notes:

                    - The columns from AD to AI are used to describe the LoRaWAN® state for a LoRaWAN 1.0 device migrated from another network server.
                      The following combinations are supported:
                      - The columns from AD to AI are empty: the ABP device is not migrated from another network server.
                      - Only the column AD is filled: the ABP device is migrated from another network server and will be fully reconfigured, the uplink
                        replay attack detection is disabled for the first uplink frame and re-enabled for the following uplink frame based on the received
                        FCntUp assuming a page set to 0 to build the 32-bit representation.
                      - The column AD and the columns from AF to AI are filled: the ABP device is migrated from another network server and will be partially
                        reconfigured, the uplink replay attack detection is disabled for the first uplink frame and re-enabled for the following uplink frame
                        based on the received FCntUp assuming a page set to 0 to build the 32-bit representation.
                      - The columns from AD to AI are filled: the ABP device is migrated from another network server and will be partially reconfigured,
                        the uplink replay attack detection is enabled.
                      - The columns AJ and AK are region-specific: they must be filled in the above cases where the device does not have to be fully reconfigured
                        for AS923 and AU915 ISM bands.

                    ### Columns for `CREATE_OTAA` operation

                    <html><table>
                      <thead><tr><th><strong>Column</strong></th><th><strong>Definition</strong></th><th><strong>Cardinality</strong></th></tr></thead>
                      <tbody>
                        <tr>
                          <td>A</td>
                          <td>Type of operation: <code>CREATE_OTAA</code></td>
                          <td><strong>Mandatory</strong></td>
                        </tr>
                        <tr>
                          <td>B</td>
                          <td>LoRaWAN DevEUI or onboarding tag</td>
                          <td><strong>Mandatory</strong></td>
                        </tr>
                        <tr>
                          <td>C</td>
                          <td>LoRaWAN DevAddr<br/>
                            This column should only be used for a LoRaWAN 1.0 device migrated from another network server.
                            The permanent assignement of a DevAddr is DEPRECATED to let the network server allocate a DevAddr
                            in the range of the configured NetID during the join procedure.
                          </td>
                          <td><strong>Optional</strong></td>
                        </tr>
                        <tr>
                          <td>D</td>
                          <td>Device profile ID</td>
                          <td><strong>Mandatory</strong> if a DevEUI is provided in column B, <strong>Optional</strong> otherwise</td>
                        </tr>
                        <tr>
                          <td>E</td>
                          <td>LoRaWAN JoinEUI/AppEUI</td>
                          <td><strong>Optional</strong> if Local Join Server is used, <strong>Mandatory</strong> otherwise.</td>
                        </tr>
                        <tr>
                          <td>F</td>
                          <td>LoRaWAN AppKey<br/>Supported encoding modes:
                            <ul>
                              <li>Clear text (hexadecimal encoding)</li>
                              <li>Encrypted with HSM Application Key (AES) version specified in column S (hexadecimal encoding)</li>
                              <li>Encrypted with HSM or TWA Exchange Key (RSA) version specified in column X (base64 encoding)</li>
                            </ul>
                          </td>
                          <td><strong>Local Join Server</strong> is used when provided, <strong>External Join Server</strong> is used otherwise.</td>
                        </tr>
                        <tr>
                          <td>G</td>
                          <td>ThingPark X IoT Flow matcher tags XML document: see the column G in <code>CREATE_ABP</code> operation for more details.</td>
                          <td><strong>Optional</strong>.<br/>Not applicable to <strong>ThingPark Enterprise</strong>.</td>
                        </tr>
                        <tr>
                          <td>H</td>
                          <td>Network Subscription associated with the device: see the column H in <code>CREATE_ABP</code> operation for more details.</td>
                          <td><strong>Optional</strong></td>
                        </tr>
                        <tr>
                          <td>I</td>
                          <td>AS routing profile ID (DEPRECATED)<br/>
                            This column must no longer be used: Application server IDs (T) must be used in replacement.
                          </td>
                          <td><strong>Optional</strong></td>
                        </tr>
                        <tr>
                          <td>J</td>
                          <td>Marker ID (DEPRECATED)<br/>
                            This column must no longer be used: it is no more used in ThingPark UI.
                          </td>
                          <td><strong>Optional</strong>. The default marker will be used when no marker are specified at the creation.</td>
                        </tr>
                        <tr>
                          <td>K</td>
                          <td>Device name</td>
                          <td><strong>Optional</strong>. The device name is automatically set to the DevEUI when not provided at creation.</td>
                        </tr>
                        <tr>
                          <td>L</td>
                          <td>Admin LAT</td>
                          <td><strong>Optional</strong>. When provided the manual location is automatically activated,
                            otherwise the network location is automatically activated.td>
                        </tr>
                        <tr>
                          <td>M</td>
                          <td>Admin LON</td>
                          <td><strong>Optional</strong>. When provided the manual location is automatically activated,
                            otherwise the network location is automatically activated.</td>
                        </tr>
                        <tr>
                          <td>N</td>
                          <td>Other admin info</td>
                          <td><strong>Optional</strong></td>
                        </tr>
                        <tr>
                          <td>O</td>
                          <td>Alarm 004 configuration XML document: see the column O in <code>CREATE_ABP</code> operation for more details.</td>
                          <td><strong>Optional</strong></td>
                        </tr>
                        <tr>
                          <td>P</td>
                          <td>ADM verification code (DEPRECATED)
                            This column must no longer be used: the associated feature is no more available in the product.
                          </td>
                          <td><strong>Optional</strong>. Must be provided if the <strong>"OTAA address validation"</strong> option is activated on the associated device manager subscription.</td>
                        </tr>
                        <tr>
                          <td>Q</td>
                          <td>Motion indicator</td>
                          <td><strong>Optional</strong>. The motion indicator of the device profile will be used when no motion indicator is specified at the creation.</td>
                        </tr>
                        <tr>
                          <td>R</td>
                          <td>HSM group ID</td>
                          <td><strong>Optional</strong> if Local Join Server is used, <strong>Forbidden</strong> otherwise.</td>
                        </tr>
                        <tr>
                          <td>S</td>
                          <td>HSM Application Key version<br/>
                            HSM application key version used to encrypt the AppKey.
                          </td>
                          <td><strong>Optional</strong> if Local Join Server is used, <strong>Forbidden</strong> otherwise.</td>
                        </tr>
                        <tr>
                          <td>T</td>
                          <td>Application server IDs<br/>
                            Multiple application server IDs may be provided, separated by a comma.<br/>
                            If the authenticated user has domain restrictions, only the following application servers can be associated with a device:
                            <ul>
                              <li>Application servers not associated with any domain</li>
                              <li>Application servers associated with domains and matching the domain restrictions</li>
                            </ul>
                          </td>
                          <td><strong>Optional</strong><br/>
                            <strong>Forbidden</strong> if AS routing profile ID (I) is provided.
                          </td>
                        </tr>
                        <tr>
                          <td>U</td>
                          <td>LoRaWAN NwkKey<br/>Supported encoding modes:
                            <ul>
                              <li>Clear text (hexadecimal encoding)</li>
                              <li>Encrypted with HSM Network Key (AES) version specified in column V (hexadecimal encoding)</li>
                              <li>Encrypted with HSM or TWA Exchange Key (RSA) version specified in column X (base64 encoding)</li>
                            </ul>
                          </td>
                          <td><strong>Mandatory</strong> for LoRaWAN 1.1 device if Local Join Server is used, <strong>Forbidden</strong> otherwise.</td>
                        </tr>
                        <tr>
                          <td>V</td>
                          <td>HSM Network Key version</td>
                          <td><strong>Optional</strong> for LoRaWAN 1.1 device if Local Join Server is used, <strong>Forbidden</strong> otherwise.</td>
                        </tr>
                        <tr>
                          <td>W</td>
                          <td>AS transport key ID<br/>
                            If the authenticated user has domain restrictions, only the following AS transport keys can be associated with a device:
                            <ul>
                              <li>AS transport keys not associated with any domain</li>
                              <li>AS transport keys associated with domains and matching the domain restrictions</li>
                            </ul>
                          </td>
                          <td><strong>Optional</strong> if Local Join Server is used and no AS routing profile ID (I) is provided, <strong>Forbidden</strong> otherwise.</td>
                        </tr>
                        <tr>
                          <td>X</td>
                          <td>HSM or TWA Exchange Key (RSA) version used to encrypt the keys</td>
                          <td><strong>Optional</strong></td>
                        </tr>
                        <tr>
                          <td>Y</td>
                          <td>Owner Token</td>
                          <td><strong>Optional</strong> if External Join Server is used, <strong>Forbidden</strong> otherwise.</td>
                        </tr>
                        <tr>
                          <td>Z</td>
                          <td>Protocol Identifier</td>
                          <td><strong>Optional</strong>. The default Protocol Identifier defined in Device Profile will be used when no Protocol Identifier is specified at the creation.</td>
                        </tr>
                        <tr>
                          <td>AA</td>
                          <td>Device LoRaWAN® state (internal usage only)</td>
                          <td><strong>Optional</strong></td>
                        </tr>
                        <tr>
                          <td>AB</td>
                          <td>Comma-separated list of tag names</td>
                          <td><strong>Optional</strong></td>
                        </tr>
                        <tr>
                          <td>AC</td>
                          <td>Comma-separated list of associated domains: see the column AC in <code>CREATE_ABP</code> operation for more details.</td>
                          <td><strong>Optional</strong></td>
                        </tr>
                        <tr>
                          <td>AD</td>
                          <td>32 bits integer representation of the last FCntDn received by the device</td>
                          <td><strong>Optional</strong> for a LoRaWAN 1.0 device using Local Join Server and migrated from another network server, <strong>Forbidden</strong> otherwise.</td>
                        </tr>
                        <tr>
                          <td>AE</td>
                          <td>32 bits integer representation of the last FCntUp sent by the device</td>
                          <td><strong>Optional</strong> for a LoRaWAN 1.0 device using Local Join Server and migrated from another network server, <strong>Forbidden</strong> otherwise.</td>
                        </tr>
                        <tr>
                          <td>AF</td>
                          <td>RX1 data rate offset (0..7)</td>
                          <td><strong>Optional</strong> for a LoRaWAN 1.0 device using Local Join Server and migrated from another network server, <strong>Forbidden</strong> otherwise.</td>
                        </tr>
                        <tr>
                          <td>AG</td>
                          <td>RX2 frequency in MHz (433..928 up to 6 decimal places)</td>
                          <td><strong>Optional</strong> for a LoRaWAN 1.0 device using Local Join Server and migrated from another network server, <strong>Forbidden</strong> otherwise.</td>
                        </tr>
                        <tr>
                          <td>AH</td>
                          <td>RX2 data rate (0..15)</td>
                          <td><strong>Optional</strong> for a LoRaWAN 1.0 device using Local Join Server and migrated from another network server, <strong>Forbidden</strong> otherwise.</td>
                        </tr>
                        <tr>
                          <td>AI</td>
                          <td>RX1 delay in seconds (1..15)</td>
                          <td><strong>Optional</strong> for a LoRaWAN 1.0 device using Local Join Server and migrated from another network server, <strong>Forbidden</strong> otherwise.</td>
                        </tr>
                        <tr>
                          <td>AJ</td>
                          <td>Downlink dwell time: 0 (no limit) or 1 (400 ms)</td>
                          <td><strong>Optional</strong> for a LoRaWAN 1.0 device in AS923 or AU915 ISM band using Local Join Server and migrated from another network server, <strong>Forbidden</strong> otherwise.</td>
                        </tr>
                        <tr>
                          <td>AK</td>
                          <td>Uplink dwell time: 0 (no limit) or 1 (400 ms)</td>
                          <td><strong>Optional</strong> for a LoRaWAN 1.0 device in AS923 or AU915 ISM band using Local Join Server and migrated from another network server, <strong>Forbidden</strong> otherwise.</td>
                        </tr>
                        <tr>
                          <td>AL</td>
                          <td>24 bits hexadecimal representation of the last JoinNonce used by the join server</td>
                          <td><strong>Mandatory</strong> for a LoRaWAN 1.0 device using Local Join Server and migrated from another network server, <strong>Forbidden</strong> otherwise.</td>
                        </tr>
                        <tr>
                          <td>AM</td>
                          <td>16 bits hexadecimal representation of the last DevNonce used by the device</td>
                          <td><strong>Optional</strong> for a LoRaWAN 1.0 device using Local Join Server and migrated from another network server, <strong>Forbidden</strong> otherwise</td>
                        </tr>
                        <tr>
                          <td>AN</td>
                          <td>LoRaWAN NwkSKey<br/>Supported encoding modes:
                            <ul>
                              <li>Clear text (hexadecimal encoding)</li>
                              <li>Encrypted with TWA Exchange Key (RSA) version specified in column X (base64 encoding)</li>
                            </ul>
                          </td>
                          <td><strong>Optional</strong> for a LoRaWAN 1.0 device using Local Join Server and migrated from another network server, <strong>Forbidden</strong> otherwise.</td>
                        </tr>
                        <tr>
                          <td>AO</td>
                          <td>LoRaWAN AppSKey<br/>Supported encoding modes:
                            <ul>
                              <li>Clear text (hexadecimal encoding)</li>
                              <li>Encrypted with TWA Exchange Key (RSA) version specified in column X (base64 encoding)</li>
                            </ul>
                          </td>
                          <td><strong>Optional</strong> for a LoRaWAN 1.0 device using Local Join Server and migrated from another network server, <strong>Forbidden</strong> otherwise.</td>
                        </tr>
                      </tbody>
                    </table>

                    </br></html>

                    Notes:

                    - The column C and the columns from AD to AO are used to describe the LoRaWAN® state for a LoRaWAN 1.0 device migrated from another network server.
                      The following combinations are supported:
                      - The columns from AD to AO are empty: the OTAA device is not migrated from another network server.
                      - Only the column AL is filled: the OTAA device is migrated from another network server and will have to rejoin,
                        the Join request replay attack detection is disabled for the first Join request and re-enabled for the following Join requests based
                        on the received DevNonce.
                      - Only the column AL and AM are filled: the OTAA device is migrated from another network server and will have to rejoin,
                        the Join request replay attack detection is enabled.
                      - Only the column C, AD, AL, AN and AO are filled: the OTAA device is migrated from another network server and will not have to rejoin
                        but must be fully reconfigured, the Join request replay attack detection is disabled for the first Join request and re-enabled for
                        the following Join requests based on the received DevNonce, the uplink replay attack detection is disabled for the first uplink frame
                        and re-enabled for the following uplink frame based on the received FCntUp assuming a page set to 0 to build the 32-bit representation.
                      - Only the column C, AD, AL, AM, AN and AO are filled: the OTAA device is migrated from another network server and will not have to rejoin
                        but must be fully reconfigured, the Join request replay attack detection is enabled, the uplink replay attack detection is disabled
                        for the first uplink frame and re-enabled for the following uplink frame based on the received FCntUp assuming a page set to 0 to build
                        the 32-bit representation.
                      - Only the column C, AD, AF, AG, AH, AI, AL, AM, AN and AO are filled: the OTAA device is migrated from another network server and will not
                        have to rejoin but must be partially reconfigured, the Join request replay attack detection is enabled, the uplink replay attack detection
                        is disabled for the first uplink frame and re-enabled for the following uplink frame based on the received FCntUp assuming a page set to 0
                        to build the 32-bit representation.
                      - The column C and the columns from AD to AO are filled: the OTAA device is migrated from another network server and will not have to rejoin
                        but must be partially reconfigured, the Join request replay attack detection and the uplink replay attack detection are enabled.
                      - The columns AJ and AK are region-specific: they must be filled in the above cases where the device does not have to rejoin for AS923 and AU915
                        ISM bands.

                    ### Columns for `CREATE_CELLULAR` operation

                    <html><table>
                      <thead><tr><th><strong>Column</strong></th><th><strong>Definition</strong></th><th><strong>Cardinality</strong></th></tr></thead>
                      <tbody>
                        <tr>
                          <td>A</td>
                          <td>Type of operation: <code>CREATE_CELLULAR</code></td>
                          <td><strong>Mandatory</strong></td>
                        </tr>
                        <tr>
                          <td>B</td>
                          <td>Enforced IMEI (15 digits)</td>
                          <td><strong>Optional</strong></td>
                        </tr>
                        <tr>
                          <td>C</td>
                          <td>ID of the SIM card</td>
                          <td><strong>Mandatory</strong></td>
                        </tr>
                        <tr>
                          <td>D</td>
                          <td>Device profile ID</td>
                          <td><strong>Mandatory</strong></td>
                        </tr>
                        <tr>
                          <td>E</td>
                          <td>n/a</td>
                          <td></td>
                        </tr>
                        <tr>
                          <td>F</td>
                          <td>n/a</td>
                          <td></td>
                        </tr>
                        <tr>
                          <td>G</td>
                          <td>n/a</td>
                          <td></td>
                        </tr>
                        <tr>
                          <td>H</td>
                          <td>Network subscription ID</td>
                          <td><strong>Optional</strong></td>
                        </tr>
                        <tr>
                          <td>I</td>
                          <td>AS routing profile ID (DEPRECATED)<br/>
                            This column must no longer be used: Application server IDs (T) and Network context ID (W) must be used in replacement.
                          </td>
                          <td><strong>Optional</strong></td>
                        </tr>
                        <tr>
                          <td>J</td>
                          <td>Marker ID (DEPRECATED)<br/>
                            This column must no longer be used: it is no more used in ThingPark UI.
                          </td>
                          <td><strong>Optional</strong>. The default marker will be used when no marker are specified at the creation.</td>
                        </tr>
                        <tr>
                          <td>K</td>
                          <td>Device name</td>
                          <td><strong>Optional</strong>. The device name is automatically set to the DevEUI when not provided at creation.</td>
                        </tr>
                        <tr>
                          <td>L</td>
                          <td>Admin LAT</td>
                          <td><strong>Optional</strong>. When provided the manual location is automatically activated,
                            otherwise the network location is automatically activated.</td>
                        </tr>
                        <tr>
                          <td>M</td>
                          <td>Admin LON</td>
                          <td><strong>Optional</strong>. When provided the manual location is automatically activated,
                            otherwise the network location is automatically activated.</td>
                        </tr>
                        <tr>
                          <td>N</td>
                          <td>Other admin info</td>
                          <td><strong>Optional</strong></td>
                        </tr>
                        <tr>
                          <td>O</td>
                          <td>Alarm 004 configuration XML document: see the column O in <code>CREATE_ABP</code> operation for more details.</td>
                          <td><strong>Optional</strong></td>
                        </tr>
                        <tr>
                          <td>P</td>
                          <td>n/a</td>
                          <td></td>
                        </tr>
                        <tr>
                          <td>Q</td>
                          <td>Motion indicator</td>
                          <td><strong>Optional</strong>. The motion indicator of the device profile will be used when no motion indicator is specified at the creation.</td>
                        </tr>
                        <tr>
                          <td>R</td>
                          <td>n/a</td>
                          <td></td>
                        </tr>
                        <tr>
                          <td>S</td>
                          <td>n/a</td>
                          <td></td>
                        </tr>
                        <tr>
                          <td>T</td>
                          <td>Application server IDs<br/>
                            Multiple application server IDs may be provided, separated by a comma.<br/>
                            If the authenticated user has domain restrictions, only the following application servers can be associated with a device:
                            <ul>
                              <li>Application servers not associated with any domain</li>
                              <li>Application servers associated with domains and matching the domain restrictions</li>
                            </ul>
                          </td>
                          <td><strong>Optional</strong><br/>
                              <strong>Forbidden</strong> if AS routing profile ID (I) is provided.
                          </td>
                        </tr>
                        <tr>
                          <td>U</td>
                          <td>n/a</td>
                          <td></td>
                        </tr>
                        <tr>
                          <td>V</td>
                          <td>n/a</td>
                          <td></td>
                        </tr>
                        <tr>
                          <td>W</td>
                          <td>Network context ID</td>
                          <td><strong>Optional</strong><br/>
                              <strong>Forbidden</strong> if AS routing profile ID (I) is provided.<br/>
                          </td>
                        </tr>
                        <tr>
                          <td>X</td>
                          <td>n/a</td>
                          <td></td>
                        </tr>
                        <tr>
                          <td>Y</td>
                          <td>n/a</td>
                          <td></td>
                        </tr>
                        <tr>
                          <td>Z</td>
                          <td>n/a</td>
                          <td></td>
                        </tr>
                        <tr>
                          <td>AA</td>
                          <td>n/a</td>
                          <td></td>
                        </tr>
                        <tr>
                          <td>AB</td>
                          <td>Comma-separated list of tag names</td>
                          <td><strong>Optional</strong></td>
                        </tr>
                        <tr>
                          <td>AC</td>
                          <td>Comma-separated list of associated domains: see the column AC in <code>CREATE_ABP</code> operation for more details.</td>
                          <td><strong>Optional</strong></td>
                        </tr>
                      </tbody>
                    </table>
                    </br></html>

                    ### Columns for `UPDATE_ABP` operation


                    <html><table>
                      <thead><tr><th><strong>Column</strong></th><th><strong>Definition</strong></th><th><strong>Cardinality</strong></th></tr></thead>
                      <tbody>
                        <tr>
                          <td>A</td>
                          <td>Type of operation: <code>UPDATE_ABP</code></td>
                          <td><strong>Mandatory</strong></td>
                        </tr>
                        <tr>
                          <td>B</td>
                          <td>DevEUI of the device</td>
                          <td><strong>Mandatory</strong></td>
                        </tr>
                        <tr>
                          <td>C</td>
                          <td>n/a</td>
                          <td></td>
                        </tr>
                        <tr>
                          <td>D</td>
                          <td>Device profile ID</td>
                          <td><strong>Optional</strong></td>
                        </tr>
                        <tr>
                          <td>E</td>
                          <td>LoRaWAN FNwkSIntKey/NwkSKey: see the column E in <code>CREATE_ABP</code> operation for more details.</td>
                          <td><strong>Optional</strong></td>
                        </tr>
                        <tr>
                          <td>F</td>
                          <td>LoRaWAN AppSKey: see the column F in <code>CREATE_ABP</code> operation for more details.</td>
                          <td><strong>Optional</strong></td>
                        </tr>
                        <tr>
                          <td>G</td>
                          <td>ThingPark X IoT Flow matcher tags XML document: see the column G in <code>CREATE_ABP</code> operation for more details.</td>
                          <td><strong>Optional</strong>.<br/>Not applicable to <strong>ThingPark Enterprise</strong>.</td>
                        </tr>
                        <tr>
                          <td>H</td>
                          <td>Network Subscription associated with the device: see the column H in <code>CREATE_ABP</code> operation for more details.</td>
                          <td><strong>Optional</strong></td>
                        </tr>
                        <tr>
                          <td>I</td>
                          <td>n/a</td>
                          <td></td>
                        </tr>
                        <tr>
                          <td>J</td>
                          <td>n/a</td>
                          <td></td>
                        </tr>
                        <tr>
                          <td>K</td>
                          <td>Device name</td>
                          <td><strong>Optional</strong></td>
                        </tr>
                        <tr>
                          <td>L</td>
                          <td>Admin LAT</td>
                          <td><strong>Optional</strong>. When provided the manual location is automatically activated,
                            when `_unset` the network location is automatically activated.</td>
                        </tr>
                        <tr>
                          <td>M</td>
                          <td>Admin LON</td>
                          <td><strong>Optional</strong>. When provided the manual location is automatically activated,
                            when `_unset` the network location is automatically activated.</td>
                        </tr>
                        <tr>
                          <td>N</td>
                          <td>Other admin info</td>
                          <td><strong>Optional</strong></td>
                        </tr>
                        <tr>
                          <td>O</td>
                          <td>Alarm 004 configuration: see the column O in <code>CREATE_ABP</code> operation for more details.</td>
                          <td><strong>Optional</strong></td>
                        </tr>
                        <tr>
                          <td>P</td>
                          <td>n/a</td>
                          <td></td>
                        </tr>
                        <tr>
                          <td>Q</td>
                          <td>Motion indicator</td>
                          <td><strong>Optional</strong></td>
                        </tr>
                        <tr>
                          <td>R</td>
                          <td>n/a</td>
                          <td></td>
                        </tr>
                        <tr>
                          <td>S</td>
                          <td>n/a</td>
                          <td></td>
                        </tr>
                        <tr>
                          <td>T</td>
                          <td>Application server IDs<br/>
                            Multiple application server IDs may be provided, separated by a comma.<br/>
                            If the authenticated user has domain restrictions, only the following application servers can be associated with a device:
                            <ul>
                              <li>Application servers not associated with any domain</li>
                              <li>Application servers associated with domains and matching the domain restrictions</li>
                            </ul>
                          </td>
                          <td><strong>Optional</strong></td>
                        </tr>
                        <tr>
                          <td>U</td>
                          <td>LoRaWAN SNwkSIntKey: see the column U in <code>CREATE_ABP</code> operation for more details.</td>
                          <td><strong>Optional</strong> for LoRaWAN 1.1 device, <strong>Forbidden</strong> otherwise.</td>
                        </tr>
                        <tr>
                          <td>V</td>
                          <td>LoRaWAN NwkSEncKey: see the column V in <code>CREATE_ABP</code> operation for more details.</td>
                          <td><strong>Optional</strong> for LoRaWAN 1.1 device, <strong>Forbidden</strong> otherwise.</td>
                        </tr>
                        <tr>
                          <td>W</td>
                          <td>n/a</td>
                          <td></td>
                        </tr>
                        <tr>
                          <td>X</td>
                          <td>TWA Exchange Key (RSA) version used to encrypt the keys</td>
                          <td><strong>Optional</strong></td>
                        </tr>
                        <tr>
                          <td>Y</td>
                          <td>n/a</td>
                          <td></td>
                        </tr>
                        <tr>
                          <td>Z</td>
                          <td>Protocol Identifier</td>
                          <td><strong>Optional</strong></td>
                        </tr>
                        <tr>
                          <td>AA</td>
                          <td>Device LoRaWAN® state (internal usage only)</td>
                          <td><strong>Optional</strong></td>
                        </tr>
                        <tr>
                          <td>AB</td>
                          <td>Comma-separated list of tag names</td>
                          <td><strong>Optional</strong></td>
                        </tr>
                        <tr>
                          <td>AC</td>
                          <td>Comma-separated list of associated domains: see the column AC in <code>CREATE_ABP</code> operation for more details.</td>
                          <td><strong>Optional</strong></td>
                        </tr>
                        <tr>
                          <td>AD</td>
                          <td>32 bits integer representation of the last FCntDn received by the device</td>
                          <td><strong>Mandatory</strong> for a LoRaWAN 1.0 device that need to be resynchronized with the network server, <strong>Forbidden</strong> otherwise.</td>
                        </tr>
                        <tr>
                          <td>AE</td>
                          <td>32 bits integer representation of the last FCntUp sent by the device</td>
                          <td><strong>Optional</strong> for a LoRaWAN 1.0 device that need to be resynchronized with the network server, <strong>Forbidden</strong> otherwise.</td>
                        </tr>
                        <tr>
                          <td>AF</td>
                          <td>RX1 data rate offset (0..7)</td>
                          <td><strong>Optional</strong> for a LoRaWAN 1.0 device that need to be resynchronized with the network server, <strong>Forbidden</strong> otherwise.</td>
                        </tr>
                        <tr>
                          <td>AG</td>
                          <td>RX2 frequency in MHz (433..928 up to 6 decimal places)</td>
                          <td><strong>Optional</strong> for a LoRaWAN 1.0 device that need to be resynchronized with the network server, <strong>Forbidden</strong> otherwise.</td>
                        </tr>
                        <tr>
                          <td>AH</td>
                          <td>RX2 data rate (0..15)</td>
                          <td><strong>Optional</strong> for a LoRaWAN 1.0 device that need to be resynchronized with the network server, <strong>Forbidden</strong> otherwise.</td>
                        </tr>
                        <tr>
                          <td>AI</td>
                          <td>RX1 delay in seconds (1..15)</td>
                          <td><strong>Optional</strong> for a LoRaWAN 1.0 device that need to be resynchronized with the network server, <strong>Forbidden</strong> otherwise.</td>
                        </tr>
                        <tr>
                          <td>AJ</td>
                          <td>Downlink dwell time: 0 (no limit) or 1 (400 ms)</td>
                          <td><strong>Optional</strong> for a LoRaWAN 1.0 device in AS923 or AU915 ISM band that need to be resynchronized with the network server, <strong>Forbidden</strong> otherwise.</td>
                        </tr>
                        <tr>
                          <td>AK</td>
                          <td>Uplink dwell time: 0 (no limit) or 1 (400 ms)</td>
                          <td><strong>Optional</strong> for a LoRaWAN 1.0 device in AS923 or AU915 ISM band that need to be resynchronized with the network server, <strong>Forbidden</strong> otherwise.</td>
                        </tr>
                      </tbody>
                    </table>
                    </br></html>

                    Notes:

                    - When an optional column is empty: the value currently configured is kept
                    - The `_unset` keyword can be used to unset the following columns: F, G, H, K, L, M, N, O, T, Z, AB and AC
                    - The columns from AD to AI are used to describe the LoRaWAN® state for a LoRaWAN 1.0 device that need to be resynchronized with the network server.
                      The following combinations are supported:
                      - The columns from AD to AI are empty: the ABP device does not need to be resynchronized with the network server.
                      - Only the column AD is filled: the ABP device needs to be resynchronized with the network server and will be fully reconfigured,
                        the uplink replay attack detection is disabled for the first uplink frame and re-enabled for the following uplink frame based on the received
                        FCntUp assuming a page set to 0 to build the 32-bit representation.
                      - The column AD and the columns from AF to AI are filled: the ABP device needs to be resynchronized with the network server and will be partially
                        reconfigured, the uplink replay attack detection is disabled for the first uplink frame and re-enabled for the following uplink frame
                        based on the received FCntUp assuming a page set to 0 to build the 32-bit representation.
                      - The columns from AD to AI are filled: the ABP device needs to be resynchronized with the network server and will be partially
                        reconfigured, the uplink replay attack detection is enabled.
                      - The columns AJ and AK are region-specific: they must be filled in the above cases where the device does not have to be fully reconfigured
                        for AS923 and AU915 ISM bands.

                    ### Columns for `UPDATE_OTAA` operation

                    <html><table>
                      <thead><tr><th><strong>Column</strong></th><th><strong>Definition</strong></th><th><strong>Cardinality</strong></th></tr></thead>
                      <tbody>
                        <tr>
                          <td>A</td>
                          <td>Type of operation: <code>UPDATE_OTAA</code></td>
                          <td><strong>Mandatory</strong></td>
                        </tr>
                        <tr>
                          <td>B</td>
                          <td>DevEUI of the device</td>
                          <td><strong>Mandatory</strong></td>
                        </tr>
                        <tr>
                          <td>C</td>
                          <td>n/a</td>
                          <td></td>
                        </tr>
                        <tr>
                          <td>D</td>
                          <td>Device profile ID</td>
                          <td><strong>Optional</strong></td>
                        </tr>
                        <tr>
                          <td>E</td>
                          <td>LoRaWAN JoinEUI/AppEUI</td>
                          <td><strong>Optional</strong></td>
                        </tr>
                        <tr>
                          <td>F</td>
                          <td>LoRaWAN AppKey: see the column F in <code>CREATE_OTAA</code> operation for more details.</td>
                          <td><strong>Optional</strong> if Local Join Server is used, <strong>Forbidden</strong> if External Join Server is used.</td>
                        </tr>
                        <tr>
                          <td>G</td>
                          <td>ThingPark X IoT Flow matcher tags XML document: see the column G in <code>CREATE_ABP</code> operation for more details.</td>
                          <td><strong>Optional</strong>.<br/>Not applicable to <strong>ThingPark Enterprise</strong>.</td>
                        </tr>
                        <tr>
                          <td>H</td>
                          <td>Network Subscription associated with the device: see the column H in <code>CREATE_ABP</code> operation for more details.</td>
                          <td><strong>Optional</strong></td>
                        </tr>
                        <tr>
                          <td>I</td>
                          <td>n/a</td>
                          <td></td>
                        </tr>
                        <tr>
                          <td>J</td>
                          <td>n/a</td>
                          <td></td>
                        </tr>
                        <tr>
                          <td>K</td>
                          <td>Device name</td>
                          <td><strong>Optional</strong></td>
                        </tr>
                        <tr>
                          <td>L</td>
                          <td>Admin LAT</td>
                          <td><strong>Optional</strong>. When provided the manual location is automatically activated,
                            when `_unset` the network location is automatically activated.</td>
                        </tr>
                        <tr>
                          <td>M</td>
                          <td>Admin LON</td>
                          <td><strong>Optional</strong>. When provided the manual location is automatically activated,
                            when `_unset` the network location is automatically activated.</td>
                        </tr>
                        <tr>
                          <td>N</td>
                          <td>Other admin info</td>
                          <td><strong>Optional</strong></td>
                        </tr>
                        <tr>
                          <td>O</td>
                          <td>Alarm 004 configuration: see the column O in <code>CREATE_ABP</code> operation for more details.</td>
                          <td><strong>Optional</strong></td>
                        </tr>
                        <tr>
                          <td>P</td>
                          <td>n/a</td>
                          <td></td>
                        </tr>
                        <tr>
                          <td>Q</td>
                          <td>Motion indicator</td>
                          <td><strong>Optional</strong></td>
                        </tr>
                        <tr>
                          <td>R</td>
                          <td>HSM group ID</td>
                          <td><strong>Optional</strong> if Local Join Server is used, <strong>Forbidden</strong> otherwise.</td>
                        </tr>
                        <tr>
                          <td>S</td>
                          <td>HSM Application Key version<br/>
                            HSM application key version used to encrypt the AppKey.
                          </td>
                          <td><strong>Optional</strong> if Local Join Server is used, <strong>Forbidden</strong> otherwise.</td>
                        </tr>
                        <tr>
                          <td>T</td>
                          <td>Application server IDs<br/>
                            Multiple application server IDs may be provided, separated by a comma.<br/>
                            If the authenticated user has domain restrictions, only the following application servers can be associated with a device:
                            <ul>
                              <li>Application servers not associated with any domain</li>
                              <li>Application servers associated with domains and matching the domain restrictions</li>
                            </ul>
                          </td>
                          <td><strong>Optional</strong></td>
                        </tr>
                        <tr>
                          <td>U</td>
                          <td>LoRaWAN NwkKey: see the column U in <code>CREATE_OTAA</code> operation for more details.</td>
                          <td><strong>Optional</strong> for LoRaWAN 1.1 device if Local Join Server is used, <strong>Forbidden</strong> otherwise.</td>
                        </tr>
                        <tr>
                          <td>V</td>
                          <td>HSM Network Key version</td>
                          <td><strong>Optional</strong> for LoRaWAN 1.1 device if Local Join Server is used, <strong>Forbidden</strong> otherwise.</td>
                        </tr>
                        <tr>
                          <td>W</td>
                          <td>AS transport key ID<br/>
                            If the authenticated user has domain restrictions, only the following AS transport keys can be associated with a device:
                            <ul>
                              <li>AS transport keys not associated with any domain</li>
                              <li>AS transport keys associated with domains and matching the domain restrictions</li>
                            </ul>
                          </td>
                          <td><strong>Optional</strong> if Local Join Server is used, <strong>Forbidden</strong> otherwise.</td>
                        </tr>
                        <tr>
                          <td>X</td>
                          <td>HSM or TWA Exchange Key (RSA) version used to encrypt the keys</td>
                          <td><strong>Optional</strong></td>
                        </tr>
                        <tr>
                          <td>Y</td>
                          <td>n/a</td>
                          <td></td>
                        </tr>
                        <tr>
                          <td>Z</td>
                          <td>Protocol Identifier</td>
                          <td><strong>Optional</strong></td>
                        </tr>
                        <tr>
                          <td>AA</td>
                          <td>Device LoRaWAN® state (internal usage only)</td>
                          <td><strong>Optional</strong></td>
                        </tr>
                        <tr>
                          <td>AB</td>
                          <td>Comma-separated list of tag names</td>
                          <td><strong>Optional</strong></td>
                        </tr>
                        <tr>
                          <td>AC</td>
                          <td>Comma-separated list of associated domains: see the column AC in <code>CREATE_ABP</code> operation for more details.</td>
                          <td><strong>Optional</strong></td>
                        </tr>
                        <tr>
                          <td>AD</td>
                          <td>32 bits integer representation of the last FCntDn received by the device</td>
                          <td><strong>Optional</strong> for a LoRaWAN 1.0 device using Local Join Server and that need to be resynchronized with the network server, <strong>Forbidden</strong> otherwise.</td>
                        </tr>
                        <tr>
                          <td>AE</td>
                          <td>32 bits integer representation of the last FCntUp sent by the device</td>
                          <td><strong>Optional</strong> for a LoRaWAN 1.0 device using Local Join Server and that need to be resynchronized with the network server, <strong>Forbidden</strong> otherwise.</td>
                        </tr>
                        <tr>
                          <td>AF</td>
                          <td>RX1 data rate offset (0..7)</td>
                          <td><strong>Optional</strong> for a LoRaWAN 1.0 device using Local Join Server and that need to be resynchronized with the network server, <strong>Forbidden</strong> otherwise.</td>
                        </tr>
                        <tr>
                          <td>AG</td>
                          <td>RX2 frequency in MHz (433..928 up to 6 decimal places)</td>
                          <td><strong>Optional</strong> for a LoRaWAN 1.0 device using Local Join Server and that need to be resynchronized with the network server, <strong>Forbidden</strong> otherwise.</td>
                        </tr>
                        <tr>
                          <td>AH</td>
                          <td>RX2 data rate (0..15)</td>
                          <td><strong>Optional</strong> for a LoRaWAN 1.0 device using Local Join Server and that need to be resynchronized with the network server, <strong>Forbidden</strong> otherwise.</td>
                        </tr>
                        <tr>
                          <td>AI</td>
                          <td>RX1 delay in seconds (1..15)</td>
                          <td><strong>Optional</strong> for a LoRaWAN 1.0 device using Local Join Server and that need to be resynchronized with the network server, <strong>Forbidden</strong> otherwise.</td>
                        </tr>
                        <tr>
                          <td>AJ</td>
                          <td>Downlink dwell time: 0 (no limit) or 1 (400 ms)</td>
                          <td><strong>Optional</strong> for a LoRaWAN 1.0 device in AS923 or AU915 ISM band using Local Join Server and that need to be resynchronized with the network server, <strong>Forbidden</strong> otherwise.</td>
                        </tr>
                        <tr>
                          <td>AK</td>
                          <td>Uplink dwell time: 0 (no limit) or 1 (400 ms)</td>
                          <td><strong>Optional</strong> for a LoRaWAN 1.0 device in AS923 or AU915 ISM band using Local Join Server and that need to be resynchronized with the network server, <strong>Forbidden</strong> otherwise.</td>
                        </tr>
                        <tr>
                          <td>AL</td>
                          <td>24 bits hexadecimal representation of the last JoinNonce used by the join server</td>
                          <td><strong>Mandatory</strong> for a LoRaWAN 1.0 device using Local Join Server and that need to be resynchronized with the network server, <strong>Forbidden</strong> otherwise.</td>
                        </tr>
                        <tr>
                          <td>AM</td>
                          <td>16 bits hexadecimal representation of the last DevNonce used by the device</td>
                          <td><strong>Optional</strong> for a LoRaWAN 1.0 device using Local Join Server and that need to be resynchronized with the network server, <strong>Forbidden</strong> otherwise.</td>
                        </tr>
                        <tr>
                          <td>AN</td>
                          <td>LoRaWAN NwkSKey<br/>Supported encoding modes:
                            <ul>
                              <li>Clear text (hexadecimal encoding)</li>
                              <li>Encrypted with TWA Exchange Key (RSA) version specified in column X (base64 encoding)</li>
                            </ul>
                          </td>
                          <td><strong>Optional</strong> for a LoRaWAN 1.0 device using Local Join Server and that need to be resynchronized with the network server, <strong>Forbidden</strong> otherwise.</td>
                        </tr>
                        <tr>
                          <td>AO</td>
                          <td>LoRaWAN AppSKey<br/>Supported encoding modes:
                            <ul>
                              <li>Clear text (hexadecimal encoding)</li>
                              <li>Encrypted with TWA Exchange Key (RSA) version specified in column X (base64 encoding)</li>
                            </ul>
                          </td>
                          <td><strong>Optional</strong> for a LoRaWAN 1.0 device using Local Join Server and that need to be resynchronized with the network server, <strong>Forbidden</strong> otherwise.</td>
                        </tr>
                      </tbody>
                    </table>
                    </br></html>

                    Notes:

                    - When an optional column is empty: the value currently configured is kept
                    - The `_unset` keyword can be used to unset the following columns: G, H, K, L, M, N, O, T, Z, AB and AC
                    - The columns from AD to AO are used to describe the LoRaWAN® state for a LoRaWAN 1.0 device that need to be resynchronized with the network server.
                      The following combinations are supported:
                      - The columns from AD to AO are empty: the OTAA device does not need to be resynchronized with the network server.
                      - Only the column AL is filled: the OTAA device needs to be resynchronized with the network server and will have to rejoin,
                        the Join request replay attack detection is disabled for the first Join request and re-enabled for the following Join requests based
                        on the received DevNonce.
                      - Only the column AL and AM are filled: the OTAA device needs to be resynchronized with the network server and will have to rejoin,
                        the Join request replay attack detection is enabled.
                      - Only the column AD, AL, AN and AO are filled: the OTAA device needs to be resynchronized with the network server and will not have to rejoin
                        but must be fully reconfigured, the Join request replay attack detection is disabled for the first Join request and re-enabled for
                        the following Join requests based on the received DevNonce, the uplink replay attack detection is disabled for the first uplink frame
                        and re-enabled for the following uplink frame based on the received FCntUp assuming a page set to 0 to build the 32-bit representation.
                      - Only the column AD, AL, AM, AN and AO are filled: the OTAA device needs to be resynchronized with the network server and will not have to rejoin
                        but must be fully reconfigured, the Join request replay attack detection is enabled, the uplink replay attack detection is disabled
                        for the first uplink frame and re-enabled for the following uplink frame based on the received FCntUp assuming a page set to 0 to build
                        the 32-bit representation.
                      - Only the column AD, AF, AG, AH, AI, AL, AM, AN and AO are filled: the OTAA device needs to be resynchronized with the network server and will not
                        have to rejoin but must be partially reconfigured, the Join request replay attack detection is enabled, the uplink replay attack detection
                        is disabled for the first uplink frame and re-enabled for the following uplink frame based on the received FCntUp assuming a page set to 0
                        to build the 32-bit representation.
                      - The columns from AD to AO are filled: the OTAA device needs to be resynchronized with the network server and will not have to rejoin but must be
                        partially reconfigured, the Join request replay attack detection and the uplink replay attack detection are enabled.
                      - The columns AJ and AK are region-specific: they must be filled in the above cases where the device does not have to rejoin for AS923 and AU915
                        ISM bands.

                    ### Columns for `UPDATE_CELLULAR` operation

                    <html><table>
                      <thead><tr><th><strong>Column</strong></th><th><strong>Definition</strong></th><th><strong>Cardinality</strong></th></tr></thead>
                      <tbody>
                        <tr>
                          <td>A</td>
                          <td>Type of operation: <code>UPDATE_CELLULAR</code></td>
                          <td><strong>Mandatory</strong></td>
                        </tr>
                        <tr>
                          <td>B</td>
                          <td>DevEUI of the device</td>
                          <td><strong>Mandatory</strong></td>
                        </tr>
                        <tr>
                          <td>C</td>
                          <td>n/a</td>
                          <td></td>
                        </tr>
                        <tr>
                          <td>D</td>
                          <td>Device profile ID</td>
                          <td><strong>Optional</strong></td>
                        </tr>
                        <tr>
                          <td>E</td>
                          <td>n/a</td>
                          <td></td>
                        </tr>
                        <tr>
                          <td>F</td>
                          <td>n/a</td>
                          <td></td>
                        </tr>
                        <tr>
                          <td>G</td>
                          <td>n/a</td>
                          <td></td>
                        </tr>
                        <tr>
                          <td>H</td>
                          <td>Network subscription ID</td>
                          <td><strong>Optional</strong></td>
                        </tr>
                        <tr>
                          <td>I</td>
                          <td>n/a</td>
                          <td></td>
                        </tr>
                        <tr>
                          <td>J</td>
                          <td>n/a</td>
                          <td></td>
                        </tr>
                        <tr>
                          <td>K</td>
                          <td>Device name</td>
                          <td><strong>Optional</strong></td>
                        </tr>
                        <tr>
                          <td>L</td>
                          <td>Admin LAT</td>
                          <td><strong>Optional</strong>. When provided the manual location is automatically activated,
                            when `_unset` the network location is automatically activated.</td>
                        </tr>
                        <tr>
                          <td>M</td>
                          <td>Admin LON</td>
                          <td><strong>Optional</strong>. When provided the manual location is automatically activated,
                            when `_unset` the network location is automatically activated.</td>
                        </tr>
                        <tr>
                          <td>N</td>
                          <td>Other admin info</td>
                          <td><strong>Optional</strong></td>
                        </tr>
                        <tr>
                          <td>O</td>
                          <td>Alarm 004 configuration: see the column O in <code>CREATE_ABP</code> operation for more details.</td>
                          <td><strong>Optional</strong></td>
                        </tr>
                        <tr>
                          <td>P</td>
                          <td>n/a</td>
                          <td></td>
                        </tr>
                        <tr>
                          <td>Q</td>
                          <td>Motion indicator</td>
                          <td><strong>Optional</strong></td>
                        </tr>
                        <tr>
                          <td>R</td>
                          <td>n/a</td>
                          <td></td>
                        </tr>
                        <tr>
                          <td>S</td>
                          <td>n/a</td>
                          <td></td>
                        </tr>
                        <tr>
                          <td>T</td>
                          <td>Application server IDs<br/>
                            Multiple application server IDs may be provided, separated by a comma.<br/>
                            If the authenticated user has domain restrictions, only the following application servers can be associated with a device:
                            <ul>
                              <li>Application servers not associated with any domain</li>
                              <li>Application servers associated with domains and matching the domain restrictions</li>
                            </ul>
                          </td>
                          <td><strong>Optional</strong></td>
                        </tr>
                        <tr>
                          <td>U</td>
                          <td>n/a</td>
                          <td></td>
                        </tr>
                        <tr>
                          <td>V</td>
                          <td>n/a</td>
                          <td></td>
                        </tr>
                        <tr>
                          <td>W</td>
                          <td>Network context ID</td>
                          <td><strong>Optional</strong></td>
                        </tr>
                        <tr>
                          <td>X</td>
                          <td>n/a</td>
                          <td></td>
                        </tr>
                        <tr>
                          <td>Y</td>
                          <td>n/a</td>
                          <td></td>
                        </tr>
                        <tr>
                          <td>Z</td>
                          <td>n/a</td>
                          <td></td>
                        </tr>
                        <tr>
                          <td>AA</td>
                          <td>n/a</td>
                          <td></td>
                        </tr>
                        <tr>
                          <td>AB</td>
                          <td>Comma-separated list of tag names</td>
                          <td><strong>Optional</strong></td>
                        </tr>
                        <tr>
                          <td>AC</td>
                          <td>Comma-separated list of associated domains: see the column AC in <code>CREATE_ABP</code> operation for more details.</td>
                          <td><strong>Optional</strong></td>
                        </tr>
                      </tbody>
                    </table>
                    </br></html>

                    Notes:

                    - When an optional column is empty: the value currently configured is kept
                    - The `_unset` keyword can be used to unset the following columns: H, K, L, M, N, O, T, AB and AC

                    ### Columns for `DELETE` operation

                    <html><table>
                      <thead><tr><th><strong>Column</strong></th><th><strong>Definition</strong></th><th><strong>Cardinality</strong></th></tr></thead>
                      <tbody>
                        <tr>
                          <td>A</td>
                          <td>Type of operation: <code>DELETE</code></td>
                          <td><strong>Mandatory</strong></td>
                        </tr>
                        <tr>
                          <td>B</td>
                          <td>DevEUI of the device</td>
                          <td><strong>Mandatory</strong></td>
                        </tr>
                      </tbody>
                    </table>

                    </br></html>
        required: true
      responses:
        "200":
          description: >
            When an error is detected by TWA, TWA generate the following error
            CSV format.


            The CSV is includes in the standard &lt;error&gt; document as the &lt;message&gt; attribute:


            <html><table>
              <thead><tr><th><strong>Column</strong></th><th><strong>Definition</strong></th><th><strong>Cardinality</strong></th></tr></thead>
              <tbody>
                <tr><td>A</td><td>Device EUI or SIM ID for cellular devices</td><td><strong>Mandatory</strong></td></tr>
                <tr><td>B</td><td>Line number in the importation CSV</td><td><strong>Mandatory</strong></td></tr>
                <tr><td>C</td><td>Error-1 detected formatted as: '[' &lt;error code '] ' &lt;error message&gt;</td><td><strong>Mandatory</strong></td></tr>
                <tr><td>D</td><td>Error-2 detected: '[' &lt;error code '] ' &lt;error message&gt;</td><td><strong>Optional</strong></td></tr>
                <tr><td>E</td><td>Error-3 detected: '[' &lt;error code '] ' &lt;error message&gt;</td><td><strong>Optional</strong></td></tr>
                <tr><td>…</td><td>Error-x detected: '[' &lt;error code '] ' &lt;error message&gt;</td><td><strong>Optional</strong></td></tr>
              </tbody>
            </table></html>

            When no error is detected, an empty response is returned.
          content:
            application/json:
              example:
                code: 1
                message: >
                  999900FFFF002993,line 6,[111] A Device report already exists
                  for the given EUI

                  999900FFFF002993,line 7,[111] A Device report already exists for the given EUI,[222] No device profile for the given ID : SMTC/LoRaMote.1
              schema:
                $ref: "#/components/schemas/Error"
        "202":
          $ref: "#/components/responses/Async"
        default:
          $ref: "#/components/responses/Error"
  /subscriptions/mine/devices/readOnboardingTag:
    parameters: []
    post:
      parameters:
        - $ref: "#/components/parameters/Language-tag"
      tags:
        - devices
      summary: Read Onboarding Tag
      description: |
        Parse a LoRa Alliance™ onboarding tag and return
        matching device profiles.


        ### Access rights:
        - `<Subscription>/a`
      requestBody:
        $ref: "#/components/requestBodies/OnboardingTag"
      responses:
        "200":
          $ref: "#/components/responses/OnboardingTag"
        default:
          $ref: "#/components/responses/Error"
  /subscriptions/mine/devices/tags:
    post:
      tags:
        - devices
      summary: Tag Devices
      description: >
        Tag or untag a list of Devices by providing either a list of DevEUIs or
        a list of search criteria:

        * If a list of DevEUIs is provided in the request body: Tag or untag the list of Devices identified by the list of DevEUIs. The maximum number of DevEUIs is the maximum page size (system-wide configuration).

        * Else: Tag or untag the list of Devices matching the query parameters. Only one page is tagged/untagged at once.


        ### Access rights:

        - `<Subscription>/a`

        - If the authenticated user has domain restrictions, only devices
          matching the domain restrictions can be tagged.
      parameters:
        - $ref: "#/components/parameters/PageIndex"
        - $ref: "#/components/parameters/PageSize"
        - name: devEUI
          in: query
          description: Only tags/untags devices matching this DevEUI (prefix match)
          schema:
            type: array
            items:
              type: string
        - name: name
          in: query
          description: Only tags/untags devices matching this name (prefix match)
          schema:
            type: string
        - name: connectivityPlan
          in: query
          description: |
            When the string contains a network subscription ID: Only Devices
            associated with the network subscription are tagged/untagged.

            When the string contains the _NOCP keyword: Only Devices not
            associated with a network subscription are tagged/untagged.

            When the string contains the _CP keyword: Only Devices attached with
            a network subscription are tagged/untagged (without consideration
            for the network subscription).

            This parameter must no longer be used: the parameter
            `networkSubscriptionID` must be used in replacement.
          schema:
            type: string
          deprecated: true
        - name: networkSubscriptionID
          in: query
          description: >
            When the string contains a network subscription ID: Only Devices

            associated with the network subscription are tagged/untagged.


            When the string contains the `_unset` keyword: Only Devices not

            associated with a network subscription are tagged/untagged.


            When the string contains the `_any` keyword: Only Devices attached with

            a network subscription are tagged/untagged (without consideration

            for the network subscription).
          schema:
            type: string
        - name: batteryLevel
          in: query
          description: >
            Only tags/untags devices for which the last known battery level is
            equal or lower than the provided battery level.


            Note: No including 0 (because 0 means powered)
          schema:
            type: integer
            format: int32
        - name: infRSSI
          in: query
          description: >
            Only tags/untags devices for which the average RSSI is equal or
            lower

            than the provided RSSI.
          schema:
            type: number
            format: float
        - name: infSNR
          in: query
          description: |
            Only tags/untags devices for which the average SNR is equal or lower
            than the provided SNR.
          schema:
            type: number
            format: float
        - name: supSNR
          in: query
          description: |
            Only tags/untags devices for which the average SNR is equal or upper
            than the provided SNR.
          schema:
            type: number
            format: float
        - name: alarmLevel
          in: query
          description: >
            Only tags/untags devices for which one or several NOT-ACKED alarms
            exist:

            - 6: tags/untags devices with at least a CRITICAL nack alarm (state = 6)

            - 5: tags/untags devices with at least a CRITICAL or a MAJOR nack alarm (state >=5)

            - 4: tags/untags devices with at least a CRITICAL, MAJOR or MINOR nack alarm (state >=4)

            - 3: tags/untags devices with at least a CRITICAL, MAJOR, MINOR or WARNING nack alarm (state >=3)

            - 2: tags/untags devices with at least an UNCLEARED nack alarm (state >=2)

            - 1: tags/untags devices with at least an UNCLEARED or CLEARED nack alarm (state >=1)


            Note: When this query parameter is not specified, devices are tagged/untagged without consideration for alarms.
          schema:
            type: integer
            format: int32
        - name: minLat
          in: query
          description: >
            Only tags/untags devices matching this geolocation rectangle
            (minLat/minLon/maxLat/maxLon).


            When no localization query parameter are set, non-localized devices will be also returned.
          schema:
            type: number
            format: float
        - name: minLon
          in: query
          description: >
            Only tags/untags devices matching this geolocation rectangle
            (minLat/minLon/maxLat/maxLon).


            When no localization query parameter are set, non-localized devices will be also returned.
          schema:
            type: number
            format: float
        - name: maxLat
          in: query
          description: >
            Only tags/untags devices matching this the geolocation rectangle
            (minLat/minLon/maxLat/maxLon).


            When no localization query parameter are set, non-localized devices will be also returned.
          schema:
            type: number
            format: float
        - name: maxLon
          in: query
          description: >
            Only tags/untags devices matching this the geolocation rectangle
            (minLat/minLon/maxLat/maxLon).


            When no localization query parameter are set, non-localized devices will be also returned.
          schema:
            type: number
            format: float
        - name: healthState
          in: query
          description: |
            Only tags/untags devices matching this health state.

            Multiple values can be set. If not provided, all Devices are
            returned.
          schema:
            $ref: "#/components/schemas/DeviceHealthState"
          style: form
          explode: true
        - name: appServerID
          in: query
          description: >
            Only tags/untags devices associated with the Application Server
            through direct association. Association through AS Routing Profile
            is not taken into account.


            Multiple values can be set: in this case Devices must be associated with all provided Application Servers.
          schema:
            type: array
            items:
              type: string
          style: form
          explode: true
        - name: connectivity
          in: query
          description: |
            Only tags/untags devices matching connectivity:
            - `LORAWAN`
            - `CELLULAR`

            `CELLULAR` is only applicable if the
            cellular connectivity is enabled.
          schema:
            enum:
              - LORAWAN
              - CELLULAR
            type: string
        - name: query
          in: query
          description: >
            Only tags/untags devices with a devEUI or a name containing the
            provided term.

            (prefix match)
          schema:
            type: string
        - name: from
          in: query
          description: >
            Only tags/untags Devices created on or after this date/time.


            Syntax: ISO 8601 date/time including time offset. If no time offset is provided the server's offset is used by default.
          schema:
            type: string
            format: date-time
          example: 2018-08-24T09:27:59.512Z
        - name: to
          in: query
          description: >
            Only tags/untags Devices created on or before this date/time.


            Syntax: ISO 8601 date/time including time offset. If no time offset is provided the server's offset is used by default.
          schema:
            type: string
            format: date-time
          example: 2018-08-24T09:27:59.512Z
        - name: tag
          in: query
          description: |
            Only tags/untags devices matching this tag name (exact match)
          schema:
            type: array
            items:
              $ref: "#/components/schemas/TagName"
        - name: action
          in: query
          description: |
            Action to perform:
            - TAG: tag all devices matching the criteria
            - UNTAG: untag all devices matching the criteria
          schema:
            enum:
              - TAG
              - UNTAG
            type: string
            default: TAG
        - name: sort
          in: query
          description: |
            Defines how results are sorted (&lt;attribute&gt;,&lt;order&gt;).

            Following attributes are supported:
            - 'name': by name
            - 'avgSNR': by average SNR
            - 'avgESP': by average ESP
            - 'lastSF': by spreading factor of the last uplink frame
            - 'lastUpTimestamp': by timestamp of the last downlink frame
            - 'lastDwTimestamp': by timestamp of the last uplink frame
            - 'lastBatLevel': by battery level
            - 'creationDate': by date of creation of the device
            - 'lastMeanPER': by last mean PER without consideration for LRRs

            Following orders are supported:
            - 'asc': ascending order
            - 'desc': descending order

            By default, results are sorted by creation date ascending order.
          schema:
            type: string
            example: name,asc
      requestBody:
        $ref: "#/components/requestBodies/DevicesTag"
      responses:
        "200":
          $ref: "#/components/responses/DeviceTag"
        default:
          $ref: "#/components/responses/Error"
    parameters: []
  /subscriptions/mine/devices/tags/suggestions:
    get:
      tags:
        - devices
      summary: Retrieve Device Tag Suggestions
      description: >
        Retrieve a list of tag names starting with a query string (case
        insensitive).


        The number of tag names returned in the response is configurable

        (system-wide). By default the 20 first results are returned.


        Results are ordered by "name" (lexicographic order).

        No results are returned if the authenticated user has domain restrictions and `showTagSuggestionsWhenDomainRestrictions` is false.

        ### Access rights:

        - `<Subscription>/x`
      parameters:
        - $ref: "#/components/parameters/Query"
        - $ref: "#/components/parameters/TagExclude"
      responses:
        "200":
          $ref: "#/components/responses/TagSuggestions"
        default:
          $ref: "#/components/responses/Error"
    parameters: []
  "/subscriptions/mine/devices/{deviceUid}":
    get:
      tags:
        - devices
      summary: Retrieve Device
      description: |
        Retrieve a Device detail.

        ### Access rights:
        - `<Subscription>/x`
        - `LPWA_MGR::READ_NODE`
        - If the authenticated user has domain restrictions, the device must
          match the domain restrictions.
      parameters:
        - $ref: "#/components/parameters/Language-tag"
      responses:
        "200":
          $ref: "#/components/responses/Device"
        default:
          $ref: "#/components/responses/Error"
    put:
      tags:
        - devices
      summary: Update Device
      description: |
        Update a device.

        ### Access rights:
        - `<Subscription>/a`
        - `LPWA_MGR::WRITE_NODE (partial update)`
        - `LPWA_MGR::WRITE_NODE_ACTIVATION (full update)`
        - If the authenticated user has domain restrictions, the device must
          match the domain restrictions before and after the update.

        ### Optimistic locking:
        - `<device>.occ`
      parameters:
        - $ref: "#/components/parameters/Force"
        - $ref: "#/components/parameters/NetworkSubscriptionsHandlingMode"
      requestBody:
        $ref: "#/components/requestBodies/Device"
      responses:
        "200":
          $ref: "#/components/responses/Device"
        default:
          $ref: "#/components/responses/Error"
    delete:
      tags:
        - devices
      summary: Delete Device
      description: |
        Delete a device (Device, DeviceReport, DeviceHistory and DeviceAlarm).

        ### Access rights:
        - `<Subscription>/a`
        - If the authenticated user has domain restrictions, the device must
          match the domain restrictions.
      x-rateLimit:
        category: MEDIUM_IMPACT
      parameters:
        - $ref: "#/components/parameters/Async"
      responses:
        "202":
          $ref: "#/components/responses/Async"
        "204":
          $ref: "#/components/responses/Delete"
        default:
          $ref: "#/components/responses/Error"
    parameters:
      - $ref: "#/components/parameters/Device"
  "/subscriptions/mine/devices/{deviceUid}/admins/reset":
    post:
      tags:
        - devices
      summary: Create Reset
      description: |
        Reset the LRC context of the Device.

        ### Access rights:
        - `<Subscription>/a`
        - If the authenticated user has domain restrictions, the device must
          match the domain restrictions.
      responses:
        "204":
          description: Operation success
        default:
          $ref: "#/components/responses/Error"
    parameters:
      - $ref: "#/components/parameters/Device"
  "/subscriptions/mine/devices/{deviceUid}/admins/downlink":
    post:
      tags:
        - devices
      summary: Send Downlink
      description: |
        Submit a data payload to be sent in a downlink packet to the Device.

        The data payload is added in the per-device LRC downlink queue. The
        sending of the data payload in a downlink packet is scheduled according
        to the Device class and radio conditions.

        Only applicable to LoRaWAN devices.

        ### Access rights:
        - `<Subscription>/a`
        - If the authenticated user has domain restrictions, the device must
          match the domain restrictions.
      parameters:
        - name: payload
          in: query
          description: |
            Hexadecimal payload. The hexadecimal payload will be encrypted by
            the LRC if the fCntDn query parameter and the aFCntDn query
            parameter are absent, and if the LRC knows the AppSKey.
            Otherwise the payload must be provided encrypted according to the
            LoRaWAN specification, and the fCntDn query parameter or the aFCntDn
            query parameter must be present. The encryption uses the downlink
            counter, which is why the fCntDn query parameter or the aFCntDn
            query parameter is required in this case.
          required: true
          schema:
            type: string
        - name: fPort
          in: query
          description: |
            LoRaWAN target port [1..225]
          required: true
          schema:
            type: integer
            minimum: 1
            maximum: 225
        - name: fCntDn
          in: query
          description: |
            The LoRaWAN Downlink Counter value is used to encrypt the payload.
            This query parameter is needed only if the payload is provided
            encrypted. If present, fCntDn will be copied in the LoRaWAN header
            field FCnt, and the encrypted payload will be copied as-is to the
            LoRaWAN downlink frame by the LRC.
            **Only applicable to LoRaWAN 1.0**
          schema:
            type: integer
        - name: aFCntDn
          in: query
          description: |
            The LoRaWAN Applicative Downlink Counter value is used to encrypt
            the payload. This query parameter is needed only if the the payload
            is provided encrypted. If present, aFCntDn will be copied in the
            LoRaWAN header field FCnt, and the encrypted payload will be copied
            as-is to the LoRaWAN downlink frame by the LRC.
            **Only applicable to LoRaWAN 1.1**
          schema:
            type: integer
        - name: confirmed
          in: query
          description: |
            TRUE if the transmission of a CONFIRMED downlink frame is requested.
            FALSE if the transmission of an UNCONFIRMED downlink frame is
            requested.
          schema:
            type: boolean
            default: false
        - name: flushDownlinkQueue
          in: query
          description: |
            TRUE if the per-device LRC downlink queue must be emptied prior to
            add the downlink payload transported by this request.
          schema:
            type: boolean
            default: false
        - name: validityTime
          in: query
          description: |
            Associates the downlink payload with an expiration date (ISO 8601
            timestamp or Duration in seconds) in the pre-device LRC downlink
            queue.

            If the downlink payload has not yet been sent to the device, the
            downlink payload will be discarded by the LRC when the expiration
            date is reached.
          schema:
            type: string
            format: date-time
      responses:
        "201":
          description: Operation success
        default:
          $ref: "#/components/responses/Error"
    parameters:
      - $ref: "#/components/parameters/Device"
  "/subscriptions/mine/devices/{deviceUid}/alarms":
    get:
      tags:
        - devices
      summary: Retrieve Alarms of a Device
      description: >
        Retrieve a list of alarms associated with a given device.

        Alarms are filtered according to the query parameters.

        Alarms are sorted by last update timestamp in descending order.


        For more information about possible alarms, see <a href="./alarms">Alarms</a>.


        ### Access rights:

        - `<Subscription>/x`

        - `LPWA_MGR::READ_NODE`

        - If the authenticated user has domain restrictions, the device must
          match the domain restrictions.
      parameters:
        - $ref: "#/components/parameters/PageIndex"
        - $ref: "#/components/parameters/Language-tag"
        - $ref: "#/components/parameters/TimestampFrom"
        - $ref: "#/components/parameters/TimestampTo"
        - $ref: "#/components/parameters/AlarmID"
        - $ref: "#/components/parameters/AlarmState"
        - $ref: "#/components/parameters/AlarmAcked"
      responses:
        "200":
          $ref: "#/components/responses/AlarmsActive"
        default:
          $ref: "#/components/responses/Error"
    parameters:
      - $ref: "#/components/parameters/Device"
  "/subscriptions/mine/devices/{deviceUid}/alarms/ack":
    post:
      tags:
        - devices
      summary: Ack Alarms of a Device
      description: |
        Acknowledge a list of alarms associated with a given device.
        Alarms to acknowledge are filtered according to the query parameters.

        ### Access rights:
        - `<Subscription>/a`
        - `LPWA_MGR::WRITE_NODE`
        - If the authenticated user has domain restrictions, the device must
          match the domain restrictions.
      x-rateLimit:
        category: MEDIUM_IMPACT
      parameters:
        - $ref: "#/components/parameters/Language-tag"
        - $ref: "#/components/parameters/TimestampFrom"
        - $ref: "#/components/parameters/TimestampTo"
        - $ref: "#/components/parameters/AlarmID"
        - $ref: "#/components/parameters/AlarmState"
        - name: algo
          in: query
          description: >
            Algorithm used to generate the KPI:

            - mapReduce: MongoDB map/reduce is used

            - aggregation: MongoDB aggregation is used


            Default value: When this query parameter is not specified the **aggregation** algorithm is used by default.


            This parameter must no longer be used: it is ignored, aggregation algorithm is always used.
          schema:
            type: string
          deprecated: true
      responses:
        "201":
          description: Operation success
        default:
          $ref: "#/components/responses/Error"
    parameters:
      - $ref: "#/components/parameters/Device"
  "/subscriptions/mine/devices/{deviceUid}/alarms/histories":
    get:
      tags:
        - devices
      summary: Retrieve Alarms History of a Device
      description: >
        Retrieve the alarms history (cleared alarms) associated with a given
        device.

        Alarms are filtered according to the query parameters.

        Alarms are sorted by clearance timestamp in descending order.


        For more information about possible alarms, see <a href="./alarms">Alarms</a>.


        ### Access rights:

        - `<Subscription>/x`

        - `LPWA_MGR::READ_NODE`

        - If the authenticated user has domain restrictions, the device must
          match the domain restrictions.
      parameters:
        - $ref: "#/components/parameters/PageIndex"
        - $ref: "#/components/parameters/Language-tag"
        - $ref: "#/components/parameters/TimestampFrom"
        - $ref: "#/components/parameters/TimestampTo"
        - $ref: "#/components/parameters/AlarmID"
        - $ref: "#/components/parameters/AlarmIndex"
        - $ref: "#/components/parameters/AlarmHistoryState"
        - $ref: "#/components/parameters/AlarmAcked"
      responses:
        "200":
          $ref: "#/components/responses/Alarms"
        default:
          $ref: "#/components/responses/Error"
    parameters:
      - $ref: "#/components/parameters/Device"
  "/subscriptions/mine/devices/{deviceUid}/alarms/{alarmUid}/ack":
    post:
      tags:
        - devices
      summary: Ack a Device Alarm
      description: |
        Acknowledge a device alarm identified by its Uid.

        ### Access rights:
        - `<Subscription>/a`
        - `LPWA_MGR::WRITE_NODE`
        - If the authenticated user has domain restrictions, the device must
          match the domain restrictions.
      responses:
        "201":
          description: Operation success
        default:
          $ref: "#/components/responses/Error"
    parameters:
      - $ref: "#/components/parameters/Alarm"
      - $ref: "#/components/parameters/Device"
  "/subscriptions/mine/devices/{deviceUid}/batLevels":
    get:
      tags:
        - devices
      summary: Retrieve BatLevels
      description: |
        Retrieve the battery level history of the Device.

        ### Access rights:
        - `<Subscription>/x`
        - `LPWA_MGR::READ_NODE`
        - If the authenticated user has domain restrictions, the device must
          match the domain restrictions.
      x-rateLimit:
        category: MEDIUM_IMPACT
      parameters:
        - name: begin
          in: query
          description: >
            Date/time of the first battery level to retrieve.


            Syntax: ISO 8601 date/time including time offset. If no time offset is provided the server's offset is used by default.


            When this query parameter is not specified the last battery level are retrieved by default.
          schema:
            type: string
            format: date-time
        - name: duration
          in: query
          description: >
            Window duration to retrieve.


            When this query parameter is not specified, the **P3M** duration is used by default.
          schema:
            type: string
      responses:
        "200":
          $ref: "#/components/responses/BatLevels"
        default:
          $ref: "#/components/responses/Error"
    parameters:
      - $ref: "#/components/parameters/Device"
  "/subscriptions/mine/devices/{deviceUid}/frames":
    get:
      deprecated: true
      tags:
        - devices
      summary: Retrieve FramesDevice
      description: >
        This endpoint must no longer be used: the endpoint `GET
        /subscriptions/{subscriptionUid}/devices/{deviceUid}/frames/aggregated`
        must be used in replacement.


        ---


        Retrieve frame histories of the Device.


        ### Access rights:

        - `<Subscription>/x`

        - `LPWA_MGR::READ_NODE`

        - If the authenticated user has domain restrictions, the device must
          match the domain restrictions.
      x-rateLimit:
        category: MEDIUM_IMPACT
      parameters:
        - name: begin
          in: query
          description: >
            Date/time of the first frame to retrieve.


            Syntax: ISO 8601 date/time including time offset. If no time offset is provided the server's offset is used by default.


            When this query parameter is not specified the last frames are retrieved by default.
          schema:
            type: string
            format: date-time
        - name: duration
          in: query
          description: >
            Window duration to retrieve.


            When this query parameter is not specified, the **P7D** duration is used by default.
          schema:
            type: string
        - name: overflow
          in: query
          description: When this query parameter is specified, ONLY frames with an
            overflow indicator are returned.
          schema:
            type: boolean
          allowEmptyValue: true
        - name: lrrID
          in: query
          description: >
            Retrieve only frames received or sent by the base station identified
            by this lrrID.


            When this query parameter is not specified, frames are retrieved without consideration for LRRs.
          schema:
            type: string
        - name: type
          in: query
          description: >
            Type of the frames to consider: 


            - 0: Uplink

            - 1: downlink 

            - 4: Microflow event frame indicator.


            Multiple type query parameters can be encoded in the URI: all specified frames are considered.


            By default all frames are considered.
          schema:
            type: array
            items:
              type: integer
              enum:
                - 0
                - 1
                - 4
      responses:
        "200":
          $ref: "#/components/responses/FramesDevice"
        default:
          $ref: "#/components/responses/Error"
    parameters:
      - $ref: "#/components/parameters/Device"
  "/subscriptions/mine/devices/{deviceUid}/frames/aggregated":
    get:
      tags:
        - devices
      summary: Retrieve FramesDeviceAggregation
      description: |
        Retrieve the uplink and downlink frames history:

        Number of uplink and downlink frame per aggregated time slot,

        Cumulated payload size (expressed in bytes) for uplink and downlink
        frame per aggregated time slot.

        ### Access rights:
        - `<Subscription>/x`
        - `LPWA_MGR::READ_NODE`
        - If the authenticated user has domain restrictions, the device must
          match the domain restrictions.
      parameters:
        - $ref: "#/components/parameters/AggregationBegin"
        - name: duration
          in: query
          description: >
            Window duration to retrieve.


            Default value: When this query parameter is not specified, the **P7D** duration is used by default.


            Supported duration value: **PxD** (x days) and **PTxH** (x hours)
          schema:
            type: string
        - $ref: "#/components/parameters/AggregationStep"
        - name: type
          in: query
          description: >
            Type of the frames to consider: 


            - 0: Uplink

            - 1: downlink 

            - 4: Microflow event frame indicator.


            Multiple type query parameters can be encoded in the URI: all specified frames are considered.


            By default all frames are considered.
          schema:
            type: array
            items:
              type: integer
              enum:
                - 0
                - 1
                - 4
        - $ref: "#/components/parameters/Timezone"
        - name: lrrID
          in: query
          description: >
            Aggregate only frames received or sent by the base station
            identified by this lrrID.


            When this query parameter is not specified, frames are aggregated without consideration for LRRs.
          schema:
            type: string
      responses:
        "200":
          $ref: "#/components/responses/FramesDeviceAggregation"
        default:
          $ref: "#/components/responses/Error"
    parameters:
      - $ref: "#/components/parameters/Device"
  "/subscriptions/mine/devices/{deviceUid}/locations":
    get:
      tags:
        - devices
      summary: Retrieve Locations
      description: |
        Retrieve the geolocation history of the Device.

        ### Access rights:
        - `<Subscription>/x`
        - `LPWA_MGR::READ_NODE`
        - If the authenticated user has domain restrictions, the device must
          match the domain restrictions.
      x-rateLimit:
        category: MEDIUM_IMPACT
      parameters:
        - $ref: "#/components/parameters/PageIndex"
        - $ref: "#/components/parameters/PageSize"
        - name: begin
          in: query
          description: >
            Date/time of the first location to retrieve.


            Syntax: ISO 8601 date/time including time offset. If no time offset is provided the server's offset is used by default.


            When this query parameter is not specified the last locations are retrieved by default.
          schema:
            type: string
            format: date-time
        - name: duration
          in: query
          description: >
            Window duration to retrieve.


            When this query parameter is not specified, the **P7D** duration is used by default.
          schema:
            type: string
      responses:
        "200":
          $ref: "#/components/responses/Locations"
        default:
          $ref: "#/components/responses/Error"
    parameters:
      - $ref: "#/components/parameters/Device"
  "/subscriptions/mine/devices/{deviceUid}/relay":
    get:
      tags:
        - devices
      summary: Retrieve the relay configuration of a device
      description: |
        Retrieve the relay configuration of a device.

        ### Access rights:
        - `<Subscription>/x`
        - If the authenticated user has domain restrictions, the device must
          match the domain restrictions.
      responses:
        "200":
          $ref: "#/components/responses/Relay"
        default:
          $ref: "#/components/responses/Error"
    put:
      tags:
        - devices
      summary: Update the relay configuration of a device
      description: |
        Update the relay configuration of a device.

        ### Access rights:
        - `<Subscription>/a`
        - If the authenticated user has domain restrictions, the device must
          match the domain restrictions before and after the update.
      requestBody:
        $ref: "#/components/requestBodies/Relay"
      responses:
        "200":
          $ref: "#/components/responses/Relay"
        default:
          $ref: "#/components/responses/Error"
    parameters:
      - $ref: "#/components/parameters/Device"
  "/subscriptions/mine/devices/{deviceUid}/relay/servedDevices":
    get:
      tags:
        - devices
      summary: Retrieve the list of devices served by a relay
      description: |
        Retrieve the list of devices served by a relay.

        ### Access rights:
        - `<Subscription>/x`
        - If the authenticated user has domain restrictions, the device must
          match the domain restrictions.
      parameters:
        - name: devicesWithLocationOnly
          in: query
          description: Only return devices for which the location is available.
          schema:
            type: boolean
            default: false
          allowEmptyValue: true
      responses:
        "200":
          $ref: "#/components/responses/RelayServedDevices"
        default:
          $ref: "#/components/responses/Error"
    parameters:
      - $ref: "#/components/parameters/Device"
  "/subscriptions/mine/devices/{deviceUid}/spreadingFactors/sfDistributions":
    get:
      tags:
        - devices
      summary: Retrieve SF Distribution
      description: |
        Analyze the spreading factor (SF) distribution for uplink and downlink
        packets over a reference period for a range of logical channels:
        - Uplink frames SF distribution,
        - Downlink frames SF distribution.

        ### Access rights:
        - `<Subscription>/x`
        - `LPWA_MGR::READ_NODE`
        - If the authenticated user has domain restrictions, the device must
          match the domain restrictions.
      x-rateLimit:
        category: MEDIUM_IMPACT
      parameters:
        - name: lcs
          in: query
          description: |
            Logical channels considered for SF distribution:
            - A logical channel (e.g. 255)
            - A list of logical channels (e.g. 1,2,3)
            - A range of logical channels (e.g. 0-254)

            Default value: When this query parameter is not specified all
            logical channels are considered.
          schema:
            type: string
        - name: begin
          in: query
          description: >
            Date/time of the first frame to analyze.


            Syntax: ISO 8601 date/time including time offset. If no time offset is provided the server's offset is used by default.


            Default value: When this query parameter is not specified the last frames are considered by default.
          schema:
            type: string
            format: date-time
        - name: duration
          in: query
          description: >
            Size of the window to analyze.


            Default value: When this query parameter is not specified, the

            **PT10M** duration is used by default.


            Supported duration: **PxD** (x days), **PTxH** (between 1…24 hours) and **PTxM**

            (between 10…60 minutes)
          schema:
            type: string
            format: duration
            example: PT1H
            default: PT10M
      responses:
        "200":
          $ref: "#/components/responses/SfDistributions"
        default:
          $ref: "#/components/responses/Error"
    parameters:
      - $ref: "#/components/parameters/Device"
  "/subscriptions/mine/devices/{deviceUid}/tags":
    get:
      tags:
        - devices
      summary: Retrieve Tags
      description: |
        Retrieve the list of Tags associated with a Device.

        Results are ordered by "name" (lexicographic order).

        ### Access rights:
        - `<Subscription>/x`
        - If the authenticated user has domain restrictions, the device must
          match the domain restrictions.
      responses:
        "200":
          $ref: "#/components/responses/DeviceTags"
        default:
          $ref: "#/components/responses/Error"
    post:
      tags:
        - devices
      summary: Add Tag
      description: |
        Add a Tag to a Device.

        ### Access rights:
        - `<Subscription>/a`
        - If the authenticated user has domain restrictions, the device must
          match the domain restrictions.
      requestBody:
        $ref: "#/components/requestBodies/DeviceTag"
      responses:
        "201":
          $ref: "#/components/responses/DeviceTag"
        default:
          $ref: "#/components/responses/Error"
    parameters:
      - $ref: "#/components/parameters/Device"
  "/subscriptions/mine/devices/{deviceUid}/tags/{tagUid}":
    delete:
      tags:
        - devices
      summary: Remove Tag
      description: |
        Remove a Tag from a Device.

        ### Access rights:
        - `<Subscription>/a`
        - If the authenticated user has domain restrictions, the device must
          match the domain restrictions.
      responses:
        "204":
          $ref: "#/components/responses/Delete"
        default:
          $ref: "#/components/responses/Error"
    parameters:
      - $ref: "#/components/parameters/Tag"
      - $ref: "#/components/parameters/Device"
  /subscriptions/mine/drivers:
    get:
      tags:
        - subscriptions
      summary: Retrieve Drivers
      description: |
        Retrieve the list of Drivers associated to a given Subscription.

        ### Access rights:
        - `<Subscription>/x`
      parameters:
        - name: page
          in: query
          description: page
          schema:
            type: integer
            format: int32
        - name: perPage
          in: query
          description: perPage
          schema:
            type: integer
            format: int32
        - name: q
          in: query
          description: The text to search in drivers
          schema:
            type: string
        - name: source
          in: query
          description: The source of the driver
          schema:
            type: string
            enum:
              - custom
              - system
      responses:
        "200":
          $ref: "#/components/responses/Drivers"
        default:
          $ref: "#/components/responses/Error"
    parameters: []
  /subscriptions/mine/hsmGroups:
    get:
      tags:
        - subscriptions
      summary: Retrieve HsmGroups
      description: >
        Retrieve the list of HSM groups associated to a given Subscription
        through Network Subscriptions.


        ### Access rights:

        - `<Subscription>/x`

        - `LPWA_MGR::READ_NETWORK_SUBSCRIPTION`
      parameters:
        - $ref: "#/components/parameters/PageIndex"
      responses:
        "200":
          $ref: "#/components/responses/HsmGroups"
        default:
          $ref: "#/components/responses/Error"
    parameters: []
  /subscriptions/mine/ismBands:
    get:
      tags:
        - subscriptions
      summary: Retrieve IsmBands
      description: |
        Retrieve the list of ISM bands accessible to the Subscription.

        ### Access rights:
        - `<Subscription>/x`
      parameters:
        - $ref: "#/components/parameters/PageIndex"
      responses:
        "200":
          $ref: "#/components/responses/IsmBands"
        default:
          $ref: "#/components/responses/Error"
    parameters: []
  /subscriptions/mine/multicastDownlinkSettings:
    get:
      tags:
        - multicast-groups
      summary: Retrieve Multicast Downlink Settings
      description: >
        Retrieve the multicast downlink settings supported by the input Base
        Station tag


        ### Access rights:

        - `<Subscription>/x`
      parameters:
        - name: bsTag
          in: query
          description: Base Station Tag name (exact match)
          required: true
          schema:
            $ref: "#/components/schemas/TagName"
        - name: bsTagNamespace
          in: query
          description: |
            Base Station Tag namespace:
            - OPERATOR: public tag managed by the Operator
            - SUBSCRIBER: private tag managed by the Subscriber
          schema:
            type: string
            enum:
              - OPERATOR
              - SUBSCRIBER
            default: OPERATOR
      responses:
        "200":
          $ref: "#/components/responses/MulticastDownlinkSettings"
        default:
          $ref: "#/components/responses/Error"
    parameters: []
  /subscriptions/mine/multicastGroups:
    get:
      tags:
        - multicast-groups
      summary: Retrieve Multicast Groups
      description: |
        Retrieve the list of Multicast Groups attached to a Subscription.

        ### Access rights:
        - `<Subscription>/x`
        - `LPWA_MGR::READ_NODE`
        - If the authenticated user has domain restrictions, only multicast
          groups matching the domain restrictions can be retrieved.
      parameters:
        - $ref: "#/components/parameters/PageIndex"
        - $ref: "#/components/parameters/Language-tag"
        - name: devEUI
          in: query
          description: DevEUI filtering (prefix match)
          schema:
            type: string
        - name: devAddr
          in: query
          description: DevAddr filtering (prefix match)
          schema:
            type: string
        - name: name
          in: query
          description: Multicast Group name filtering (prefix match)
          schema:
            type: string
        - name: connectivityPlan
          in: query
          description: |
            When the string contains a network subscription ID: Only Multicast
            Groups associated with the network subscription are returned.

            When the string contains the _NOCP keyword: Only Multicast Groups
            not associated with a network subscription are returned.

            When the string contains the _CP keyword: Only Multicast Groups
            attached with a network subscription are returned (without
            consideration for the network subscription).

            This parameter must no longer be used: the parameter
            `networkSubscriptionID` must be used in replacement.
          schema:
            type: string
          deprecated: true
        - name: networkSubscriptionID
          in: query
          description: |
            When the string contains a network subscription ID: Only Multicast
            Groups associated with the network subscription are returned.

            When the string contains the `_unset` keyword: Only Multicast Groups
            not associated with a network subscription are returned.

            When the string contains the `_any` keyword: Only Multicast Groups
            attached with a network subscription are returned (without
            consideration for the network subscription).
          schema:
            type: string
        - name: alarmLevel
          in: query
          description: >
            Only returns Multicast Groups for which one or several NOT-ACKED
            alarms exist:

            - 6: returns Multicast Groups with at least a CRITICAL nack alarm (state = 6)

            - 5: returns Multicast Groups with at least a CRITICAL or a MAJOR nack alarm (state >=5)

            - 4: returns Multicast Groups with at least a CRITICAL, MAJOR or MINOR nack alarm (state >=4)

            - 3: returns Multicast Groups with at least a CRITICAL, MAJOR, MINOR or WARNING nack alarm (state >=3)

            - 2: return Multicast Groups with at least an UNCLEARED nack alarm (state >=2)

            - 1: return Multicast Groups with at least an UNCLEARED or CLEARED nack alarm (state >=1)


            Note: When this query parameter is not specified, Multicast Groups are returned without consideration for alarms.
          schema:
            type: integer
            format: int32
        - name: appServerID
          in: query
          description: |
            Only returns Multicast Groups associated with the Application Server
            through direct association or through AS Routing Profile.

            Multiple values can be set: in this case Multicast Groups must be
            associated with all provided Application Servers.
          style: form
          explode: true
          schema:
            type: array
            items:
              type: string
        - name: bsTag
          in: query
          description: Base Station Tag name filtering (exact match)
          schema:
            type: array
            items:
              $ref: "#/components/schemas/TagName"
        - $ref: "#/components/parameters/Domain"
        - name: query
          in: query
          description: >
            Search multicast groups with a devEUI or a name containing the
            provided term.

            (prefix match)
          schema:
            type: string
        - name: sort
          in: query
          description: |
            Defines how results are sorted (&lt;attribute&gt;,&lt;order&gt;).

            Following attributes are supported:
            - 'name': by name
            - 'lastDwTimestamp': by timestamp of the last uplink frame
            - 'creationDate': by date of creation of the multicast group

            Following orders are supported:
            - 'asc': ascending order
            - 'desc': descending order

            By default, results are sorted by creation date ascending order.
          schema:
            type: string
            example: name,asc
      responses:
        "200":
          $ref: "#/components/responses/MulticastGroups"
        default:
          $ref: "#/components/responses/Error"
    post:
      tags:
        - multicast-groups
      summary: Create Multicast Group
      description: |
        Create a Multicast Group.

        ### Access rights:
        - `<Subscription>/a`
        - If the authenticated user has domain restrictions, the multicast group
          must match the domain restrictions.
      parameters:
        - $ref: "#/components/parameters/Async"
        - $ref: "#/components/parameters/NetworkSubscriptionsHandlingMode"
      requestBody:
        $ref: "#/components/requestBodies/MulticastGroup"
      responses:
        "201":
          $ref: "#/components/responses/MulticastGroup"
        "202":
          $ref: "#/components/responses/Async"
        default:
          $ref: "#/components/responses/Error"
    parameters: []
  /subscriptions/mine/multicastGroups/alarms:
    get:
      tags:
        - multicast-groups
      summary: Retrieve alarms of all multicast groups
      description: >
        Retrieve a list of alarms associated with all multicast groups.

        Alarms are filtered and sorted according to the query parameters.


        For more information about possible alarms, see <a href="./alarms">Alarms</a>.


        ### Access rights:

        - `<Subscription>/x`

        - `LPWA_MGR::READ_NODE`

        - If the authenticated user has domain restrictions, only alarms of
          multicast groups matching the domain restrictions can be retrieved.
      parameters:
        - $ref: "#/components/parameters/PageIndex"
        - $ref: "#/components/parameters/PageSize"
        - $ref: "#/components/parameters/Language-tag"
        - $ref: "#/components/parameters/TimestampFrom"
        - $ref: "#/components/parameters/TimestampTo"
        - $ref: "#/components/parameters/AlarmID"
        - $ref: "#/components/parameters/AlarmUid"
        - name: devEUI
          in: query
          description: DevEUI filtering (prefix match)
          schema:
            type: array
            items:
              type: string
        - name: state
          in: query
          description: |
            State of the alarm:

            - 6: CRITICAL
            - 5: MAJOR
            - 4: MINOR
            - 3: WARNING
            - 2: INDETERMINATE
            - 1: CLEARED

            The state filtering strategy is defined by the query parameter
            stateFiltering

            Note: When this query parameter is not specified, alarms  are
            returned without consideration for the state (i.e. alarms can be
            UNCLEARED or CLEARED)
          schema:
            type: integer
            format: int32
            minimum: 1
            maximum: 6
        - name: stateFiltering
          in: query
          description: |
            Alarm state filtering strategy:

            - 'EQUAL_OR_UPPER': Only returns alarms for which the state is equal
            to or upper than the provided level in query parameter state
            - 'EQUAL': Only returns alarms for which the state is equal to the
            provided level in query parameter state

            By default, 'EQUAL_OR_UPPER' mode is used.
          schema:
            type: string
            enum:
              - EQUAL_OR_UPPER
              - EQUAL
            default: EQUAL_OR_UPPER
        - $ref: "#/components/parameters/AlarmAcked"
        - $ref: "#/components/parameters/Domain"
        - name: sort
          in: query
          description: |
            Defines how results are sorted (&lt;attribute&gt;,&lt;order&gt;).

            The following attributes are supported:

            - 'state': results are sorted by state then by update timestamp
            (decreasing order)
            - 'acked': results are sorted by acked status then by update
            timestamp (decreasing order)

            The following orders are supported:

            - 'asc': ascending order
            - 'desc': descending order

            By default, results are sorted by update timestamp (decreasing
            order)
          schema:
            type: string
            example: state,desc
        - name: limit
          in: query
          description: |
            Limit the number of results. By default, no limit is applied.
          schema:
            type: integer
            format: int32
      responses:
        "200":
          $ref: "#/components/responses/AlarmsMulticastGroupActive"
        default:
          $ref: "#/components/responses/Error"
    parameters: []
  /subscriptions/mine/multicastGroups/alarms/ack:
    post:
      tags:
        - multicast-groups
      summary: Ack alarms of all multicast groups
      description: |
        Acknowledge a list of alarms associated with all multicast groups.
        Alarms to acknowledge are identified by their Uids.

        ### Access rights:
        - `<Subscription>/a`
        - `LPWA_MGR::WRITE_NODE`
        - If the authenticated user has domain restrictions, only alarms of
          multicast groups matching the domain restrictions can be acknowledged.
      requestBody:
        $ref: "#/components/requestBodies/AlarmsAck"
      responses:
        "204":
          description: Operation success
        default:
          $ref: "#/components/responses/Error"
    parameters: []
  /subscriptions/mine/multicastGroups/bss/tags/suggestions:
    get:
      tags:
        - multicast-groups
      summary: Retrieve Base Station Tag Suggestions
      description: >
        Retrieve a list of Base Station tag names visible for multicast network

        and starting with a query string (case insensitive).


        The number of tag names returned in the response is configurable

        (system-wide). By default the 20 first results are returned.


        Results are ordered by "name" (lexicographic order).


        No results are returned if the authenticated user has domain restrictions and

        `showTagSuggestionsWhenDomainRestrictions` is false.


        ### Access rights:

        - `<Subscription>/x`

        - `LPWA_MGR::READ_NODE`
      parameters:
        - $ref: "#/components/parameters/Query"
        - $ref: "#/components/parameters/BsTagExclude"
      responses:
        "200":
          $ref: "#/components/responses/BsTagSuggestions"
        default:
          $ref: "#/components/responses/Error"
    parameters: []
  /subscriptions/mine/multicastGroups/domains:
    post:
      tags:
        - multicast-groups
      summary: Associate Domain with Multicast Groups
      description: |
        Add or remove a list of domains on a list of Multicast Groups.

        When adding a domain, any existing domain belonging to the same group is
        replaced by the new one.

        When removing a domain, no error is returned if the domain is not
        associated with a subset or all targeted Multicast Groups.

        ### Access rights:
        - `<Subscription>/a`
        - If the authenticated user has domain restrictions, multicast groups
          must match the domain restrictions before and after the operation.
      requestBody:
        $ref: "#/components/requestBodies/MulticastGroupsDomain"
      responses:
        "204":
          description: Operation success
        default:
          $ref: "#/components/responses/Error"
    parameters: []
  /subscriptions/mine/multicastGroups/frames:
    get:
      deprecated: true
      tags:
        - multicast-groups
      summary: Retrieve Multicast Groups Frames
      description: >
        This endpoint must no longer be used: the endpoint `GET
        /subscriptions/{subscriptionUid}/multicastGroups/frames/aggregated` must
        be used in replacement.


        ---


        Retrieve downlink frame histories of all Multicast Groups.


        ### Access rights:

        - `<Subscription>/x`

        - `LPWA_MGR::READ_NODE`

        - If the authenticated user has domain restrictions, only frames of
          multicast groups matching the domain restrictions can be retrieved.
      parameters:
        - name: appServerID
          in: query
          description: Application Server ID filtering (exact match)
          schema:
            type: string
        - name: begin
          in: query
          description: >
            Date/time of the first frame to retrieve.


            Syntax: ISO 8601 date/time including time offset. If no time offset is provided the server's offset is used by default.


            When this query parameter is not specified the last frames are retrieved by default.
          schema:
            type: string
            format: date-time
        - name: duration
          in: query
          description: >
            Window duration to retrieve.


            When this query parameter is not specified, the **P7D** duration is used by default.
          schema:
            type: string
        - name: overflow
          in: query
          description: When this query parameter is specified, ONLY frames with an
            overflow indicator are returned.
          schema:
            type: boolean
          allowEmptyValue: true
      responses:
        "200":
          $ref: "#/components/responses/FramesMulticastGroup"
        default:
          $ref: "#/components/responses/Error"
    parameters: []
  /subscriptions/mine/multicastGroups/frames/aggregated:
    get:
      tags:
        - multicast-groups
      summary: Retrieve Aggregated Multicast Groups Frames
      description: |
        Retrieve downlink frame histories of all Multicast Groups.

        The following success rates are provided:
        - Fully sent: success rate = 100%
        - Partially sent (>= 80%): 80% <= success rate < 100%
        - Partially sent (>= 30%): 30% <= success rate < 80%
        - Partially sent (< 30%): success rate < 30%

        For each success rates, the number of downlinks and the cumulated
        payload size (expressed in bytes) are provided per aggregated time
        slot.

        ### Access rights:
        - `<Subscription>/x`
        - `LPWA_MGR::READ_NODE`
        - If the authenticated user has domain restrictions, only frames of
          multicast groups matching the domain restrictions can be retrieved.
      parameters:
        - name: appServerID
          in: query
          description: Application Server ID filtering (exact match)
          schema:
            type: string
        - $ref: "#/components/parameters/AggregationBegin"
        - name: duration
          in: query
          description: >
            Window duration to retrieve.


            Default value: When this query parameter is not specified, the **P7D** duration is used by default.


            Supported duration value: **PxD** (x days) and **PTxH** (x hours)
          schema:
            type: string
        - $ref: "#/components/parameters/AggregationStep"
        - $ref: "#/components/parameters/Timezone"
      responses:
        "200":
          $ref: "#/components/responses/FramesMulticastGroupAggregation"
        default:
          $ref: "#/components/responses/Error"
    parameters: []
  "/subscriptions/mine/multicastGroups/{multicastGroupUid}":
    get:
      tags:
        - multicast-groups
      summary: Retrieve Multicast Group
      description: |
        Retrieve a Multicast Group detail.

        ### Access rights:
        - `<Subscription>/x`
        - `LPWA_MGR::READ_NODE`
        - If the authenticated user has domain restrictions, the multicast group
          must match the domain restrictions.
      parameters:
        - $ref: "#/components/parameters/Language-tag"
      responses:
        "200":
          $ref: "#/components/responses/MulticastGroup"
        default:
          $ref: "#/components/responses/Error"
    put:
      tags:
        - multicast-groups
      summary: Update Multicast Group
      description: |
        Update a Multicast Group.

        ### Access rights:
        - `<Subscription>/a`
        - `LPWA_MGR::WRITE_NODE (partial update)`
        - `LPWA_MGR::WRITE_NODE_ACTIVATION (full update)`
        - If the authenticated user has domain restrictions, the multicast group
          must match the domain restrictions before and after the update.

        ### Optimistic locking:
        - `<multicastGroup>.occ`
      parameters:
        - $ref: "#/components/parameters/Force"
        - $ref: "#/components/parameters/NetworkSubscriptionsHandlingMode"
      requestBody:
        $ref: "#/components/requestBodies/MulticastGroup"
      responses:
        "200":
          $ref: "#/components/responses/MulticastGroup"
        default:
          $ref: "#/components/responses/Error"
    delete:
      tags:
        - multicast-groups
      summary: Delete Multicast Group
      description: |
        Delete a Multicast Group.

        ### Access rights:
        - `<Subscription>/a`
        - If the authenticated user has domain restrictions, the multicast group
          must match the domain restrictions.
      parameters:
        - $ref: "#/components/parameters/Async"
      responses:
        "202":
          $ref: "#/components/responses/Async"
        "204":
          $ref: "#/components/responses/Delete"
        default:
          $ref: "#/components/responses/Error"
    parameters:
      - $ref: "#/components/parameters/MulticastGroup"
  "/subscriptions/mine/multicastGroups/{multicastGroupUid}/admins/downlink":
    post:
      tags:
        - multicast-groups
      summary: Send Downlink
      description: >
        Submit a data payload to be sent in downlink packets to the Multicast
        Group.


        The sending of the data payload in downlink packets is scheduled according

        to the Multicast Group class and radio conditions.


        ### Access rights:

        - `<Subscription>/a`

        - If the authenticated user has domain restrictions, the multicast group
          must match the domain restrictions.
      parameters:
        - name: payload
          in: query
          description: |
            Hexadecimal payload. The hexadecimal payload will be encrypted by
            the LRC if the fCntDn query parameter and the aFCntDn query
            parameter are absent, and if the LRC knows the AppSKey.
            Otherwise the payload must be provided encrypted according to the
            LoRaWAN specification, and the fCntDn query parameter or the aFCntDn
            query parameter must be present. The encryption uses the downlink
            counter, which is why the fCntDn query parameter or the aFCntDn
            query parameter is required in this case.
          required: true
          schema:
            type: string
        - name: fPort
          in: query
          description: |
            LoRaWAN target port [1..225]
          required: true
          schema:
            type: integer
            minimum: 1
            maximum: 225
        - name: fCntDn
          in: query
          description: |
            The LoRaWAN Downlink Counter value is used to encrypt the payload.
            This query parameter is needed only if the payload is provided
            encrypted. If present, fCntDn will be copied in the LoRaWAN header
            field FCnt, and the encrypted payload will be copied as-is to the
            LoRaWAN downlink frame by the LRC.
            **Only applicable to LoRaWAN 1.0**
          schema:
            type: integer
        - name: aFCntDn
          in: query
          description: |
            The LoRaWAN Applicative Downlink Counter value is used to encrypt
            the payload. This query parameter is needed only if the the payload
            is provided encrypted. If present, aFCntDn will be copied in the
            LoRaWAN header field FCnt, and the encrypted payload will be copied
            as-is to the LoRaWAN downlink frame by the LRC.
            **Only applicable to LoRaWAN 1.1**
          schema:
            type: integer
        - name: flushDownlinkQueue
          in: query
          description: |
            TRUE if the per-device LRC downlink queue must be emptied prior to
            add the downlink payload transported by this request.
          schema:
            type: boolean
            default: false
        - name: validityTime
          in: query
          description: |
            Associates the downlink payload with an expiration date (ISO 8601
            timestamp or Duration in seconds) in the pre-device LRC downlink
            queue.

            If the downlink payload has not yet been sent to the device, the
            downlink payload will be discarded by the LRC when the expiration
            date is reached.
          schema:
            type: string
            format: date-time
        - name: retryIneligibleGateways
          in: query
          description: |
            When set to TRUE or not provided, non eligible gateways (GPS out of
            sync for Class B, gateway down for Class B/C...) are retried during
            each retransmission attempt.
            When set to FALSE, non eligible gateways are excluded at the
            beginning of the multicast campaign and not retried during each
            retransmission attempt.
          schema:
            type: boolean
            default: true
      responses:
        "201":
          description: Operation success
        default:
          $ref: "#/components/responses/Error"
    parameters:
      - $ref: "#/components/parameters/MulticastGroup"
  "/subscriptions/mine/multicastGroups/{multicastGroupUid}/alarms":
    get:
      tags:
        - multicast-groups
      summary: Retrieve Alarms of a Multicast Group
      description: >
        Retrieve a list of alarms associated with a given multicast group.

        Alarms are filtered according to the query parameters.

        Alarms are sorted by last update timestamp in descending order.


        For more information about possible alarms, see <a href="./alarms">Alarms</a>.


        ### Access rights:

        - `<Subscription>/x`

        - `LPWA_MGR::READ_NODE`

        - If the authenticated user has domain restrictions, the multicast group
          must match the domain restrictions.
      parameters:
        - $ref: "#/components/parameters/PageIndex"
        - $ref: "#/components/parameters/Language-tag"
        - $ref: "#/components/parameters/TimestampFrom"
        - $ref: "#/components/parameters/TimestampTo"
        - $ref: "#/components/parameters/AlarmID"
        - $ref: "#/components/parameters/AlarmState"
        - $ref: "#/components/parameters/AlarmAcked"
      responses:
        "200":
          $ref: "#/components/responses/AlarmsActive"
        default:
          $ref: "#/components/responses/Error"
    parameters:
      - $ref: "#/components/parameters/MulticastGroup"
  "/subscriptions/mine/multicastGroups/{multicastGroupUid}/alarms/ack":
    post:
      tags:
        - multicast-groups
      summary: Ack Alarms of a Multicast Group
      description: |
        Acknowledge a list of alarms associated with a given multicast group.
        Alarms to acknowledge are filtered according to the query parameters.

        ### Access rights:
        - `<Subscription>/a`
        - `LPWA_MGR::WRITE_NODE`
        - If the authenticated user has domain restrictions, the multicast group
          must match the domain restrictions.
      x-rateLimit:
        category: MEDIUM_IMPACT
      parameters:
        - $ref: "#/components/parameters/Language-tag"
        - $ref: "#/components/parameters/TimestampFrom"
        - $ref: "#/components/parameters/TimestampTo"
        - $ref: "#/components/parameters/AlarmID"
        - $ref: "#/components/parameters/AlarmState"
      responses:
        "201":
          description: Operation success
        default:
          $ref: "#/components/responses/Error"
    parameters:
      - $ref: "#/components/parameters/MulticastGroup"
  "/subscriptions/mine/multicastGroups/{multicastGroupUid}/alarms/histories":
    get:
      tags:
        - multicast-groups
      summary: Retrieve Alarms History of a Multicast Group
      description: >
        Retrieve the alarms history (cleared alarms) associated with a given
        multicast group.

        Alarms are filtered according to the query parameters.

        Alarms are sorted by clearance timestamp in descending order.


        For more information about possible alarms, see <a href="./alarms">Alarms</a>.


        ### Access rights:

        - `<Subscription>/x`

        - `LPWA_MGR::READ_NODE`

        - If the authenticated user has domain restrictions, the multicast group
          must match the domain restrictions.
      parameters:
        - $ref: "#/components/parameters/PageIndex"
        - $ref: "#/components/parameters/Language-tag"
        - $ref: "#/components/parameters/TimestampFrom"
        - $ref: "#/components/parameters/TimestampTo"
        - $ref: "#/components/parameters/AlarmID"
        - $ref: "#/components/parameters/AlarmIndex"
        - $ref: "#/components/parameters/AlarmHistoryState"
        - $ref: "#/components/parameters/AlarmAcked"
      responses:
        "200":
          $ref: "#/components/responses/Alarms"
        default:
          $ref: "#/components/responses/Error"
    parameters:
      - $ref: "#/components/parameters/MulticastGroup"
  "/subscriptions/mine/multicastGroups/{multicastGroupUid}/alarms/{alarmUid}/ack":
    post:
      tags:
        - multicast-groups
      summary: Ack a Multicast Group Alarm
      description: |
        Acknowledge a multicast group alarm identified by its Uid.

        ### Access rights:
        - `<Subscription>/a`
        - `LPWA_MGR::WRITE_NODE`
        - If the authenticated user has domain restrictions, the multicast group
          must match the domain restrictions.
      responses:
        "201":
          description: Operation success
        default:
          $ref: "#/components/responses/Error"
    parameters:
      - $ref: "#/components/parameters/Alarm"
      - $ref: "#/components/parameters/MulticastGroup"
  "/subscriptions/mine/multicastGroups/{multicastGroupUid}/bss":
    get:
      tags:
        - multicast-groups
      summary: Retrieve Multicast Group Base Stations
      description: |
        Retrieve the list of Base Stations associated with a Multicast Group.

        ### Access rights:
        - `<Subscription>/x`
        - `LPWA_MGR::READ_NODE`
        - If the authenticated user has domain restrictions, the multicast group
          must match the domain restrictions.
      parameters:
        - $ref: "#/components/parameters/PageIndex"
      responses:
        "200":
          $ref: "#/components/responses/MulticastGroupBss"
        default:
          $ref: "#/components/responses/Error"
    parameters:
      - $ref: "#/components/parameters/MulticastGroup"
  "/subscriptions/mine/multicastGroups/{multicastGroupUid}/bss/tags":
    get:
      tags:
        - multicast-groups
      summary: Retrieve Multicast Group Base Station Tags
      description: |
        Retrieve the list of Tags associated with a Multicast Group.

        Results are ordered by "name" (lexicographic order).

        ### Access rights:
        - `<Subscription>/x`
        - `LPWA_MGR::READ_NODE`
        - If the authenticated user has domain restrictions, the multicast group
          must match the domain restrictions.
      parameters:
        - $ref: "#/components/parameters/PageIndex"
      responses:
        "200":
          $ref: "#/components/responses/MulticastGroupBssTags"
        default:
          $ref: "#/components/responses/Error"
    post:
      tags:
        - multicast-groups
      summary: Associate Base Station Tag
      description: |
        Associate a Base Station Tag to a Multicast Group.

        ### Access rights:
        - `<Subscription>/a`
        - If the authenticated user has domain restrictions, the multicast group
          must match the domain restrictions.
      requestBody:
        $ref: "#/components/requestBodies/MulticastGroupBssTag"
      responses:
        "200":
          $ref: "#/components/responses/MulticastGroupBssTag"
        default:
          $ref: "#/components/responses/Error"
    parameters:
      - $ref: "#/components/parameters/MulticastGroup"
  "/subscriptions/mine/multicastGroups/{multicastGroupUid}/bss/tags/{tagUid}":
    delete:
      tags:
        - multicast-groups
      summary: Remove Base Station Tag
      description: |
        Remove a Base Station Tag from a Multicast Group.

        ### Access rights:
        - `<Subscription>/a`
        - If the authenticated user has domain restrictions, the multicast group
          must match the domain restrictions.

        ### Optimistic locking:
        - `<multicastGroup>.occ`
      responses:
        "204":
          $ref: "#/components/responses/Delete"
        default:
          $ref: "#/components/responses/Error"
    parameters:
      - $ref: "#/components/parameters/Tag"
      - $ref: "#/components/parameters/MulticastGroup"
  "/subscriptions/mine/multicastGroups/{multicastGroupUid}/frames":
    get:
      deprecated: true
      tags:
        - multicast-groups
      summary: Retrieve Multicast Group Frames
      description: |
        This endpoint must no longer be used: the endpoint `GET /subscriptions/{subscriptionUid}/multicastGroups/{multicastGroupUid}/frames/aggregated` must be used in replacement.

        ---

        Retrieve downlink frame histories of the Multicast Group.

        ### Access rights:
        - `<Subscription>/x`
        - `LPWA_MGR::READ_NODE`
        - If the authenticated user has domain restrictions, the multicast group
          must match the domain restrictions.
      x-rateLimit:
        category: MEDIUM_IMPACT
      parameters:
        - name: begin
          in: query
          description: >
            Date/time of the first frame to retrieve.


            Syntax: ISO 8601 date/time including time offset. If no time offset is provided the server's offset is used by default.


            When this query parameter is not specified the last frames are retrieved by default.
          schema:
            type: string
            format: date-time
        - name: duration
          in: query
          description: >
            Window duration to retrieve.


            When this query parameter is not specified, the **P7D** duration is used by default.
          schema:
            type: string
        - name: overflow
          in: query
          description: When this query parameter is specified, ONLY frames with an
            overflow indicator are returned.
          schema:
            type: boolean
          allowEmptyValue: true
      responses:
        "200":
          $ref: "#/components/responses/FramesMulticastGroup"
        default:
          $ref: "#/components/responses/Error"
    parameters:
      - $ref: "#/components/parameters/MulticastGroup"
  "/subscriptions/mine/multicastGroups/{multicastGroupUid}/frames/aggregated":
    get:
      tags:
        - multicast-groups
      summary: Retrieve Aggregated Multicast Group Frames
      description: |
        Retrieve downlink frame histories of the Multicast Group.

        The following success rates are provided:
        - Fully sent: success rate = 100%
        - Partially sent (>= 80%): 80% <= success rate < 100%
        - Partially sent (>= 30%): 30% <= success rate < 80%
        - Partially sent (< 30%): success rate < 30%

        For each success rates, the number of downlinks and the cumulated
        payload size (expressed in bytes) are provided per aggregated time
        slot.

        ### Access rights:
        - `<Subscription>/x`
        - `LPWA_MGR::READ_NODE`
        - If the authenticated user has domain restrictions, the multicast group
          must match the domain restrictions.
      parameters:
        - $ref: "#/components/parameters/AggregationBegin"
        - name: duration
          in: query
          description: >
            Window duration to retrieve.


            Default value: When this query parameter is not specified, the **P7D** duration is used by default.


            Supported duration value: **PxD** (x days) and **PTxH** (x hours)
          schema:
            type: string
        - $ref: "#/components/parameters/AggregationStep"
        - $ref: "#/components/parameters/Timezone"
      responses:
        "200":
          $ref: "#/components/responses/FramesMulticastGroupAggregation"
        default:
          $ref: "#/components/responses/Error"
    parameters:
      - $ref: "#/components/parameters/MulticastGroup"
  /subscriptions/mine/networkSubscriptions:
    get:
      tags:
        - network-subscriptions
      summary: Retrieve NetworkSubscriptions
      description: >
        Retrieve the list of Network Subscriptions associated to a given
        Subscription.


        ### Access rights:

        - `<Subscription>/x`

        - `LPWA_MGR::READ_NETWORK_SUBSCRIPTION`
      parameters:
        - $ref: "#/components/parameters/PageIndex"
        - $ref: "#/components/parameters/Language-tag"
        - name: connectivitySupplier
          in: query
          description: Connectivity supplier ID. When specified, only network
            subscriptions associated with this connectivity supplier are
            returned.
          schema:
            type: string
        - name: connectivityPlan
          in: query
          description: |
            Return the network subscription matching this ID (exact match).

            This parameter must no longer be used: the parameter
            `networkSubscriptionID` must be used in replacement.
          schema:
            type: string
          deprecated: true
        - name: networkSubscriptionID
          in: query
          description: |
            Return the network subscription matching this ID (exact match).
          schema:
            type: string
        - name: connectivity
          in: query
          description: |
            Returns Network Subscriptions matching connectivity (exact match).

            `CELLULAR` is only applicable if the
            cellular connectivity is enabled.
          schema:
            enum:
              - LORAWAN
              - CELLULAR
            type: string
        - name: communicationType
          in: query
          description: Returns Network Subscriptions matching communication type (exact
            match).
          schema:
            type: string
            enum:
              - UNICAST
              - MULTICAST
      responses:
        "200":
          $ref: "#/components/responses/NetworkSubscriptions"
        default:
          $ref: "#/components/responses/Error"
    parameters: []
  /subscriptions/mine/networkSubscriptions/transactions:
    get:
      tags:
        - network-subscriptions
      summary: Retrieve NwSubsTransactions
      description: >
        Retrieve the list of Network Subscription transactions associated to a
        given Subscription.


        ### Access rights:

        - `<Subscription>/x`
      parameters:
        - name: connectivityPlan
          in: query
          description: |
            Network subscription ID filtering. Only transaction associated to
            this network subscription ID are returned.

            This parameter must no longer be used: the parameter
            `networkSubscriptionID` must be used in replacement.
          schema:
            type: string
          deprecated: true
        - name: networkSubscriptionID
          in: query
          description: |
            Network subscription ID filtering. Only transaction associated to
            this network subscription ID are returned.
          schema:
            type: string
        - $ref: "#/components/parameters/PageIndex"
        - $ref: "#/components/parameters/Language-tag"
        - name: connectivitySupplier
          in: query
          description: Connectivity supplier ID. When specified, only network subscription
            transactions associated with this connectivity supplier are
            returned.
          schema:
            type: string
        - name: vendor
          in: query
          description: Vendor ID. When specified, only network subscription transactions
            associated with this vendor are returned.
          schema:
            type: string
      responses:
        "200":
          $ref: "#/components/responses/NwSubsTransactions"
        default:
          $ref: "#/components/responses/Error"
    parameters: []
  "/subscriptions/mine/networkSubscriptions/{networkSubscriptionUid}":
    get:
      tags:
        - network-subscriptions
      summary: Retrieve NetworkSubscription
      description: |
        Retrieve a Network Subscription detail.


        ### Access rights:
        - `<Subscription>/x`
        - `LPWA_MGR::READ_NETWORK_SUBSCRIPTION`
      parameters:
        - $ref: "#/components/parameters/Language-tag"
      responses:
        "200":
          $ref: "#/components/responses/NetworkSubscription"
        default:
          $ref: "#/components/responses/Error"
    parameters:
      - $ref: "#/components/parameters/NetworkSubscription"
  /subscriptions/mine/publicExchangeKey:
    get:
      tags:
        - subscriptions
      summary: Retrieve Public Exchange Keys
      description: |
        Retrieve a RSA Public Exchange Key in X.509 SubjectPublicKeyInfo/OpenSSL
        PEM format for secure keys provisioning.


        ### Access rights:
        - `<Subscription>/x`
      parameters:
        - name: hsmGroupID
          in: query
          description: HSM Group ID filtering (exact match)
          schema:
            type: string
      responses:
        "200":
          description: Successful RETRIEVE
          content:
            application/x-pem-file:
              schema:
                type: string
                example: |
                  -----BEGIN PUBLIC KEY-----
                  MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA61BjmfXGEvWmegnBGSuS
                  +rU9soUg2FnODva32D1AqhwdziwHINFaD1MVlcrYG6XRKfkcxnaXGfFDWHLEvNBS
                  EVCgJjtHAGZIm5GL/KA86KDp/CwDFMSwluowcXwDwoyinmeOY9eKyh6aY72xJh7n
                  oLBBq1N0bWi1e2i+83txOCg4yV2oVXhBo8pYEJ8LT3el6Smxol3C1oFMVdwPgc0v
                  Tl25XucMcG/ALE/KNY6pqC2AQ6R2ERlVgPiUWOPatVkt7+Bs3h5Ramxh7XjBOXeu
                  lmCpGSynXNcpZ/06+vofGi/2MlpQZNhHAo8eayMp6FcvNucIpUndo1X8dKMv3Y26
                  ZQIDAQAB
                  -----END PUBLIC KEY-----
            application/jwk+json:
              schema:
                $ref: "#/components/schemas/PublicRsaJsonWebKey"
        default:
          $ref: "#/components/responses/Error"
    parameters: []
  /subscriptions/mine/usersAlarmsSubscriptions:
    get:
      tags:
        - users
      summary: Retrieve Users Alarms Subscriptions
      description: >
        Retrieve the alarms subscriptions of all users.


        ### Access rights:

        - `<Subscription>/RA`

        - `<Subscription>/s1`: `MANAGE_SUBSCRIBER`

        - Access is granted to user on its own registration (hardcoded without ACL Permission)
      parameters:
        - $ref: "#/components/parameters/PageIndex"
        - $ref: "#/components/parameters/PageSize"
        - name: thingparkID
          in: query
          description: Returns alarms subscription matching the ThingPark ID (exact match).
          schema:
            type: string
      responses:
        "200":
          $ref: "#/components/responses/UsersAlarmsSubscriptions"
        default:
          $ref: "#/components/responses/Error"
    parameters: []
  "/subscriptions/mine/users/{thingparkID}/alarmsSubscription":
    get:
      tags:
        - users
      summary: Retrieve User Alarms Subscription
      description: >
        Retrieve the alarms subscription of a user.


        ### Access rights:

        - `<Subscription>/RA`

        - `<Subscription>/s1`: `MANAGE_SUBSCRIBER`

        - Access is granted to user on its own registration (hardcoded without ACL Permission)
      responses:
        "200":
          $ref: "#/components/responses/AlarmsSubscription"
        default:
          $ref: "#/components/responses/Error"
    post:
      tags:
        - users
      summary: Create User Alarms Subscription
      description: >
        Create the alarms subscription of a user.


        ### Access rights:

        - `<Subscription>/RA`

        - `<Subscription>/s1`: `MANAGE_SUBSCRIBER`

        - Access is granted to user on its own registration (hardcoded without ACL Permission)
      requestBody:
        $ref: "#/components/requestBodies/AlarmsSubscription"
      responses:
        "201":
          $ref: "#/components/responses/AlarmsSubscription"
        default:
          $ref: "#/components/responses/Error"
    put:
      tags:
        - users
      summary: Update User Alarms Subscription
      description: >
        Update the alarms subscription of a user.


        ### Access rights:

        - `<Subscription>/RA`

        - `<Subscription>/s1`: `MANAGE_SUBSCRIBER`

        - Access is granted to user on its own registration (hardcoded without ACL Permission)
      requestBody:
        $ref: "#/components/requestBodies/AlarmsSubscription"
      responses:
        "200":
          $ref: "#/components/responses/AlarmsSubscription"
        default:
          $ref: "#/components/responses/Error"
    delete:
      tags:
        - users
      summary: Delete User Alarms Subscription
      description: >
        Delete the alarms subscription of a user.


        ### Access rights:

        - `<Subscription>/RA`

        - `<Subscription>/s1`: `MANAGE_SUBSCRIBER`

        - Access is granted to user on its own registration (hardcoded without ACL Permission)
      responses:
        "204":
          $ref: "#/components/responses/Delete"
        default:
          $ref: "#/components/responses/Error"
    parameters:
      - $ref: "#/components/parameters/User"
components:
  schemas:
    Alarms:
      type: object
      required:
        - briefs
        - more
      readOnly: true
      properties:
        briefs:
          type: array
          items:
            $ref: "#/components/schemas/AlarmBrief"
        more:
          $ref: "#/components/schemas/More"
    AlarmBrief:
      type: object
      required:
        - creationTimestamp
        - updateTimestamp
        - ID
        - level
        - occurrence
        - state
        - acked
        - alarmUid
      properties:
        ID:
          type: integer
          description: Alarm ID identifying the type of alarm
          format: int32
          example: 13
        acked:
          type: boolean
          description: True when the alarm has been acknowledged by a user
          example: true
        ackedInfo:
          type:
            - string
            - "null"
          description: The name of the user who acknowledged the alarm
          example: John Doe
        ackedTimestamp:
          type:
            - integer
            - "null"
          format: int64
          example: 1577836800000
          description: Acknowledgement timestamp, epoch time in milliseconds
        addInfo:
          type:
            - string
            - "null"
          description: Additional information attached to the alarm (info1).
          example: DevStatusReq
        addInfo2:
          type:
            - string
            - "null"
          description: Additional information attached to the alarm (info2).
          example: "4"
        addInfo3:
          type:
            - string
            - "null"
          description: Additional information attached to the alarm (info3).
          example: ""
        addInfo4:
          type:
            - string
            - "null"
          description: Additional information attached to the alarm (info4).
          example: ""
        addInfo5:
          type:
            - string
            - "null"
          description: Additional information attached to the alarm (info5).
          example: ""
        alarmUid:
          type: string
          description: Alarm Uid identifying the alarm occurrence
          example: 5d31b91ccc9cc606607bc0a8
        creationTimestamp:
          type: integer
          format: int64
          example: 1577836800000
          description: Epoch time in milliseconds when the alarm was created
        index:
          type:
            - string
            - "null"
          description: Relative object index (the meaning of the index is defined per
            Alarm ID)
          example: DevStatusReq
        level:
          type: integer
          description: Alarm level
          format: int32
          minimum: 0
          maximum: 5
          example: 1
        occurrence:
          type: integer
          description: Number of alarm occurrences detected while the alarm was not cleared
          format: int32
          example: 1
        state:
          type: integer
          description: |
            Alarm severity state:
            - 1: CLEARED
            - 2: INDETERMINATE
            - 3: WARNING
            - 4: MINOR
            - 5: MAJOR
            - 6: CRITICAL
          format: int32
          minimum: 1
          maximum: 6
          example: 3
        updateTimestamp:
          type: integer
          format: int64
          example: 1577836800000
          description: Epoch time in milliseconds when the alarm was updated
    AlarmActiveBrief:
      type: object
      allOf:
        - $ref: "#/components/schemas/AlarmBrief"
      required:
        - href
      properties:
        href:
          type: string
          description: Alarm HREF
          example: /thingpark/wireless/rest/subscriptions/72619/devices/183760/alarms/5d31b91ccc9cc606607bc0a8
    AlarmDeviceBrief:
      type: object
      allOf:
        - $ref: "#/components/schemas/AlarmBrief"
        - type: object
          required:
            - device
          properties:
            device:
              type: object
              required:
                - EUI
              properties:
                EUI:
                  type: string
                  description: DevEUI of the Device associated with the alarm
                  example: 0018B20000000D48
                name:
                  type:
                    - string
                    - "null"
                  description: Name of the Device associated with the alarm
                  example: New device 12178
                domains:
                  $ref: "#/components/schemas/Domains"
    AlarmDeviceActiveBrief:
      type: object
      allOf:
        - $ref: "#/components/schemas/AlarmDeviceBrief"
      required:
        - href
      properties:
        href:
          type: string
          description: Alarm HREF
          example: /thingpark/wireless/rest/subscriptions/72619/devices/183760/alarms/5d31b91ccc9cc606607bc0a8
    AlarmsActive:
      type: object
      allOf:
        - $ref: "#/components/schemas/Alarms"
        - type: object
          properties:
            briefs:
              type:
                - array
                - "null"
              items:
                $ref: "#/components/schemas/AlarmActiveBrief"
    AlarmsDevice:
      type: object
      allOf:
        - $ref: "#/components/schemas/Alarms"
        - type: object
          required:
            - count
          properties:
            briefs:
              type:
                - array
                - "null"
              items:
                $ref: "#/components/schemas/AlarmDeviceBrief"
            count:
              type: integer
              description: Total number of matching alarms
              example: 32
    AlarmsDeviceActive:
      type: object
      allOf:
        - $ref: "#/components/schemas/AlarmsDevice"
        - type: object
          properties:
            briefs:
              type:
                - array
                - "null"
              items:
                $ref: "#/components/schemas/AlarmDeviceActiveBrief"
            cursors:
              type:
                - object
                - "null"
              properties:
                last:
                  type:
                    - string
                    - "null"
                  description: |
                    Cursor of the last item of the current page. This cursor can be
                    used to retrieve the next page using `pageAfter` query
                    parameter.

                    Only returned if sort by alarm Uid is used and a next page
                    exists.
                  example: eyJhbGFybVVpZCI6IjVkMzFiOTFjY2M5Y2M2MDY2MDdiYzBhOCJ9
    AlarmsAck:
      type: object
      required:
        - alarmUids
      properties:
        alarmUids:
          type: array
          items:
            type: string
          description: Ack alarms matching these alarm UIDs (exact match).
          example:
            - 5d31e149cc9cc606607d15b7
            - 5eab200fcc9cc606600a5703
            - 5daf2a8bcc9cc60660c64ff1
    AlarmsDevicesStateDistributions:
      type: object
      required:
        - briefs
        - totalCount
      properties:
        briefs:
          type: array
          items:
            type: object
            required:
              - count
              - state
            properties:
              count:
                type: integer
                description: Number of alarms in this state
                format: int32
              state:
                type: integer
                description: Reference alarm state used for this brief
                format: int32
        totalCount:
          type: integer
          description: Total number of alarms
          format: int32
    AlarmMulticastGroupActiveBrief:
      type: object
      allOf:
        - $ref: "#/components/schemas/AlarmBrief"
        - type: object
          required:
            - href
            - multicastGroup
          properties:
            href:
              type: string
              description: Alarm HREF
              example: /thingpark/wireless/rest/subscriptions/72619/multicastGroups/183760/alarms/5d31b91ccc9cc606607bc0a8
            multicastGroup:
              type: object
              required:
                - EUI
              properties:
                EUI:
                  type: string
                  description: DevEUI of the multicast group associated with the alarm
                  example: 0018B20000000D48
                name:
                  type:
                    - string
                    - "null"
                  description: Name of the multicast group associated with the alarm
                  example: My multicast group
                domains:
                  $ref: "#/components/schemas/Domains"
    AlarmsMulticastGroupActive:
      type: object
      allOf:
        - $ref: "#/components/schemas/Alarms"
        - type: object
          properties:
            briefs:
              type:
                - array
                - "null"
              items:
                $ref: "#/components/schemas/AlarmMulticastGroupActiveBrief"
    AppServer:
      type: object
      x-requiredCreate:
        - name
      x-requiredRead:
        - ID
        - name
      required:
        - deviceCount
        - healthState
        - multicastGroupCount
      oneOf:
        - $ref: "#/components/schemas/AppServerSubscription"
        - $ref: "#/components/schemas/AppServerOperator"
      properties:
        ID:
          type: string
          description: ID of the AS (generated)
          readOnly: true
          example: TWA_199983788.568.AS
        deviceCount:
          type: integer
          description: |
            Number of Devices associated with the Application Server
            through direct association.

            Devices associated with the Application Server through AS
            Routing Profiles are not taken into account.

            If the authenticated user has domain restrictions, only
            devices matching the domain restrictions are counted.
          format: int32
          readOnly: true
        healthState:
          enum:
            - ACTIVE
            - INIT
            - ERROR
            - DEACTIVATED
          type: string
          description: >
            Application server health state:

            - ACTIVE: the application is up and running

            - INIT: the application server is in a transient state, for example connection is being established

            - ERROR: the application server is unreachable

            - DEACTIVATED: the application server is deactivated


            Always `ACTIVE` for application servers with the `OPERATOR` scope.
          readOnly: true
          example: ACTIVE
        multicastGroupCount:
          type: integer
          description: |
            Number of Multicast Groups associated with the Application Server
            through direct association.

            Multicast Groups associated with the Application Server through AS
            Routing Profiles are not taken into account.

            If the authenticated user has domain restrictions, only
            multicast groups matching the domain restrictions are counted.
          format: int32
          readOnly: true
        name:
          type: string
          description: Name of the AS
          example: my app server
      discriminator:
        propertyName: scope
        mapping:
          SUBSCRIPTION: "#/components/schemas/AppServerSubscription"
          OPERATOR: "#/components/schemas/AppServerOperator"
    AppServerSubscription:
      title: SUBSCRIPTION
      type: object
      x-requiredRead:
        - downlinkSecurity
        - contentType
        - state
        - scope
      required:
        - baseStationCount
        - rfProbeCount
        - validationState
      oneOf:
        - $ref: "#/components/schemas/AppServerHttp"
        - $ref: "#/components/schemas/AppServerKafka"
      properties:
        baseStationCount:
          type: integer
          description: |
            Number of Base Stations associated with the Application Server
            through direct association.

            If the authenticated user has domain restrictions, only
            base stations matching the domain restrictions are counted.
          format: int32
          readOnly: true
        contentType:
          type: string
          enum:
            - xml
            - json
            - jsontyped
          description: Content Type of messages sent by LRC on tunneling interface.
          default: xml
        description:
          type:
            - string
            - "null"
          description: Application Server description
          example: description of my app server
        domains:
          $ref: "#/components/schemas/Domains"
        downlinkSecurity:
          type: object
          required:
            - status
          properties:
            asID:
              type:
                - string
                - "null"
              description: >
                AS ID for uplink/downlink security. If status is set to
                DOWNLINK_AS_KEY at creation but asID is not provided: asID is
                initialized to the AS ID automatically generated by the server.


                Allowed characters: alphanumeric, dash (-), dot (.) and underscore (_)
              example: TWA_199983788.568.AS
            downlinkAsKey:
              type:
                - string
                - "null"
              description: AS Transport Key
              writeOnly: true
              example: 7D69CC652FE100DA5AF1825D495E3800
            maxTimestampDeviation:
              type:
                - integer
                - "null"
              description: |
                Downlink maximal timestamp deviation in seconds
                0 means no maximal timestamp deviation
              format: int32
            status:
              enum:
                - DOWNLINK_AS_KEY
                - NONE
              type: string
              description: >
                When set to DOWNLINK_AS_KEY: asID and downlinkAsKey are
                mandatory, maxTimestampDeviation is optional.


                When set to NONE: asID, downlinkAsKey and maxTimestampDeviation are forbidden.
        rfProbeCount:
          type: integer
          description: |
            Number of RF probes associated with the Application Server
            through direct association.

            If the authenticated user has domain restrictions, only
            RF probes matching the domain restrictions are counted.
          format: int32
          readOnly: true
        scope:
          type: string
          enum:
            - SUBSCRIPTION
          description: >
            Scope of the application server:

            - application servers with the `SUBSCRIPTION` scope are managed in the
              scope of this subscription,
            - application servers with the `OPERATOR` scope are provided by the
              operator and can't be modified.
          default: SUBSCRIPTION
          x-updateForbidden: true
        state:
          type: string
          x-createForbidden: true
          allOf:
            - $ref: "#/components/schemas/AppServerState"
        validationState:
          type: string
          readOnly: true
          allOf:
            - $ref: "#/components/schemas/AppServerValidationState"
        occContext:
          $ref: "#/components/schemas/OccContext"
      discriminator:
        propertyName: type
        mapping:
          HTTP: "#/components/schemas/AppServerHttp"
          HTTP_CELLULAR: "#/components/schemas/AppServerHttp"
          KAFKA: "#/components/schemas/AppServerKafka"
    AppServerOperator:
      title: OPERATOR
      type: object
      readOnly: true
      required:
        - scope
      properties:
        scope:
          type: string
          enum:
            - OPERATOR
          description: >
            Scope of the application server:

            - application servers with the `SUBSCRIPTION` scope are managed in the
              scope of this subscription,
            - application servers with the `OPERATOR` scope are provided by the
              operator and can't be modified.
    AppServerHttp:
      title: HTTP
      type: object
      x-requiredRead:
        - type
      properties:
        type:
          enum:
            - HTTP
            - HTTP_CELLULAR
          type: string
          description: |
            AS type (`HTTP`, `HTTP_CELLULAR` or `KAFKA`)

            `HTTP_CELLULAR` is only applicable to **ThingPark Wireless** if the
            cellular connectivity is enabled by the Operator.
          default: HTTP
          x-updateForbidden: true
        customHttpHeaders:
          $ref: "#/components/schemas/AppServerCustomHttpHeaders"
        destinations:
          type:
            - array
            - "null"
          description: |
            Ordered list of Application Server destinations.
            The first application server of the list is used when
            used on a cellular device.

            This field is not returned if the authenticated user has domain
            restrictions but does not have `<Subscription>/a` access right.
          items:
            $ref: "#/components/schemas/AppServerHttpDestination"
    AppServerHttpDestination:
      type: object
      required:
        - addresses
        - strategy
      properties:
        addresses:
          $ref: "#/components/schemas/AppServerAddresses"
        ports:
          type:
            - string
            - "null"
          description: |
            LoRaWAN ports:
            - A port (e.g. 1)
            - A list of ports (e.g. 1,2,3)
            - A range of ports (e.g. 10-20)
            - Otherwise ports (* wildcard)

            Note: when the * wildcard is used, it must ALWAYS be placed on
            the last destination.
          example: 1,2,3
          default: "*"
        strategy:
          $ref: "#/components/schemas/AppServerStrategy"
    AppServerKafka:
      title: KAFKA
      type: object
      required:
        - type
      properties:
        type:
          enum:
            - KAFKA
          type: string
          description: |
            AS type (`HTTP`, `HTTP_CELLULAR` or `KAFKA`)

            `HTTP_CELLULAR` is only applicable to **ThingPark Wireless** if the
            cellular connectivity is enabled by the Operator.
          x-updateForbidden: true
        destinations:
          type:
            - array
            - "null"
          description: Application Server destination
          maxItems: 1
          items:
            $ref: "#/components/schemas/AppServerKafkaDestination"
        flowMatcherTags:
          type:
            - array
            - "null"
          description: >
            IoT Flow matcher tags defined at Application Server level.

            When defined at both Device level and Application Server level, the Device level information has precedence over Application Server level information.
          items:
            type: string
            description: IoT Flow matcher tag
            example: TWA_199983809.2989.AS
        notification:
          $ref: "#/components/schemas/AppServerKafkaNotification"
        tpxIotFlow:
          $ref: "#/components/schemas/TpxIotFlow"
    AppServerKafkaDestination:
      type: object
      required:
        - brokerID
        - topicName
      properties:
        brokerID:
          type: string
          description: Kafka Broker ID
          example: my_broker_ID
        topicName:
          type: string
          description: Kafka Topic name
          example: my_topic
    AppServerKafkaNotification:
      type:
        - object
        - "null"
      description: |
        Only applicable to **ThingPark Enterprise**.
      required:
        - baseStationAlarms
        - deviceAlarms
      properties:
        baseStationAlarms:
          type: boolean
          description: |
            TRUE if the alarms of associated base stations are produced in
            the associated Kafka topic
          default: false
        deviceAlarms:
          type: boolean
          description: |
            TRUE if the alarms of associated devices are produced in the
            associated Kafka topic
          default: false
    AppServerAddresses:
      type: array
      items:
        type: string
        description: Ordered list of destination addresses (URLs).
        example: https://www.example.com/myApp
    AppServerCustomHttpHeaders:
      type:
        - array
        - "null"
      description: |
        A list of HTTP headers to be added in HTTP requests sent to the
        application. Accept, Host, User-Agent, Content-Length and
        Content-Type headers cannot be customized. A given HTTP header name can
        be configured only once (case insensitive).

        This field is not returned if the authenticated user has domain
        restrictions but does not have `<Subscription>/a` access right.
      items:
        type: object
        required:
          - name
          - value
        properties:
          name:
            type: string
            pattern: ^([!#$%&'*+\-.^`|~\w])+$
            description: Custom HTTP header name
            example: Authorization
          value:
            type: string
            pattern: ^([\x21-\x7e](([ \t])+[\x21-\x7e])?)+$
            description: Custom HTTP header value
            example: Bearer AbCdEf123456
      maxItems: 5
    AppServerState:
      type: string
      enum:
        - ACTIVE
        - DEACTIVATED
      description: >
        Application Server activation state:

        - `ACTIVE`: Uplink frames from the associated devices are forwarded to the application server and the application server is able to send downlink payloads.

        - `DEACTIVATED`: Uplink frames from the associated devices are not forwarded to the application server and the application server is not able to send downlink payloads.


        The Application Server activation state only applies when the Application Server validation state is VALIDATED.
    AppServerValidationState:
      type: string
      enum:
        - VALIDATED
        - SUSPENDED
      description: >
        Application Server validation state:

        - `VALIDATED`: The application server is available for activation.

        - `SUSPENDED`: The application server is suspended because of long time license expiration. Uplink frames from the associated devices are not forwarded to the application server and the application server is not able to send downlink payloads.
    AppServerStrategy:
      enum:
        - SEQUENTIAL
        - BLAST
      type: string
      description: Routing strategy (`SEQUENTIAL`, `BLAST`).
    AppServerIotFlowConnectorMetrics:
      type: object
      required:
        - activeThingsLast1h
        - activeThingsLast24h
        - downlinksLast1h
        - downlinksLast1hFailed
        - downlinksLast24h
        - downlinksLast24hFailed
        - uplinksLast1h
        - uplinksLast1hFailed
        - uplinksLast24h
        - uplinksLast24hFailed
      properties:
        activeThingsLast1h:
          type: integer
          format: int64
          description: The number of active things in the last hour for this connection.
            An active thing is any thing sending an uplink.
        activeThingsLast24h:
          type: integer
          format: int64
          description: The number of active things in the last 24 hours for this
            connection. An active thing is any thing sending an uplink
        downlinksLast1h:
          type: integer
          format: int64
          description: The number of received downlinks in the last hour for this
            connection.
        downlinksLast1hFailed:
          type: integer
          format: int64
          description: The number of downlinks that was not successfully sent in the last
            hour for this connection.
        downlinksLast24h:
          type: integer
          format: int64
          description: The number of received downlinks in the last 24 hours for this
            connection.
        downlinksLast24hFailed:
          type: integer
          format: int64
          description: The number of downlinks that was not successfully sent in the last
            24 hours for this connection.
        uplinksLast1h:
          type: integer
          format: int64
          description: The number of received uplinks in the last hour for this connection.
        uplinksLast1hFailed:
          type: integer
          format: int64
          description: The number of uplinks that was not successfully sent in the last
            hour for this connection.
        uplinksLast24h:
          type: integer
          format: int64
          description: The number of received uplinks in the last 24 hours for this
            connection.
        uplinksLast24hFailed:
          type: integer
          format: int64
          description: The number of uplinks that was not successfully sent in the last 24
            hours for this connection.
    AppServers:
      type: object
      required:
        - briefs
        - more
      properties:
        briefs:
          type: array
          items:
            $ref: "#/components/schemas/AppServerBrief"
          example:
            - type: HTTP
              baseStationCount: 0
              deviceCount: 40
              multicastGroupCount: 2
              rfProbeCount: 1
              state: ACTIVE
              healthState: ACTIVE
              name: my HTTP application
              ID: TWA_199983788.568.AS
              href: /thingpark/wireless/rest/subscriptions/72619/appServers/568
              validationState: VALIDATED
              domains:
                - name: France/Paris
                  group:
                    name: Site
                - name: Energy
                  group:
                    name: Vertical
              scope: SUBSCRIPTION
            - type: KAFKA
              baseStationCount: 5
              deviceCount: 22
              multicastGroupCount: 0
              rfProbeCount: 0
              state: ACTIVE
              healthState: ERROR
              tpxIotFlow:
                connectionId: "24"
                state: UNREACHABLE
                connectorId: actility-mqtt-iot
                flowId: "19"
              notification:
                baseStationAlarms: true
                deviceAlarms: true
              name: my MQTT application
              ID: TWA_199983788.1972.AS
              href: /thingpark/wireless/rest/subscriptions/72619/appServers/1972
              validationState: VALIDATED
              domains:
                - name: France/Caen
                  group:
                    name: Site
                - name: Energy
                  group:
                    name: Vertical
              scope: SUBSCRIPTION
            - type: KAFKA
              baseStationCount: 0
              deviceCount: 10
              multicastGroupCount: 0
              rfProbeCount: 1
              state: ACTIVE
              healthState: ACTIVE
              tpxIotFlow:
                connectionId: "58"
                state: OPENED
                connectorId: actility-cumulocity-iot
                flowId: "41"
              notification:
                baseStationAlarms: false
                deviceAlarms: false
              name: my Cumulocity application
              ID: TWA_199983788.16375.AS
              href: /thingpark/wireless/rest/subscriptions/72619/appServers/16375
              validationState: VALIDATED
              domains:
                - name: France/Paris
                  group:
                    name: Site
                - name: Location
                  group:
                    name: Vertical
              scope: SUBSCRIPTION
            - deviceCount: 52
              multicastGroupCount: 8
              healthState: ACTIVE
              name: ACME Cloud AS
              ID: TWA_acme-as-supplier.16.AS
              href: /thingpark/wireless/rest/subscriptions/72619/appServers/id:TWA_acme-as-supplier.16.AS
              scope: OPERATOR
        more:
          $ref: "#/components/schemas/More"
    AppServerBrief:
      type: object
      required:
        - ID
        - deviceCount
        - healthState
        - href
        - multicastGroupCount
        - name
      oneOf:
        - $ref: "#/components/schemas/AppServerSubscriptionBrief"
        - $ref: "#/components/schemas/AppServerOperatorBrief"
      properties:
        ID:
          type: string
        deviceCount:
          type: integer
          description: |
            Number of Devices associated with the Application Server
            through direct association or through AS Routing Profiles.

            If the authenticated user has domain restrictions, only
            devices matching the domain restrictions are counted.
          format: int32
        healthState:
          type: string
          enum:
            - ACTIVE
            - INIT
            - ERROR
            - DEACTIVATED
          description: >
            Application server health state:

            - `ACTIVE`: the application is up and running

            - `INIT`: the application server is in a transient state, for example connection is being established

            - `ERROR`: the application server is unreachable

            - `DEACTIVATED`: the application server is deactivated


            Always `ACTIVE` for application servers with the `OPERATOR` scope.
        href:
          type: string
          description: Application Server HREF
        multicastGroupCount:
          type: integer
          description: |
            Number of Multicast Groups associated with the Application Server
            through direct association or through AS Routing Profiles.

            If the authenticated user has domain restrictions, only
            multicast groups matching the domain restrictions are counted.
          format: int32
        name:
          type: string
      discriminator:
        propertyName: scope
        mapping:
          SUBSCRIPTION: "#/components/schemas/AppServerSubscriptionBrief"
          OPERATOR: "#/components/schemas/AppServerOperatorBrief"
    AppServerSubscriptionBrief:
      title: Application server in subscription scope
      type: object
      required:
        - rfProbeCount
        - scope
        - state
        - type
        - validationState
      properties:
        baseStationCount:
          type:
            - integer
            - "null"
          description: |
            Number of Base Stations associated with the Application Server
            through direct association.

            If the authenticated user has domain restrictions, only
            base stations matching the domain restrictions are counted.
          format: int32
        domains:
          $ref: "#/components/schemas/Domains"
        notification:
          $ref: "#/components/schemas/AppServerKafkaNotification"
        rfProbeCount:
          type: integer
          description: |
            Number of RF probes associated with the Application Server
            through direct association.

            If the authenticated user has domain restrictions, only
            RF probes matching the domain restrictions are counted.
          format: int32
        scope:
          type: string
          enum:
            - SUBSCRIPTION
          description: >
            Scope of the application server:

            - application servers with the `SUBSCRIPTION` scope are managed in the
              scope of this subscription,
            - application servers with the `OPERATOR` scope are provided by the
              operator and can't be modified.
        state:
          $ref: "#/components/schemas/AppServerState"
        tpxIotFlow:
          $ref: "#/components/schemas/TpxIotFlow"
        type:
          enum:
            - HTTP
            - KAFKA
          type: string
          description: |
            AS type (`HTTP`, or `KAFKA`)
        validationState:
          $ref: "#/components/schemas/AppServerValidationState"
    AppServerOperatorBrief:
      title: Application server in operator scope
      type: object
      required:
        - scope
      properties:
        scope:
          type: string
          enum:
            - OPERATOR
          description: >
            Scope of the application server:

            - application servers with the `SUBSCRIPTION` scope are managed in the
              scope of this subscription,
            - application servers with the `OPERATOR` scope are provided by the
              operator and can't be modified.
          readOnly: true
    AsTransportKey:
      type: object
      allOf:
        - $ref: "#/components/schemas/AsTransportKeyBrief"
        - type: object
          x-requiredCreate:
            - name
            - rsaPublicKey
          properties:
            rsaEncryptedASKey:
              type:
                - string
                - "null"
              description: >
                AS transport key generated by the HSM and encrypted with the RSA
                public

                key, base64 encoded.


                Only returned when a RSA public key is provided in the request.
              example: xeFyrVZaL4E2VInvZOZvTB8hWpYonpb8mz4VCb1wJmo5W2sbAI2lrx+LfN8ZhWZqiZGWAps4NBLWA4NbMKt+wpiSJqgBzuSb1bOvTEQTzMSR8VECeR2U+0gbwJEm1nZYLo8xgqu52fONycbBlXdKgP3h70e1bpcvWSu9608+uaY=
              readOnly: true
            rsaPublicKey:
              type: string
              description: |
                RSA Public Key used by the HSM to encrypt the AS Transport Key.

                RSA Public Key must be provided in PEM format.
              example: |
                -----BEGIN PUBLIC KEY-----
                MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA61BjmfXGEvWmegnBGSuS
                +rU9soUg2FnODva32D1AqhwdziwHINFaD1MVlcrYG6XRKfkcxnaXGfFDWHLEvNBS
                EVCgJjtHAGZIm5GL/KA86KDp/CwDFMSwluowcXwDwoyinmeOY9eKyh6aY72xJh7n
                oLBBq1N0bWi1e2i+83txOCg4yV2oVXhBo8pYEJ8LT3el6Smxol3C1oFMVdwPgc0v
                Tl25XucMcG/ALE/KNY6pqC2AQ6R2ERlVgPiUWOPatVkt7+Bs3h5Ramxh7XjBOXeu
                lmCpGSynXNcpZ/06+vofGi/2MlpQZNhHAo8eayMp6FcvNucIpUndo1X8dKMv3Y26
                ZQIDAQAB
                -----END PUBLIC KEY-----
              writeOnly: true
            occContext:
              $ref: "#/components/schemas/OccContext"
    AsTransportKeyBrief:
      type: object
      required:
        - ID
        - deviceCount
        - label
        - hsmGroupID
      x-requiredRead:
        - name
      properties:
        ID:
          type: string
          readOnly: true
          example: ASTK_3BC
        name:
          type: string
          example: My AS transport key
        description:
          type:
            - string
            - "null"
        deviceCount:
          type: integer
          description: |
            Number of devices associated with the AS transport key
            through direct association or through AS routing profiles.

            If the authenticated user has domain restrictions, only
            devices matching the domain restrictions are counted.
          format: int32
          readOnly: true
        domains:
          $ref: "#/components/schemas/Domains"
        label:
          type: string
          description: Label of the generated AS transport key.
          example: ASTK_3BC.4
          readOnly: true
        hsmGroupID:
          type:
            - string
            - "null"
          description: ID of HSM group used to generate the AS transport key.
          x-updateForbidden: true
          example: HSM_ACME-OPE.40
    AsTransportKeys:
      type: object
      properties:
        briefs:
          type:
            - array
            - "null"
          items:
            $ref: "#/components/schemas/AsTransportKeyBrief"
        count:
          type:
            - integer
            - "null"
          description: Total number of AS transport keys
          example: 32
        more:
          type:
            - boolean
            - "null"
    BatLevels:
      type: object
      required:
        - briefs
      properties:
        briefs:
          type: array
          items:
            type: object
            required:
              - timestamp
              - level
            properties:
              level:
                type: integer
                description: Aggregated level of the step
                format: int32
              timestamp:
                type: integer
                format: int64
                example: 1577836800000
                description: Timestamp of the step, epoch time in milliseconds
    BsTag:
      type: object
      required:
        - name
      x-requiredRead:
        - namespace
      properties:
        name:
          $ref: "#/components/schemas/TagName"
        namespace:
          type: string
          enum:
            - OPERATOR
            - SUBSCRIBER
          description: |
            Base Station tag namespace:
            - OPERATOR: public tag managed by the Operator
            - SUBSCRIBER: private tag managed by the Subscriber
          default: OPERATOR
          example: OPERATOR
    BsTagSuggestions:
      type: object
      required:
        - briefs
        - query
      properties:
        briefs:
          type: array
          description: List of tags matching the query string
          items:
            type: object
            required:
              - name
              - namespace
            properties:
              name:
                $ref: "#/components/schemas/TagName"
              namespace:
                type: string
                enum:
                  - OPERATOR
                  - SUBSCRIBER
                description: |
                  Tag namespace:
                  - OPERATOR: public tag managed by the Operator
                  - SUBSCRIBER: private tag managed by the Subscriber
          example:
            - name: tag1
              namespace: OPERATOR
            - name: tag2
              namespace: SUBSCRIBER
            - name: tag3
              namespace: OPERATOR
        query:
          type: string
          description: The query string provided in the request
          example: tag
    CellularNetworkContext:
      type: object
      required:
        - ID
        - deviceCount
      x-requiredCreate:
        - name
        - mode
        - gtpTunnel
      x-requiredRead:
        - gtpTunnel
        - mode
        - name
      oneOf:
        - $ref: "#/components/schemas/CellularNetworkContextMessage"
        - $ref: "#/components/schemas/CellularNetworkContextDirectIP"
        - $ref: "#/components/schemas/CellularNetworkContextMixed"
      discriminator:
        propertyName: mode
        mapping:
          MESSAGE: "#/components/schemas/CellularNetworkContextMessage"
          DIRECT_IP: "#/components/schemas/CellularNetworkContextDirectIP"
          MIXED: "#/components/schemas/CellularNetworkContextMixed"
      properties:
        ID:
          type: string
          readOnly: true
          example: 1AF3B
        name:
          type: string
          example: My cellular network context
        mode:
          type: string
          enum:
            - MESSAGE
            - DIRECT_IP
            - MIXED
          description: >
            Communication mode allowed by the cellular devices attached to this
            network context:

            * `MESSAGE`: only message mode communication is allowed

            * `DIRECT_IP`: only direct IP communication is allowed

            * `MIXED`: both communication modes are allowed
        gtpTunnel:
          type: object
          description: GTP tunnel settings
          required:
            - subnet
            - dhcpPool
            - dns1
          properties:
            subnet:
              type: string
              description: |
                IPv4 subnet

                Syntax: CIDR
              example: 10.20.0.0/16
            dhcpPool:
              type: string
              description: |
                DHCP IPv4 pool

                Syntax: IP address range
              example: 10.20.0.1-10.20.255.254
            dns1:
              type: string
              description: |
                DNS IPv4 address 1

                Syntax: IP Address
              example: 10.10.0.1
            dns2:
              type:
                - string
                - "null"
              description: |
                DNS IPv4 address 2

                Syntax: IP Address
              example: 10.10.0.2
        deviceCount:
          type: integer
          description: |
            Number of devices associated with the network context
            through direct association or through AS Routing Profiles.

            If the authenticated user has domain restrictions, only
            devices matching the domain restrictions are counted.
          format: int32
          readOnly: true
        occContext:
          $ref: "#/components/schemas/OccContext"
    CellularNetworkContextMessage:
      type: object
      title: MESSAGE
    CellularNetworkContextDirectIP:
      type: object
      title: DIRECT_IP
      x-requiredCreate:
        - greTunnels
      x-requiredRead:
        - greTunnels
      properties:
        appServersReporting:
          type:
            - object
            - "null"
          description: >
            Define which events are reported to application servers.

            Message mode uplink IPv4 packets and session events are always reported.
          properties:
            microflowEvents:
              type:
                - boolean
                - "null"
              description: >
                True if the microflow events are reported to application servers.
              default: false
        greTunnels:
          type: array
          items:
            type: object
            description: |
              GRE tunnel settings

              Note: Only one GRE tunnel can be defined
            maxItems: 1
            required:
              - peerAddress
            properties:
              peerAddress:
                type: string
                description: |
                  GRE tunnel peer IPv4 address

                  Syntax: IP Address
                example: 192.0.2.1
    CellularNetworkContextMixed:
      type: object
      title: MIXED
      allOf:
        - $ref: "#/components/schemas/CellularNetworkContextMessage"
        - $ref: "#/components/schemas/CellularNetworkContextDirectIP"
        - type: object
          x-requiredCreate:
            - messageRouting
          x-requiredRead:
            - messageRouting
          properties:
            messageRouting:
              type: object
              description: |
                Message mode routing criteria

                Mandatory when mode is MIXED
              required:
                - sourcePort
              properties:
                sourcePort:
                  type: integer
                  description: Message mode source UDP port
                  example: 45826
                  minimum: 0
                  maximum: 65535
    CellularNetworkContexts:
      type: object
      properties:
        briefs:
          type:
            - array
            - "null"
          items:
            $ref: "#/components/schemas/CellularNetworkContext"
        count:
          type:
            - integer
            - "null"
          description: Total number of matching network contexts
          example: 32
        more:
          type:
            - boolean
            - "null"
    Coordinates:
      description: Geographical coordinates
      type: object
      required:
        - lat
        - lng
      properties:
        lat:
          description: Latitude
          type: number
          minimum: -90
          maximum: 90
          example: 42.59277039545001
        lng:
          description: Longitude
          type: number
          minimum: -180
          maximum: 180
          example: 5.8045532062725265
    Counters:
      type: object
      required:
        - briefs
        - totalCount
      properties:
        briefs:
          type: array
          items:
            type: object
            required:
              - healthState
              - count
            properties:
              count:
                type: integer
                description: Number of Devices in this health state
                format: int32
              healthState:
                $ref: "#/components/schemas/DeviceHealthState"
        totalCount:
          type: integer
          description: Total number of Devices
          format: int32
    Device:
      type: object
      required:
        - healthState
        - vendor
        - historyUpDaily
        - historyDwDaily
        - alarm6
        - alarm5
        - alarm4
        - alarm3
        - alarm2
        - alarm1
        - creationDate
        - now
      x-requiredCreate:
        - model
      x-requiredRead:
        - model
        - locationType
        - name
      oneOf:
        - $ref: "#/components/schemas/DeviceLorawan"
        - $ref: "#/components/schemas/DeviceCellular"
      properties:
        adminLat:
          type:
            - number
            - "null"
          description: |
            Manually defined LAT

            When provided at the creation, the manual location is automatically
            activated, otherwise the network location is activated by default.
          format: float
        adminLon:
          type:
            - number
            - "null"
          description: |
            Manually defined LON

            When provided at the creation, the manual location is automatically
            activated, otherwise the network location is activated by default.
          format: float
        appServers:
          type:
            - array
            - "null"
          description: >
            The Application Servers list must be compatible with the network

            subscription if any


            **Access right**: Not available for update with `LPWA_MGR::WRITE_NODE`


            This attribute is FORBIDDEN if the Device is associated with an AS

            Routing Profile


            If the authenticated user has domain restrictions, only the following

            application servers can be associated with a device:

            - Application servers not associated with any domain

            - Application servers associated with domains and matching the domain
              restrictions
          items:
            $ref: "#/components/schemas/DeviceAppServer"
        suspension:
          type:
            - string
            - "null"
          enum:
            - NONE
            - SUBSCRIBER_SUSPENDED
            - null
          description: |
            Device suspension state:
            - NONE: The device is associated with a network subscription and
              allowed to transmit and receive packets.
            - SUBSCRIBER_SUSPENDED: The device has been suspended by the
              subscriber, all its packets are ignored by the network server. The
              device may still be associated with a network subscription.

            When removing the network subscription from a device, the suspension
            state is automatically set to SUBSCRIBER_SUSPENDED.

            When associating a suspended device with a network subscription, the
            suspension state is automatically set to NONE.
        alarm004:
          type:
            - string
            - "null"
          description: >
            Two thresholds can be configured for the alarm 004 (no uplink
            activity) in an XML document:

            - The root XML element is `alarm004`

            - The enclosed `threshold1` self-closing XML element configures the first threshold of the alarm

            - The enclosed `threshold2` self-closing XML element configures the second threshold of the alarm

            - For each threshold XML element the following attributes are available:
              - `status`: `ENABLE` or `DISABLE` this threshold
              - `level`: severity (2-6) of the alarm for this threshold
              - `duration`: inactivity period (ISO 8601 duration among `PT1H`, `PT2H`, `PT5H`, `PT10H`, `P1D`, `P2D`, `P4D`, `P7D` and `P15D`) after which the alarm is triggered for this threshold
            - The following constraints must be satisfied:
              - `threshold2@status` can be set to `ENABLE` only if `threshold1@status` is `ENABLE`
              - `threshold1@level` must be lower than `threshold2@level`
              - `threshold1@duration` must be lower than `threshold2@duration`

            This property must no longer be used: the `alarmsConfiguration.alarm004` property must be used in replacement.
          default: <alarm004><threshold1 status="ENABLE" level="3"
            duration="P2D"/><threshold2 status="ENABLE" level="5"
            duration="P4D"/></alarm004>
          deprecated: true
        alarm1:
          type: integer
          description: Number of CLEARED alarms not ACKED
          format: int32
          example: 9
          readOnly: true
        alarm2:
          type: integer
          description: Number of INDETERMINATE alarms not ACKED
          format: int32
          example: 0
          readOnly: true
        alarm3:
          type: integer
          description: Number of WARNING alarms not ACKED
          format: int32
          example: 1
          readOnly: true
        alarm4:
          type: integer
          description: Number of MINOR alarms not ACKED
          format: int32
          example: 0
          readOnly: true
        alarm5:
          type: integer
          description: Number of MAJOR alarms not ACKED
          format: int32
          example: 1
          readOnly: true
        alarm6:
          type: integer
          description: Number of CRITICAL alarms not ACKED
          format: int32
          example: 0
          readOnly: true
        alarmsConfiguration:
          type:
            - object
            - "null"
          properties:
            alarm004:
              type:
                - array
                - "null"
              description: Configuration of the device no uplink activity alarm (004)
              minItems: 0
              maxItems: 2
              items:
                type: object
                description: >
                  Each item defines a threshold for the triggering of the alarm.
                  If `alarm004` property is null or not set at device creation,
                  two thresholds are configured: 1. Trigger the alarm with
                  **warning** severity after **2 days** of no uplink activity 2.
                  Trigger the alarm with **major** severity after **4 days** of
                  no uplink activity

                  A maximum of 2 thresholds can be configured.

                  When 2 thresholds are configured:

                  - The `duration` of the second threshold must be higher than the first one.

                  - The `severity` of the second threshold must be higher than the first one.
                required:
                  - duration
                  - severity
                properties:
                  duration:
                    type: string
                    description: |
                      ISO 8601 duration of the device no uplink activity before
                      triggering the alarm for this threshold.
                    enum:
                      - PT1H
                      - PT2H
                      - PT5H
                      - PT10H
                      - P1D
                      - P2D
                      - P4D
                      - P7D
                      - P15D
                  severity:
                    type: integer
                    description: |
                      Severity of the alarm for this threshold:
                      - 6: CRITICAL
                      - 5: MAJOR
                      - 4: MINOR
                      - 3: WARNING
                      - 2: INDETERMINATE
                    format: int32
                    minimum: 2
                    maximum: 6
              default:
                - duration: P2D
                  severity: 3
                - duration: P4D
                  severity: 5
        creationDate:
          type: integer
          format: int64
          example: 1577836800000
          description: Epoch time in milliseconds when the device was created
          readOnly: true
        customerAdminData:
          type:
            - string
            - "null"
          description: |
            Free administrative data associated to the device (e.g. floor
            number, building, address...).
        domains:
          $ref: "#/components/schemas/Domains"
        driverMetadata:
          type:
            - object
            - "null"
          description: ThingPark X metadata
          required:
            - model
          properties:
            model:
              type: string
              description: |
                TPX Model Identifier
                Syntax: `<producerId>:<moduleId>:<version>`
              example: abeeway:micro-tracker:3
              readOnly: true
            application:
              type:
                - string
                - "null"
              description: |
                TPX Protocol Identifier
                Syntax: `<producerId>:<moduleId>:<version>`
              example: abeeway:asset-tracker:1
            supportedApplications:
              type:
                - array
                - "null"
              description: >
                List of supported TPX Protocol Identifiers.

                Used to allow override of the application metadata at Device level.
              items:
                type: string
                description: |
                  TPX Protocol Identifier
                  Syntax: `<producerId>:<moduleId>:<version>`
              example:
                - abeeway:asset-tracker:1
                - abeeway:asset-tracker:2
              readOnly: true
        firstUpTimestamp:
          type:
            - integer
            - "null"
          format: int64
          example: 1577836800000
          description: First contact timestamp with the ThingPark Infrastructure, epoch
            time in milliseconds.
          readOnly: true
        healthState:
          $ref: "#/components/schemas/DeviceHealthState"
        historyDwDaily:
          type: object
          required:
            - val
          readOnly: true
          properties:
            val:
              description: |
                Cumulated number of downlink frames per 2h period for a 24h
                duration before `lastDwTimestamp`.

                The array is sorted from the most recent period (index 0) to the
                oldest period.
              type: array
              items:
                type: integer
                format: int32
        historyUpDaily:
          type: object
          required:
            - val
          readOnly: true
          properties:
            val:
              description: |
                Cumulated number of uplink frames per 2h period for a 24h
                duration before `lastUpTimestamp`.

                The array is sorted from the most recent period (index 0) to the
                oldest period.
              type: array
              items:
                type: integer
                format: int32
        lastDwTimestamp:
          type:
            - integer
            - "null"
          format: int64
          example: 1577836800000
          description: Timestamp of the last downlink frame, epoch time in milliseconds
          readOnly: true
        lastUpTimestamp:
          type:
            - integer
            - "null"
          format: int64
          example: 1577836800000
          description: Timestamp of the last uplink frame, epoch time in milliseconds
          readOnly: true
        locationType:
          type: integer
          x-createForbidden: true
          description: |
            Type of location:
            * `0` Manual: use provided coordinates
            * `1` Auto: use network geo location if available
          format: int32
          enum:
            - 0
            - 1
        markerID:
          deprecated: true
          type:
            - integer
            - "null"
          description: >
            Google map marker ID.


            The default maker will be used when no marker are specified at the

            creation.


            This property must no longer be used: it is no more used in ThingPark UI.
          format: int32
        motionIndicator:
          enum:
            - NEAR_STATIC
            - WALKING_SPEED
            - BIKE_SPEED
            - VEHICLE_SPEED
            - RANDOM
            - null
          type:
            - string
            - "null"
          description: |
            Motion indicator of the device:
            - NEAR_STATIC
            - WALKING_SPEED
            - BIKE_SPEED
            - VEHICLE_SPEED
            - RANDOM

            When not set, the motion indicator of the device profile is used.
        name:
          type: string
          description: The device name is automatically set to the DevEUI when not
            provided at creation.
          example: My device
        networkSubscription:
          type:
            - object
            - "null"
          description: |
            Network subscription associated with the device

            The network subscription must be compatible with the AS routing
            profile associated with the device (if any)

            On device creation or update, the selection of the network
            subscription depends on `networkSubscriptionsHandlingMode` query
            parameter:
            - `BASIC`: the network subscription is selected based on its
              `nwGeolocalization` and `prAllowed` values. If `nwGeolocalization`
              and `prAllowed` are not provided, the network subscription with
              `nwGeolocalization` and `prAllowed` set to false is selected. If
              several network subscriptions match, the network subscription with
              the oldest subscription date is selected. Only applicable to
              ThingPark Enterprise.
            - `ADVANCED`: the network subscription is selected based on its
              `ID` value. If no `ID` is provided, the device is not associated
              with a network subscription and automatically suspended: all its
              packets are ignored by the network server.

            On device creation, the network subscription is always selected as
            described above.

            On device update, the network subscription is selected as described
            above only if the `networkSubscription` property is provided.
            Otherwise the current network subscription is kept.

            **Access right: Not available for update with**
            LPWA_MGR::WRITE_NODE
          required:
            - supplier
            - href
          x-requiredRead:
            - ID
          properties:
            ID:
              type:
                - string
                - "null"
              description: ID of the network subscription
              example: acme-cs/production
            commercialName:
              type:
                - string
                - "null"
              description: Name of the network subscription
              readOnly: true
              example: Basic Unicast
            href:
              type: string
              description: HREF of the network subscription
              readOnly: true
              example: /thingpark/wireless/rest/subscriptions/33/networkSubscriptions/19
            mobility:
              type:
                - boolean
                - "null"
              description: |
                Allow Device to disable ADR when moving. Disable alarms related
                to change of best base station

                **Only applicable when connectivity is 'LORAWAN'**

                This property must no longer be used: the property
                `motionIndicator` must be used in replacement.
              deprecated: true
              readOnly: true
            supplier:
              type: object
              required:
                - ID
              readOnly: true
              properties:
                ID:
                  type: string
                  description: ID of the associated connectivity supplier
                  example: acme-cs
                commercialName:
                  type:
                    - string
                    - "null"
                  description: |
                    ID of the associated connectivity supplier

                    Note: For performance issue, the commercial name is not
                    returned on CREATE and UPDATE (only returned on a RETRIEVE)
                  example: ACME Connectivity Supplier
            allowMessageMode:
              type:
                - boolean
                - "null"
              description: |
                Enable the Device to send message mode packets

                **Only applicable when connectivity is 'CELLULAR'**
              readOnly: true
            allowDirectIPMode:
              type:
                - boolean
                - "null"
              description: |
                Enable the Device to send direct IP mode traffic

                **Only applicable when connectivity is 'CELLULAR'**
              readOnly: true
            nwGeolocalization:
              type:
                - boolean
                - "null"
              description: |
                True if network geolocation is enabled

                **Only applicable when connectivity is 'LORAWAN'**
            prAllowed:
              type:
                - boolean
                - "null"
              description: |
                True if passive roaming is allowed

                **Only applicable when connectivity is 'LORAWAN'**
        now:
          type: integer
          format: int64
          example: 1577836800000
          description: Current time of the server, epoch time in milliseconds
          readOnly: true
        nwAddress:
          type:
            - string
            - "null"
          x-updateForbidden: true
          description: >
            **LoRaWAN device**


            DevAddr (8 hexadecimal characters / case insensitive but always converted in upper case by the server)


            - Mandatory for ABP on Create

            - Optional for OTAA on Create but DEPRECATED: the DevAddr of an OTAA device should not be provided on create
              to let the network server allocate a DevAddr in the range of the configured NetID during the join procedure.

            **Cellular device**


            Device IP address (Forbidden on Create)
          example: 04F5F519
        occContext:
          $ref: '#/components/schemas/OccContext'
        tags:
          type:
            - array
            - "null"
          x-updateForbidden: true
          items:
            type: object
            required:
              - name
            properties:
              name:
                $ref: '#/components/schemas/TagName'
          example:
            - name: tag1
            - name: tag2
            - name: tag3
        vendor:
          type: object
          required:
            - logo
          readOnly: true
          properties:
            logo:
              type: string
              description: Device vendor logo HREF
              example: /thingpark/wireless/rest/resources/files/logo/deviceVendor/3
            name:
              type:
                - string
                - "null"
              description: >
                Device vendor name


                This property must no longer be used: the property `commercialName` must be used in replacement.
              example: Semtech
              deprecated: true
            commercialName:
              type:
                - string
                - "null"
              description: Device vendor commercial name
              example: Semtech
            commercialDescription:
              type:
                - string
                - "null"
              description: Device vendor commercial description
              example: A Supplier of analog and mixed-signal semiconductors.
      discriminator:
        propertyName: connectivity
        mapping:
          LORAWAN: "#/components/schemas/DeviceLorawan"
          CELLULAR: "#/components/schemas/DeviceCellular"
    DeviceCellular:
      title: CELLULAR
      type: object
      required:
        - sim
        - connectivity
      x-requiredRead:
        - EUI
      properties:
        connectivity:
          type: string
          x-updateForbidden: true
          enum:
            - CELLULAR
          description: |
            Device connectivity
            Enumerate:
            - `LORAWAN`: LoRaWAN connectivity
            - `CELLULAR`: Cellular connectivity

            `CELLULAR` is only applicable if the
            cellular connectivity is enabled.
        EUI:
          type: string
          description: >
            DevEUI of the device.


            This property is read-only. The value is automatically assigned on device creation.


            For retro-compatibility, the IMEI of the device may be provided on device creation.

            In this case, the provided IMEI is used as enforced IMEI.
          example: F03D290000000001
        enforcedIMEI:
          type:
            - string
            - "null"
          description: >
            IMEI terminal identifier (15 digits).

            If not blank, the traffic of this device is accepted only for the provided IMEI.
          example: "862156804039920"
        imsi:
          deprecated: true
          type:
            - string
            - "null"
          x-updateForbidden: true
          description: >
            Replaced by `sim.ID`.


            IMSI of the SIM card (10-15 digits). This property is returned only if the

            device is attached to a SINGLE_IMSI SIM card.


            Forbidden if HSS provisioning is not activated in operator settings
          example: "460004777770001"
        sim:
          type: object
          x-updateForbidden: true
          required:
            - ID
            - type
          properties:
            ID:
              type: string
              description: >
                The IMSI, ICCID or eID of the SIM card. This property is
                required

                unless the deprecated property `imsi` is provided.


                Forbidden if HSS provisioning is not activated in operator settings
              examples:
                - "460004777770001"
                - "89208013535718672291"
                - "89345678912345678912345678912370"
            type:
              readOnly: true
              type: string
              enum:
                - SINGLE_IMSI
                - MULTI_IMSI
                - ESIM
        lastCellID:
          type:
            - string
            - "null"
          description: Last Cell ID
          readOnly: true
          example: "917504"
        lastCellMCCMNC:
          type:
            - string
            - "null"
          description: Last Cell MCC/MNC
          readOnly: true
          example: "20893"
        lastCellTrackingAreaNumber:
          type:
            - string
            - "null"
          description: Last Cell Tracking Area Number
          readOnly: true
          example: "1"
        lastRAT:
          type:
            - string
            - "null"
          description: Last Radio Access Type
          readOnly: true
          example: EUTRAN
        lastServingNetworkMCCMNC:
          type:
            - string
            - "null"
          description: Last Serving Network MCC/MNC
          readOnly: true
          example: "20893"
        lastIMEI:
          type:
            - string
            - "null"
          description: |
            IMEI of the last received message mode packet or microflow.
            The 15 digits are returned.
          readOnly: true
          example: "862156804039920"
        lastIMSI:
          type:
            - string
            - "null"
          description: |
            IMSI of the last received message mode packet or microflow.
          readOnly: true
          example: "208930000000102"
        lastMSISDN:
          type:
            - string
            - "null"
          description: |
            MSISDN of the last received message mode packet or microflow.
          readOnly: true
          example: "33612345678"
        lastMicroflowTimestamp:
          type:
            - integer
            - "null"
          format: int64
          example: 1577836800000
          readOnly: true
          description: Timestamp of the last microflow event, epoch time in milliseconds
        model:
          $ref: "#/components/schemas/DeviceModel"
        networkContext:
          type:
            - object
            - "null"
          required:
            - ID
          properties:
            ID:
              type: string
              example: 1AF3B
            name:
              type:
                - string
                - "null"
              example: My network context
              readOnly: true
        historyMicroflowDaily:
          type:
            - object
            - "null"
          readOnly: true
          required:
            - val
          properties:
            val:
              description: |
                Cumulated number of microflow events per 2h period for a 24h
                duration before `lastMicroflowTimestamp`.

                The array is sorted from the most recent period (index 0) to the
                oldest period.
              type: array
              items:
                type: integer
                format: int32
    DeviceLorawan:
      title: LORAWAN
      type: object
      x-requiredCreate:
        - activation
        - EUI
      x-requiredRead:
        - activation
        - EUI
        - connectivity
      required:
        - classBState
      properties:
        connectivity:
          type: string
          x-updateForbidden: true
          enum:
            - LORAWAN
          description: |
            Device connectivity
            Enumerate:
            - `LORAWAN`: LoRaWAN connectivity
            - `CELLULAR`: Cellular connectivity

            `CELLULAR` is only applicable if the
            cellular connectivity is enabled.
          default: LORAWAN
        EUI:
          type: string
          x-updateForbidden: true
          description: >
            DevEUI (16 hexadecimal characters / case insensitive but always
            converted in upper case by the server)
          example: 000000000522D8EB
        LRRs:
          type:
            - array
            - "null"
          readOnly: true
          items:
            $ref: "#/components/schemas/DeviceLorawanLRR"
        lastGeoRadius:
          type:
            - number
            - "null"
          format: float
          readOnly: true
        lastGeoTimestamp:
          type:
            - integer
            - "null"
          format: int64
          example: 1577836800000
          readOnly: true
        activation:
          enum:
            - ABP
            - OTAA
          type: string
          x-updateForbidden: true
          example: OTAA
          description: >
            Type of activation associated to the device:

            - ABP: Activation By Personalization

            - OTAA: Over The Air Activation


            **ABP**: Supported type MAC: WattecoMAC_3.1,  WattecoMAC_3.2 and LoRaMAC


            **OTAA**: Supported type MAC: WattecoMAC_3.2 and LoRaMAC
        appEUI:
          $ref: "#/components/schemas/DeviceLorawanAppEUI"
        appKey:
          type:
            - string
            - "null"
          description: >
            LoRaWAN AppKey (OTAA)


            Supported encoding modes:

            -  Clear text (hexadecimal encoding)

            -  Encrypted with HSM Application Key (AES) version specified in hsmAppKeyVersion attribute (hexadecimal encoding)

            -  Encrypted with Exchange Key (RSA) version specified in exchangeKeyVersion attribute (base64 encoding)


            **ABP**: FORBIDDEN


            **OTAA**: Local Join Server is used when provided, External Join Server is used otherwise. Join Server mode is set at device creation and cannot be updated.
          writeOnly: true
          pattern: ^[0-9a-fA-F]{32}$|^[-A-Za-z0-9+\/]{342}([-A-Za-z0-9+\/]{2}|([-A-Za-z0-9+\/]=)|(==))$
          example: 8D67B0D6359D11ACFC45AD4BB9CE2D4F
        appKeyEncryptionMode:
          type:
            - string
            - "null"
          description: |
            Mode used to encrypt the AppKey: LRC_CLUSTER_KEY or HSM_APP_KEY

            **ABP**: FORBIDDEN

            **OTAA**: OPTIONAL if Local Join Server is used
            (default value is LRC_CLUSTER_KEY), FORBIDDEN otherwise

            This property must no longer be used: it is useless and ignored.
          default: LRC_CLUSTER_KEY
          deprecated: true
        appKeys:
          type:
            - string
            - "null"
          deprecated: true
          description: |
            LoRaWAN AppSKey (ABP) XML document:
            - The root XML element is `AppSKeys`
            - The enclosed `AppSKey` XML element contains the AppSKey value (hexadecimal encoding)
            - The `AppSKey@Port` attribute must be set to `*`

            **ABP**: OPTIONAL

            Optional when the type MAC is set to `LoRaMAC` or `WattecoMAC_3.2`.
            Not used otherwise.

            **OTAA**: FORBIDDEN

            This property must no longer be used: the `appSKey` property should be used in replacement.
          pattern: ^<AppSKeys><AppSKey Port="\*">[0-9a-fA-F]{32}<\/AppSKey><\/AppSKeys>$
          example: <AppSKeys><AppSKey
            Port="*">8D67B0D6359D11ACFC45AD4BB9CE2D4F</AppSKey></AppSKeys>
          writeOnly: true
        appSKey:
          type:
            - string
            - "null"
          description: |
            LoRaWAN AppSKey (ABP) in hexadecimal encoding.

            **ABP**: OPTIONAL

            Optional when the type MAC is set to `LoRaMAC` or `WattecoMAC_3.2`.
            Not used otherwise.

            **OTAA**: FORBIDDEN
          pattern: ^[0-9a-fA-F]{32}$
          example: 8D67B0D6359D11ACFC45AD4BB9CE2D4F
          writeOnly: true
        asTransportKey:
          type:
            - object
            - "null"
          required:
            - ID
            - name
          description: >
            AS transport key directly associated with the device.


            Only applicable to OTAA devices if local Join Server with HSM protection is used.


            This attribute is FORBIDDEN if the Device is associated with an AS

            Routing Profile.


            If the authenticated user has domain restrictions, only the following

            AS transport keys can be associated with a device:

            - AS transport keys not associated with any domain

            - AS transport keys associated with domains and matching the domain
              restrictions
          properties:
            ID:
              type: string
              example: ASTK_3BC
            name:
              type: string
              readOnly: true
              example: My AS transport key
        avgRSSI:
          type:
            - number
            - "null"
          description: Average RSSI
          format: float
          readOnly: true
        avgSNR:
          type:
            - number
            - "null"
          description: Average SNR
          format: float
          readOnly: true
        classBState:
          type: integer
          description: |
            Class B state: Active (1), Inactive (0)

            Inactive (0) is returned if model type is NOT class B
          format: int32
          readOnly: true
        currentClass:
          type:
            - string
            - "null"
          enum:
            - A
            - B
            - C
            - null
          description: LoRaWAN class currently used by the Device
          readOnly: true
        debug:
          type:
            - object
            - "null"
          required:
            - allowed
            - lorawan
          properties:
            allowed:
              type: boolean
              description: |
                TRUE if user is allowed to access device debug feature
              readOnly: true
            lorawan:
              type: boolean
              description: TRUE if LoRaWAN debugging is activated
              readOnly: true
            lorawanSince:
              type:
                - integer
                - "null"
              format: int64
              example: 1577836800000
              description: Last update of LoRaWAN debugging mode, epoch time in milliseconds
              readOnly: true
        exchangeKeyVersion:
          type:
            - string
            - "null"
          description: |
            If the device is associated with an HSM group:
            - HSM Exchange Key (RSA) version used to encrypt AppKey/NwkKey

            Else:
            - TWA Exchange Key (RSA) version used to encrypt AppKey/NwkKey
          writeOnly: true
        hsmGroupID:
          $ref: "#/components/schemas/DeviceLorawanHsmGroupID"
        hsmAppKeyVersion:
          type:
            - string
            - "null"
          description: |
            HSM Application Key version used to encrypt AppKey

            **ABP**: FORBIDDEN

            **OTAA**: OPTIONAL
          writeOnly: true
        hsmNwkKeyVersion:
          type:
            - string
            - "null"
          description: |
            HSM Network Key version used to encrypt NwkKey

            **ABP**: FORBIDDEN

            **OTAA**: OPTIONAL
          writeOnly: true
          example: HAK1
        joinServer:
          $ref: "#/components/schemas/DeviceLorawanJoinServer"
        lastBatChangeBy:
          type:
            - integer
            - "null"
          format: int64
          example: 1577836800000
          description: Last estimated replacement date for the battery, epoch time in
            milliseconds
          readOnly: true
        lastBatChanged:
          type:
            - integer
            - "null"
          format: int64
          example: 1577836800000
          description: Last battery replacement date, epoch time in milliseconds
          readOnly: true
        lastBatLevel:
          type:
            - integer
            - "null"
          description: |
            Battery level:
            - 0: External power source
            - 1..254: 1=min / 254 = max
            - 255: Not able to measure the level.
          format: int32
          readOnly: true
        lastBatLevelTimestamp:
          type:
            - integer
            - "null"
          format: int64
          example: 1577836800000
          readOnly: true
        lastGeoLat:
          type:
            - number
            - "null"
          description: Network location, location radius and location timestamp
          format: float
          readOnly: true
        lastGeoLon:
          type:
            - number
            - "null"
          description: Network location, location radius and location timestamp
          format: float
          readOnly: true
        lastInstantPER:
          type:
            - number
            - "null"
          description: >
            Last instantaneous PER (Packet Error Rate) without consideration for
            LRRs.


            The instantaneous PER is computed over the 2 last distinct uplink frames as follows:

            - InstantPER = 1 – [ 2 / (FCntUp(N)  - FCntUp(N-1)  + 1)], where:
              - FCntUp(N) is the FCntUp of the last uplink frame
              - FCntUp(N-1) is the FCntUp of the previous uplink frame (excluding repetitions)
            - Example: If the two last received uplink frames have FCntUp 33 and 36, then InstantPER = 1 - [2/(36-33+1)] = 0.5 = 50% (because frames 34 & 35 were missing, so 4 frames expected but only 2 frames received).

            - A device reset/rejoin resets the InstantPER to 0
          format: float
          minimum: 0
          exclusiveMaximum: 1
          readOnly: true
        lastMeanPER:
          type:
            - number
            - "null"
          description: >
            Last mean PER (Packet Error Rate) without consideration for LRRs.


            The mean PER is computed over the full history of last distinct uplink frames as follows:

            - MeanPER = 1 - [Distinct_Pkts / (FCntUP(N) - FCntUP(M)  + 1)], where:
              - Distinct_Pkts is the number of distinct uplink frames stored in the last uplink frames history (containing up to 50 uplink frames)
              - FCntUp(N) is the FCntUp of the newest uplink frame in the last uplink frames history
              - FCntUp(M) is the FCntUp of the oldest uplink frame in the last uplink frames history
            - A device reset/rejoin resets the MeanPER to 0
          format: float
          minimum: 0
          exclusiveMaximum: 1
          readOnly: true
        lastRSSI:
          type:
            - number
            - "null"
          format: float
          readOnly: true
        lastSF:
          type:
            - integer
            - "null"
          format: int32
          readOnly: true
        lastSNR:
          type:
            - number
            - "null"
          format: float
          readOnly: true
        lastESP:
          type:
            - number
            - "null"
          format: float
          readOnly: true
          description: Last ESP
        avgESP:
          type:
            - number
            - "null"
          format: float
          readOnly: true
          description: Average ESP
        lastNbTrans:
          type:
            - number
            - "null"
          format: int32
          example: 1
          readOnly: true
          description: Last number of transmissions
        lastTxPower:
          type:
            - number
            - "null"
          format: float
          example: 8
          readOnly: true
          description: Last TX Power in dBm
        model:
          $ref: "#/components/schemas/DeviceLorawanModel"
        nwKey:
          type:
            - string
            - "null"
          description: >
            LoRaWAN FNwkSIntKey/NwkSKey (ABP)


            **ABP**: OPTIONAL


            Mandatory when the type MAC is set to LoRaMAC or WattecoMAC_3.2 Not used otherwise.


            **OTAA**: FORBIDDEN
          writeOnly: true
          pattern: ^[0-9a-fA-F]{32}$
          example: 0A28259FB60640679A5BA3CAACBDAFC6
        nwkKey:
          type:
            - string
            - "null"
          description: >
            LoRaWAN NwkKey (OTAA)


            Supported encoding modes:

            -  Clear text (hexadecimal encoding)

            -  Encrypted with HSM Network Key (AES) version specified in hsmNwkKeyVersion attribute (hexadecimal encoding)

            -  Encrypted with Exchange Key (RSA) version specified in exchangeKeyVersion attribute (base64 encoding)


            **ABP**: FORBIDDEN


            **OTAA**: MANDATORY if LoRaWAN version is 1.1 and Local Join Server is used, FORBIDDEN otherwise
          writeOnly: true
          pattern: ^[0-9a-fA-F]{32}$|^[-A-Za-z0-9+\/]{342}([-A-Za-z0-9+\/]{2}|([-A-Za-z0-9+\/]=)|(==))$
          example: 6E564CB381C98DBCB51ECBE34D0C380E
        nwkSEncKey:
          type:
            - string
            - "null"
          description: >
            LoRaWAN NwkSEncKey (ABP)


            **ABP**: OPTIONAL


            Mandatory when the type MAC is set to LoRaMAC or WattecoMAC_3.2 and LoRaWAN version is 1.1, Not used otherwise.


            **OTAA**: FORBIDDEN
          writeOnly: true
          pattern: ^[0-9a-fA-F]{32}$
          example: 494B1C70D729DEB692CECBA34773B517
        ownerToken:
          type:
            - string
            - "null"
          description: >
            Owner token proving the ownership of the device


            **ABP**: FORBIDDEN


            **OTAA**: OPTIONAL if External Join Server is used, FORBIDDEN otherwise
          writeOnly: true
          x-updateForbidden: true
          example: 461815063BED71D835178811B3169289
        payloadEncryption:
          type:
            - boolean
            - "null"
          description: TRUE when payloads are reported encrypted to Application Servers
          readOnly: true
        pingSlotPeriod:
          type:
            - integer
            - "null"
          description: Class B ping-slot period in seconds
          readOnly: true
        sNwkSIntKey:
          type:
            - string
            - "null"
          description: >
            LoRaWAN SNwkSIntKey (ABP)


            **ABP**: OPTIONAL


            Mandatory when the type MAC is set to LoRaMAC or WattecoMAC_3.2 and LoRaWAN version is 1.1, Not used otherwise.


            **OTAA**: FORBIDDEN
          writeOnly: true
          pattern: ^[0-9a-fA-F]{32}$
          example: 494B1C70D729DEB692CECBA34773B517
        verificationCode:
          deprecated: true
          type:
            - string
            - "null"
          description: >
            Verification code associated to the DevAddr/DevEUI pair (ABP device)

            or DevEUI (OTAA device) when the ADM validation code has been

            activated.


            This property must no longer be used: the associated feature is no more available in the product.
          writeOnly: true
          example: VOv1_E1832D04
    DeviceLorawanAppEUI:
      type:
        - string
        - "null"
      description: >
        LoRaWAN JoinEUI/AppEUI (16 hexadecimal characters / case insensitive but
        always converted in upper case by the server)


        Only applicable to OTAA Devices.


        Mandatory if external Join Server is used, optional otherwise.
      example: 4ABEABE89821EC98
    DeviceAppServer:
      type: object
      required:
        - ID
        - name
      properties:
        ID:
          type: string
          description: Application Server ID
          example: TWA_199906997.1972.AS
        href:
          type:
            - string
            - "null"
          description: Application Server href
          readOnly: true
          example: /thingpark/wireless/rest/subscriptions/33/appServers/1972
        name:
          type: string
          description: Application Server name
          readOnly: true
          example: AS1
    DeviceLorawanHsmGroupID:
      type:
        - string
        - "null"
      description: |
        ID of HSM group used to encrypt the AppKey.

        Only applicable to OTAA devices if local Join Server is used.
      example: HSM_ACME-OPE.25
    DeviceLorawanJoinServer:
      type:
        - string
        - "null"
      enum:
        - LOCAL
        - LOCAL_WITH_HSM
        - EXTERNAL
        - null
      description: |
        Location of the Join Server used for Device activation:
        - LOCAL: Local Join server with software encryption
        - LOCAL_WITH_HSM: Local Join server with HSM protection
        - EXTERNAL: External Join server

        Only applicable to OTAA devices.
      readOnly: true
    DeviceLorawanLRR:
      type: object
      required:
        - ID
        - RSSI
        - SNR
      properties:
        ID:
          type: string
          description: >
            Ordered list of last LRRs (max 3) that receive the last uplink
            frame.


            The best LRR is always placed at the first position.


            Note: The LRR lon/lan is not returned when the LRR ID does not match a base station in the TWA database.
          example: "10000779"
        RSSI:
          type: number
          format: float
        SNR:
          type: number
          format: float
        instantPER:
          type:
            - number
            - "null"
          description: >
            Instantaneous PER (Packet Error Rate) only considering uplink frames
            received by this LRR.


            The instantaneous PER is computed over the 2 last distinct uplink frames as follows:

            - InstantPER = 1 – [ 2 / (FCntUp(N)  - FCntUp(N-1)  + 1)], where:
              - FCntUp(N) is the FCntUp of the last uplink frame
              - FCntUp(N-1) is the FCntUp of the previous uplink frame (excluding repetitions)
            - Example: If the two last received uplink frames have FCntUp 33 and 36, then InstantPER = 1 - [2/(36-33+1)] = 0.5 = 50% (because frames 34 & 35 were missing, so 4 frames expected but only 2 frames received).

            - A device reset/rejoin resets the InstantPER to 0
          format: float
          minimum: 0
          exclusiveMaximum: 1
        ESP:
          type:
            - number
            - "null"
          format: float
        lat:
          type:
            - number
            - "null"
          format: float
        lon:
          type:
            - number
            - "null"
          format: float
    DeviceModel:
      type:
        - object
        - "null"
      required:
        - ID
        - commercialName
        - logo
      properties:
        ID:
          type: string
          description: >
            Device Profile ID


            The Device Profile must have the same connectivity than the

            Device


            LoRaWAN device:


            - If NS only mode is deactivated (external-js-opt=DEACTIVATED), the Device Profile associated with the Device can be updated only if the MAC type is the same and, for LoRaMAC type, the LoRaWAN version is compatible

            - Else if NS only mode is activated (external-js-opt=ACTIVATED), the Device Profile associated with the Device can be updated only if the MAC type is compatible
          example: SMTC/LoRaMote.2.Join
        commercialName:
          type: string
          description: Device Profile commercial name
          readOnly: true
          example: LoRaMote fw3/JOIN
        logo:
          type: string
          description: Device Profile logo href
          readOnly: true
          example: /thingpark/wireless/rest/resources/files/logo/deviceProfile/42
      description: >
        Device Profile


        When updated, the MAC type of the new Device Profile must be the same than the current one
    DeviceLorawanModel:
      type:
        - object
        - "null"
      allOf:
        - $ref: "#/components/schemas/DeviceModel"
        - type: object
          required:
            - typeMAC
            - type
          properties:
            macMajorVersion:
              type:
                - integer
                - "null"
              readOnly: true
              description: |
                LoRaWAN MAC major version implemented by the device:
                - 0: LoRaWAN 1.x
              format: int32
            macMinorVersion:
              type:
                - integer
                - "null"
              readOnly: true
              description: |
                LoRaWAN MAC minor version implemented by the device:
                - 3: LoRaWAN 1.0.0/1.0.1
                - 4: LoRaWAN 1.0.2
                - 5: LoRaWAN 1.0.3
                - 6: LoRaWAN 1.0.4
                - 10: LoRaWAN 1.1
              format: int32
            type:
              enum:
                - A
                - B
                - C
              type: string
              readOnly: true
              description: >
                Type of Device:

                  - 'A': Class A (Bi-directional end-devices with RIT)

                  - 'B': Class B (Bi-directional end-devices with synchronized
                  receive slots)

                - 'C': Class C (Bi-directional end-devices with maximal receive slots)
            typeMAC:
              enum:
                - LoRaMAC
                - 802.15.4
                - WattecoMAC_3.1
                - WattecoMAC_3.2
              type: string
              readOnly: true
              description: |
                MAC  layer of the Device :
                - 'LoRaMAC': LoRa MAC layer
                - '802.15.4': 802.15.4 MAC layer (DEPRECATED)
                - 'WattecoMAC_3.1': Watteco 3.1 MAC layer (DEPRECATED)
                - 'WattecoMAC_3.2': Watteco 3.2 MAC layer (DEPRECATED)
            canOperateAsRelay:
              type:
                - boolean
                - "null"
              description: |
                Indicates if the device can act as a forwarding relay between
                trusted end-devices and the network. Only applicable when
                `connectivity` is set to `LORAWAN`.
              default: false
              readOnly: true
    DeviceProfiles:
      type: object
      required:
        - briefs
        - more
      properties:
        briefs:
          type: array
          items:
            type: object
            required:
              - commercialName
              - typeMAC
              - ID
              - vendor
              - connectivity
            properties:
              ID:
                type: string
                description: ID of the device profile
                example: LORA/GenericA.1_ETSI_Rx2-SF12
              commercialName:
                type: string
                description: B2C name of device profile
                example: LoRaWAN 1.0 - class A
              connectivity:
                enum:
                  - LORAWAN
                  - CELLULAR
                type: string
                description: |
                  Device Profile connectivity:
                  - `LORAWAN`: LoRaWAN connectivity
                  - `CELLULAR`: Cellular connectivity

                  `CELLULAR` is only applicable if the
                  cellular connectivity is enabled.
                example: LORAWAN
              macMajorVersion:
                type:
                  - integer
                  - "null"
                description: |
                  LoRaWAN MAC major version implemented by the device:
                  - 0: LoRaWAN 1.x
                format: int32
                example: 0
              macMinorVersion:
                type:
                  - integer
                  - "null"
                description: |
                  LoRaWAN MAC minor version implemented by the device:
                  - 3: LoRaWAN 1.0.0/1.0.1
                  - 4: LoRaWAN 1.0.2
                  - 5: LoRaWAN 1.0.3
                  - 6: LoRaWAN 1.0.4
                  - 10: LoRaWAN 1.1
                format: int32
                example: 3
              typeMAC:
                enum:
                  - LoRaMAC
                  - 802.15.4
                  - WattecoMAC_3.1
                  - WattecoMAC_3.2
                  - null
                type:
                  - string
                  - "null"
                description: |
                  MAC  layer of the Device :
                  - 'LoRaMAC': LoRa MAC layer
                  - '802.15.4': 802.15.4 MAC layer (DEPRECATED)
                  - 'WattecoMAC_3.1': Watteco 3.1 MAC layer (DEPRECATED)
                  - 'WattecoMAC_3.2': Watteco 3.2 MAC layer (DEPRECATED)
                example: LoRaMAC
              vendor:
                type: object
                required:
                  - ID
                properties:
                  ID:
                    type: string
                    description: ID of the device vendor
                    example: generic
                  name:
                    type:
                      - string
                      - "null"
                    description: >
                      Name of the device vendor


                      This property must no longer be used: the property `commercialName` must be used in replacement.
                    deprecated: true
                    example: Generic
                  commercialName:
                    type:
                      - string
                      - "null"
                    description: Commercial name of the device vendor
                    example: Generic
                  commercialDescription:
                    type:
                      - string
                      - "null"
                    description: Commercial description of the device vendor
                    example: LoRaWAN generic devices
              defaultIsmBands:
                type:
                  - array
                  - "null"
                description: >
                  List of ISM bands supported by the device profile.

                  If the list of device profiles is filtered by ISM bands, this list is an intersection between requested ISM bands and supported ISM bands.
                items:
                  type: object
                  properties:
                    ID:
                      $ref: "#/components/schemas/IsmBandID"
                    name:
                      $ref: "#/components/schemas/IsmBandName"
              motionModelIndicator:
                enum:
                  - NEAR_STATIC
                  - WALKING_SPEED
                  - BIKE_SPEED
                  - VEHICLE_SPEED
                  - RANDOM
                  - null
                type:
                  - string
                  - "null"
                description: >
                  The motion indicator provides an indication on the maximal
                  speed

                  of the node
              canOperateAsRelay:
                type:
                  - boolean
                  - "null"
                description: |
                  Indicates if the device can act as a forwarding relay between
                  trusted end-devices and the network. Only applicable when
                  `connectivity` is set to `LORAWAN`.
                default: false
        more:
          $ref: "#/components/schemas/More"
    DeviceTag:
      type: object
      required:
        - name
      properties:
        name:
          $ref: "#/components/schemas/TagName"
    DevicesClusters:
      type: object
      required:
        - count
        - clusters
      properties:
        count:
          description: Total number of devices in the bounding box
          type: integer
        clusters:
          type: array
          items:
            type: object
            description: A group a devices close to each other.
            required:
              - count
              - location
              - bbox
            properties:
              count:
                type: integer
                description: Number of devices grouped in the cluster. A cluster may contain
                  only one device.
                minimum: 1
              location:
                $ref: "#/components/schemas/Coordinates"
              bbox:
                description: The bounding box containing all devices of the cluster.
                type: object
                required:
                  - northeast
                  - southwest
                properties:
                  northeast:
                    $ref: "#/components/schemas/Coordinates"
                  southwest:
                    $ref: "#/components/schemas/Coordinates"
                example:
                  northeast:
                    lat: 51.686
                    lng: 0.236
                  southwest:
                    lat: 51.28
                    lng: -0.489
              item:
                $ref: "#/components/schemas/DeviceBrief"
      example:
        count: 31
        clusters:
          - count: 10
            location:
              lat: 49.1885797
              lng: -0.2925326
            bbox:
              northeast:
                lat: 49.1891392559
                lng: -0.2931879108
              southwest:
                lat: 49.1879542168
                lng: -0.2912362304
          - count: 20
            location:
              lat: 48.8752245
              lng: 2.3324039
            bbox:
              northeast:
                lat: 48.8757421684
                lng: 2.3323493691
              southwest:
                lat: 48.8745461124
                lng: 2.3347097131
          - count: 1
            location:
              lat: 48.7586084
              lng: -3.4667419
            bbox:
              northeast:
                lat: 48.7586084
                lng: -3.4667419
              southwest:
                lat: 48.7586084
                lng: -3.4667419
            item:
              EUI: 000000000522D8EB
              activation: OTAA
              alarm1: 1
              alarm2: 0
              alarm3: 0
              alarm4: 0
              alarm5: 0
              alarm6: 0
              alarmCount: 1
              alarmLevel: 1
              avgESP: -53.578606
              avgRSSI: -33
              avgSNR: -20.540417
              bestLRR:
                ID: 100037D7
              connectivity: LORAWAN
              creationDate: 1593417936200
              currentClass: A
              firstUpTimestamp: 1593418188000
              healthState: ACTIVE
              historyDwDaily:
                val:
                  - 248
                  - 374
                  - 0
                  - 0
                  - 0
                  - 0
                  - 0
                  - 0
                  - 0
                  - 0
                  - 0
                  - 0
              historyUpDaily:
                val:
                  - 248
                  - 374
                  - 0
                  - 0
                  - 0
                  - 0
                  - 0
                  - 0
                  - 0
                  - 0
                  - 0
                  - 0
              href: /thingpark/wireless/rest/subscriptions/33/devices/2056
              lastBatLevel: 129
              lastBatLevelTimestamp: 1624640519000
              lastDwTimestamp: 1624640521000
              lastESP: -53.578598
              lastInstantPER: 0
              lastMeanPER: 0
              lastNbTrans: 3
              lastRSSI: -33
              lastSF: 12
              lastSNR: -20.540417
              lastTxPower: 16
              lastUpTimestamp: 1624640519000
              lat: 48.7586084
              lon: -3.4667419
              markerID: 100
              model:
                ID: ABEE/DEABE202-152EU.1.0.2b_ETSI_Rx2-SF12
                commercialName: Industrial Tracker
                logo: /thingpark/wireless/rest/resources/files/logo/deviceProfile/6298
                connectivity: LORAWAN
                canOperateAsRelay: false
              motionIndicator: RANDOM
              name: My device
              nwAddress: 0070C5BB
              occContext:
                lastUpdate: 1618912282943
                version: 0
                who: John Doe
              payloadEncryption: false
              tags: []
              vendor:
                commercialDescription: Abeeway offers a complete low-power geolocation solution
                  for the Internet of Things, based on a  flexible
                  multi-technology location system optimized for low-power
                  LoRaWAN communication, using GPS, own breakthrough Low Power
                  GPS (LP-GPS) and WiFi sniffing; featuring the
                  highest-performance tracking devices available on the market.
                commercialName: Abeeway
                logo: /thingpark/wireless/rest/resources/files/logo/deviceVendor/424
                name: Abeeway
    DeviceHealthState:
      enum:
        - INIT
        - ACTIVE
        - RF_CNX_ERROR
        - SUSPENDED
      type: string
      readOnly: true
      description: |
        Device health state:
        - INIT: The device has been created or resumed after suspension, but has
          not yet communicated with the network server since then
        - ACTIVE: The device is connected to the network, transmitting and
          receiving packets
        - RF_CNX_ERROR: The device has lost its network connection
        - SUSPENDED: The device has been suspended, all its packets are ignored
          by the network server
    DevicesTag:
      type: object
      properties:
        devEUIs:
          type:
            - array
            - "null"
          items:
            type: string
          description: |
            Only tags/untags devices matching these DevEUIs (exact match).
          example:
            - "2504201820020000"
            - "2504201820020001"
      allOf:
        - $ref: "#/components/schemas/DeviceTag"
    DeviceTags:
      type: object
      required:
        - briefs
      properties:
        briefs:
          type: array
          items:
            type: object
            required:
              - name
              - href
            properties:
              name:
                $ref: "#/components/schemas/TagName"
              href:
                type: string
          example:
            - name: tag1
              href: /thingpark/wireless/rest/subscriptions/33/devices/2056/tags/21
            - name: tag2
              href: /thingpark/wireless/rest/subscriptions/33/devices/2056/tags/84
            - name: tag3
              href: /thingpark/wireless/rest/subscriptions/33/devices/2056/tags/670
    DevicesDomains:
      type: object
      required:
        - devEUIs
      properties:
        addedDomains:
          type:
            - array
            - "null"
          description: |
            List of domains to add to the list of Devices. The list cannot
            contain more than one domain for a given group and cannot contain a
            domain belonging to a group used in `removedDomains` list.
          items:
            type: object
            allOf:
              - $ref: "#/components/schemas/Domain"
              - type: object
                description: |
                  The domain must exist in the subscriber account and must be in
                  ACTIVE state to be used. Any existing domain belonging to the
                  same group is replaced by the new one.
          example:
            - name: France/Paris
              group:
                name: Site
        removedDomains:
          type:
            - array
            - "null"
          description: |
            List of domains to remove from the list of Devices. The list may
            contain several domains for a given group but cannot contain a
            domain belonging to a group used in `addedDomains` list.
          items:
            type: object
            allOf:
              - $ref: "#/components/schemas/Domain"
              - type: object
                description: |
                  No error is returned if the domain is not associated with a
                  subset or all targeted Devices.
          example:
            - name: Energy
              group:
                name: Vertical
            - name: Location
              group:
                name: Vertical
        devEUIs:
          type: array
          items:
            type: string
          minItems: 1
          description: >
            Add or remove domains on devices matching these DevEUIs (exact
            match).
          example:
            - "2504201820020000"
            - "2504201820020001"
    DeviceVendors:
      type: object
      required:
        - briefs
        - more
      properties:
        briefs:
          type: array
          items:
            type: object
            required:
              - ID
            properties:
              ID:
                type: string
                description: ID of the device vendor
              logo:
                type:
                  - string
                  - "null"
                description: Logo HREF of the device vendor
              name:
                type:
                  - string
                  - "null"
                description: >
                  Name of the device vendor


                  This property must no longer be used: the property `commercialName` must be used in replacement.
                deprecated: true
              commecialName:
                type:
                  - string
                  - "null"
                description: Commercial name of the device vendor
              commercialDescription:
                type:
                  - string
                  - "null"
                description: Commercial description of the device vendor
        more:
          $ref: "#/components/schemas/More"
    DeviceBrief:
      type:
        - object
        - "null"
      required:
        - name
        - model
        - vendor
        - EUI
        - healthState
        - historyUpDaily
        - historyDwDaily
        - alarmLevel
        - alarmCount
        - href
        - creationDate
        - alarm1
        - alarm2
        - alarm3
        - alarm4
        - alarm5
        - alarm6
      oneOf:
        - $ref: "#/components/schemas/DevicesBriefLorawan"
        - $ref: "#/components/schemas/DevicesBriefCellular"
      properties:
        EUI:
          type: string
          description: >
            DevEUI (16 hexadecimal characters / always converted in upper case
            by the server)
        alarm1:
          type: integer
          description: Number of CLEARED alarms not ACKED
          format: int32
          example: 9
        alarm2:
          type: integer
          description: Number of INDETERMINATE alarms not ACKED
          format: int32
          example: 0
        alarm3:
          type: integer
          description: Number of WARNING alarms not ACKED
          format: int32
          example: 1
        alarm4:
          type: integer
          description: Number of MINOR alarms not ACKED
          format: int32
          example: 0
        alarm5:
          type: integer
          description: Number of MAJOR alarms not ACKED
          format: int32
          example: 1
        alarm6:
          type: integer
          description: Number of CRITICAL alarms not ACKED
          format: int32
          example: 0
        alarmCount:
          type: integer
          description: Total number of alarm not acked
          format: int32
        alarmLevel:
          type: integer
          description: Highest not acked alarm level (6 ... 1) or 0 when the device is not
            associated with not acked alarm
          format: int32
        appServers:
          type:
            - array
            - "null"
          description: |
            List of Application Servers directly associated with the device
          items:
            $ref: "#/components/schemas/DeviceAppServer"
        creationDate:
          type: integer
          format: int64
          example: 1577836800000
          description: Epoch time in milliseconds when the device was created.
        customerAdminData:
          type:
            - string
            - "null"
          description: >
            Free administrative data associated to the device (e.g. floor

            number, building, addresss...).


            Note: Null is returned after the upgrade to ThingPark 7.0 until the device transmit one uplink frame.
        domains:
          $ref: "#/components/schemas/Domains"
        driverMetadata:
          type:
            - object
            - "null"
          description: ThingPark X metadata
          required:
            - application
          properties:
            application:
              type: string
              description: |
                TPX Protocol Identifier
                Syntax: `<producerId>:<moduleId>:<version>`
              example: abeeway:asset-tracker:1
        firstUpTimestamp:
          type:
            - integer
            - "null"
          format: int64
          example: 1577836800000
          description: First contact timestamp with the ThingPark Infrastructure, epoch
            time in milliseconds.
        healthState:
          $ref: "#/components/schemas/DeviceHealthState"
        historyDwDaily:
          type: object
          required:
            - val
          properties:
            val:
              description: |
                Cumulated number of downlink frames per 2h period for a 24h
                duration before `lastDwTimestamp`.

                The array is sorted from the most recent period (index 0) to the
                oldest period.
              type: array
              items:
                type: integer
                format: int32
        historyUpDaily:
          type: object
          required:
            - val
          properties:
            val:
              description: |
                Cumulated number of uplink frames per 2h period for a 24h
                duration before `lastUpTimestamp`.

                The array is sorted from the most recent period (index 0) to the
                oldest period.
              type: array
              items:
                type: integer
                format: int32
        href:
          type: string
        lastDwTimestamp:
          type:
            - integer
            - "null"
          format: int64
          example: 1577836800000
          description: Timestamp of the last downlink frame, epoch time in milliseconds
        lastUpTimestamp:
          type:
            - integer
            - "null"
          format: int64
          example: 1577836800000
          description: Timestamp of the last uplink frame, epoch time in milliseconds
        lat:
          type:
            - number
            - "null"
          description: Network or administrative device location (according to the type of
            location currently activated)
          format: float
        lon:
          type:
            - number
            - "null"
          description: Network or administrative device location (according to the type of
            location currently activated)
          format: float
        markerID:
          deprecated: true
          type:
            - integer
            - "null"
          description: >
            Google map marker ID


            This property must no longer be used: it is no more used in ThingPark UI.
          format: int32
        model:
          type: object
          required:
            - ID
            - commercialName
            - logo
          properties:
            ID:
              type: string
              description: Device Profile ID
              example: SMTC/LoRaMote.2.Join
            commercialName:
              type: string
              description: Device Profile commercial name
              example: LoRaMote fw3/JOIN
            logo:
              type: string
              description: Device Profile logo href
              example: /thingpark/wireless/rest/resources/files/logo/deviceProfile/42
            canOperateAsRelay:
              type:
                - boolean
                - "null"
              description: |
                Indicates if the device can act as a forwarding relay between
                trusted end-devices and the network. Only applicable when
                `connectivity` is set to `LORAWAN`.
              default: false
        motionIndicator:
          enum:
            - NEAR_STATIC
            - WALKING_SPEED
            - BIKE_SPEED
            - VEHICLE_SPEED
            - RANDOM
            - null
          type:
            - string
            - "null"
          description: >
            Motion indicator of the device:

            - NEAR_STATIC

            - WALKING_SPEED

            - BIKE_SPEED

            - VEHICLE_SPEED

            - RANDOM


            Note: Null is returned after the upgrade to ThingPark 7.0 until the device transmit one uplink frame.
        name:
          type: string
        networkSubscription:
          type:
            - object
            - "null"
          description: Network subscription associated with the device
          required:
            - ID
            - supplier
          properties:
            ID:
              type: string
              description: ID of the network subscription
              example: acme-cs/production
            commercialName:
              type:
                - string
                - "null"
              description: Name of the network subscription
              example: Basic Unicast
            supplier:
              type: object
              required:
                - ID
              properties:
                ID:
                  type: string
                  description: ID of the associated connectivity supplier
                  example: acme-cs
                commercialName:
                  type:
                    - string
                    - "null"
                  description: Name of the associated connectivity supplier
                  example: ACME Connectivity Supplier
            nwGeolocalization:
              type:
                - boolean
                - "null"
              description: |
                True if network geolocation is enabled

                **Only applicable when connectivity is 'LORAWAN'**
            prAllowed:
              type:
                - boolean
                - "null"
              description: |
                True if passive roaming is allowed

                **Only applicable when connectivity is 'LORAWAN'**
        nwAddress:
          type:
            - string
            - "null"
          description: >
            **LoRaWAN device**

            DevAddr (8 hexadecimal characters / always converted in upper case by the server)


            **Cellular device**

            Device IP address
        occContext:
          type:
            - object
            - "null"
          properties:
            lastUpdate:
              type:
                - integer
                - "null"
              format: int64
              description: >
                Timestamp of last device update, epoch time in milliseconds.


                Note: Null is returned after the upgrade to ThingPark 7.0 until the device transmit one uplink frame.
              example: 1577836800000
            version:
              minimum: 0
              type:
                - integer
                - "null"
              example: 1
            who:
              type:
                - string
                - "null"
              description: >
                Name of last device updater.


                Note: Null is returned after the upgrade to ThingPark 7.0 until the device transmit one uplink frame.
              example: John Doe
        relay:
          type:
            - object
            - "null"
          required:
            - enabled
          properties:
            enabled:
              type: boolean
              description: >
                True if the relay activity is enabled for this device. Only
                applicable when

                `connectivity` is set to `LORAWAN` and `model.canOperateAsRelay` is set to true.
              example: false
        tags:
          type:
            - array
            - "null"
          items:
            type: object
            required:
              - name
            properties:
              name:
                $ref: "#/components/schemas/TagName"
          example:
            - name: tag1
            - name: tag2
            - name: tag3
        vendor:
          type: object
          required:
            - logo
          properties:
            logo:
              type: string
              description: Device vendor logo HREF
            name:
              type:
                - string
                - "null"
              description: >
                Device vendor name


                This property must no longer be used: the property `commercialName` must be used in replacement.
              deprecated: true
            commercialName:
              type:
                - string
                - "null"
              description: Device vendor commercial name
            commercialDescription:
              type:
                - string
                - "null"
              description: Device vendor commercial description
      discriminator:
        propertyName: connectivity
        mapping:
          CELLULAR: "#/components/schemas/DevicesBriefCellular"
          LORAWAN: "#/components/schemas/DevicesBriefLorawan"
    Devices:
      type: object
      required:
        - briefs
        - now
        - more
        - count
      properties:
        briefs:
          type: array
          items:
            $ref: "#/components/schemas/DeviceBrief"
        more:
          $ref: "#/components/schemas/More"
        cursors:
          type:
            - object
            - "null"
          properties:
            last:
              type:
                - string
                - "null"
              description: |
                Cursor of the last item of the current page. This cursor can be
                used to retrieve the next page using `pageAfter` query
                parameter.

                Only returned if sort by DevEUI is used and a next page
                exists.
              example: eyJFVUkiOiIwMDAwMDAwMDA1MjJEOEVCIn0=
        now:
          type: string
          description: Current time of the server
          format: date-time
        count:
          type: integer
          description: Total number of matching devices
          example: 32
    DevicesBriefCellular:
      title: CELLULAR
      type: object
      required:
        - connectivity
        - sim
      properties:
        connectivity:
          enum:
            - CELLULAR
          type: string
          description: |
            Device connectivity
            - `LORAWAN`: LoRaWAN connectivity
            - `CELLULAR`: Cellular connectivity

            `CELLULAR` is only applicable if the
            cellular connectivity is enabled.
        lastIMEI:
          type:
            - string
            - "null"
          description: |
            IMEI of the last received message mode packet or microflow.
            The 15 digits are returned.
          example: "862156804039920"
        lastIMSI:
          type:
            - string
            - "null"
          description: |
            IMSI of the last received message mode packet or microflow.
          example: "208930000000102"
        lastMSISDN:
          type:
            - string
            - "null"
          description: |
            MSISDN of the last received message mode packet or microflow.
          example: "33612345678"
        lastMicroflowTimestamp:
          type:
            - integer
            - "null"
          format: int64
          example: 1577836800000
          description: Timestamp of the last microflow event, epoch time in milliseconds
        historyMicroflowDaily:
          type:
            - object
            - "null"
          required:
            - val
          properties:
            val:
              description: |
                Cumulated number of microflow events per 2h period for a 24h
                duration before `lastMicroflowTimestamp`.

                The array is sorted from the most recent period (index 0) to the
                oldest period.
              type: array
              items:
                type: integer
                format: int32
        networkContext:
          type:
            - object
            - "null"
          required:
            - ID
          properties:
            ID:
              type: string
              example: 1AF3B
            name:
              type:
                - string
                - "null"
              example: My network context
        sim:
          type: object
          required:
            - ID
            - type
          properties:
            ID:
              type: string
              description: >
                The IMSI, ICCID or eID of the SIM card. This property is
                required

                unless the deprecated property `imsi` is provided.


                Forbidden if HSS provisioning is not activated in operator settings
              examples:
                - "460004777770001"
                - "89208013535718672291"
                - "89345678912345678912345678912370"
            type:
              type: string
              enum:
                - SINGLE_IMSI
                - MULTI_IMSI
                - ESIM
    DevicesBriefLorawan:
      title: LORAWAN
      type:
        - object
        - "null"
      required:
        - connectivity
      properties:
        connectivity:
          enum:
            - LORAWAN
          type: string
          description: |
            Device connectivity
            - `LORAWAN`: LoRaWAN connectivity
            - `CELLULAR`: Cellular connectivity

            `CELLULAR` is only applicable if the
            cellular connectivity is enabled.
        activation:
          enum:
            - ABP
            - OTAA
            - null
          type:
            - string
            - "null"
          example: OTAA
          description: >
            Type of activation associated to the device:

            - ABP: Activation By Personalization

            - OTAA: Over The Air Activation


            Note: Null is returned after the upgrade to ThingPark 7.0 until the device transmit one uplink frame.
        appEUI:
          $ref: "#/components/schemas/DeviceLorawanAppEUI"
        asTransportKey:
          type:
            - object
            - "null"
          required:
            - ID
            - name
          description: >
            AS transport key directly associated with the device.


            Only applicable to OTAA devices if local Join Server with HSM protection is used.
          properties:
            ID:
              type: string
              example: ASTK_3BC
            name:
              type: string
              example: My AS transport key
        avgRSSI:
          type:
            - number
            - "null"
          description: Average RSSI
          format: float
        avgSNR:
          type:
            - number
            - "null"
          description: Average SNR
          format: float
        bestLRR:
          type:
            - object
            - "null"
          properties:
            ID:
              type:
                - string
                - "null"
              description: Best LRR ID
        currentClass:
          type:
            - string
            - "null"
          enum:
            - A
            - B
            - C
            - null
          description: LoRaWAN class currently used by the Device
        hsmGroupID:
          $ref: "#/components/schemas/DeviceLorawanHsmGroupID"
        joinServer:
          $ref: "#/components/schemas/DeviceLorawanJoinServer"
        lastBatLevel:
          type:
            - integer
            - "null"
          description: |
            Battery level:
            - 0: External power source
            - 1..254: 1=min / 254 = max
            - 255: Not able to measure the level.
          format: int32
        lastBatLevelTimestamp:
          type:
            - integer
            - "null"
          format: int64
          example: 1577836800000
        lastInstantPER:
          type:
            - number
            - "null"
          description: >
            Last instantaneous PER (Packet Error Rate) without consideration for
            LRRs.


            The instantaneous PER is computed over the 2 last distinct uplink frames as follows:

            - InstantPER = 1 – [ 2 / (FCntUp(N)  - FCntUp(N-1)  + 1)], where:
              - FCntUp(N) is the FCntUp of the last uplink frame
              - FCntUp(N-1) is the FCntUp of the previous uplink frame (excluding repetitions)
            - Example: If the two last received uplink frames have FCntUp 33 and 36, then InstantPER = 1 - [2/(36-33+1)] = 0.5 = 50% (because frames 34 & 35 were missing, so 4 frames expected but only 2 frames received).

            - A device reset/rejoin resets the InstantPER to 0
          format: float
          minimum: 0
          exclusiveMaximum: 1
        lastMeanPER:
          type:
            - number
            - "null"
          description: >
            Last mean PER (Packet Error Rate) without consideration for LRRs.


            The mean PER is computed over the full history of last distinct uplink frames as follows:

            - MeanPER = 1 - [Distinct_Pkts / (FCntUP(N) - FCntUP(M)  + 1)], where:
              - Distinct_Pkts is the number of distinct uplink frames stored in the last uplink frames history (containing up to 50 uplink frames)
              - FCntUp(N) is the FCntUp of the newest uplink frame in the last uplink frames history
              - FCntUp(M) is the FCntUp of the oldest uplink frame in the last uplink frames history
            - A device reset/rejoin resets the MeanPER to 0
          format: float
          minimum: 0
          exclusiveMaximum: 1
        lastRSSI:
          type:
            - number
            - "null"
          format: float
        lastSF:
          type:
            - integer
            - "null"
          description: Last spreading factor
          format: int32
        lastSNR:
          type:
            - number
            - "null"
          format: float
        lastESP:
          type:
            - number
            - "null"
          format: float
          description: Last ESP
        avgESP:
          type:
            - number
            - "null"
          format: float
          description: Average ESP
        lastNbTrans:
          type:
            - number
            - "null"
          format: int32
          example: 1
          description: Last number of transmissions
        lastTxPower:
          type:
            - number
            - "null"
          format: float
          example: 8
          description: Last TX Power in dBm
        payloadEncryption:
          type:
            - boolean
            - "null"
          description: TRUE when payloads are reported encrypted to Application Servers
        radius:
          type:
            - number
            - "null"
          description: >
            Network radius (only for network location). Never filled for an
            administrative location.
          format: float
    Domain:
      type: object
      description: |
        The domain must exist in the subscriber account and must be in `ACTIVE`
        state to be used.
      required:
        - name
        - group
      properties:
        name:
          type: string
          description: Domain name
          pattern: ^((?!\x20)[^\x00-\x1F\x2F\x3A\x3C\x3E\x7F]{1,20}(?<!\x20)\/){0,4}(?!\x20)[^\x00-\x1F\x2F\x3A\x3C\x3E\x7F]{1,20}(?<!\x20)$
          example: France/Paris
        group:
          type: object
          required:
            - name
          properties:
            name:
              type: string
              description: Domain group name
              pattern: ^(?!\x20)[^\x00-\x1F\x3A\x3C\x3E\x7F]{1,20}(?<!\x20)$
              example: Site
    Domains:
      type:
        - array
        - "null"
      description: |
        List of associated domains. The list cannot contain more than one domain
        for a given group.
      items:
        $ref: "#/components/schemas/Domain"
      example:
        - name: France/Paris
          group:
            name: Site
        - name: Location
          group:
            name: Vertical
    DomainRestrictions:
      type:
        - object
        - "null"
      description: |
        User's domain restrictions:
        - If no domain restrictions are defined, the user can access all
          cross-domain resources and all domain-specific resources
        - Else, the user can access all cross-domain resources and only
          domain-specific resources matching the domain restrictions
      required:
        - and
      properties:
        and:
          type: array
          description: |
            A resource matches if it matches all `and` items.
          items:
            type: object
            description: |
              A resource matches if it is associated with a domain satisfying
              the following requirements:
              - The group name of the resource domain is `group.name` (exact
                match)
              - If `type` is `PREFIX`:
                - The name of the resource domain is prefixed with `name`
              - Else: (`type` is `FULL`)
                - The name of the resource domain is `name` (exact match)
            required:
              - type
              - name
              - group
            properties:
              type:
                type: string
                enum:
                  - FULL
                  - PREFIX
                description: |
                  Type of domain restriction:
                  - `FULL`: restriction on full domain
                  - `PREFIX`: restriction on domain prefix
                example: FULL
              name:
                type: string
                description: Name of the full domain or domain prefix
                pattern: ^((?!\x20)[^\x00-\x1F\x2F\x3A\x3C\x3E\x7F]{1,20}(?<!\x20)\/){0,4}(?!\x20)[^\x00-\x1F\x2F\x3A\x3C\x3E\x7F]{1,20}(?<!\x20)$
                example: France/Caen
              group:
                type: object
                description: |
                  Domain group associated with the domain restriction
                required:
                  - name
                properties:
                  name:
                    type: string
                    description: Name of the domain group
                    pattern: ^(?!\x20)[^\x00-\x1F\x3A\x3C\x3E\x7F]{1,20}(?<!\x20)$
                    example: Site
            minItems: 1
          example:
            - type: PREFIX
              name: France
              group:
                name: Site
            - type: FULL
              name: Energy
              group:
                name: Vertical
    Drivers:
      type: array
      items:
        type: object
        required:
          - application
          - id
          - moduleId
          - private
          - producerId
          - source
          - type
          - version
        properties:
          application:
            type: object
            description: TPX Protocol Identifier
            required:
              - moduleId
              - producerId
              - version
            properties:
              moduleId:
                type: string
              producerId:
                type: string
              version:
                type: string
          decodedDownlinksSequenceWoError:
            type:
              - integer
              - "null"
            format: int64
            description: The number of consecutive downlinks decoded without error
          decodedUplinksSequenceWoError:
            type:
              - integer
              - "null"
            format: int64
            description: The number of consecutive uplinks decoded without error
          description:
            type:
              - string
              - "null"
            description: The description of the driver
          encodedDownlinksSequenceWoError:
            type:
              - integer
              - "null"
            format: int64
            description: The number of consecutive downlink encoded without error
          id:
            type: string
            description: The unique driver identifier
          moduleId:
            type: string
            description: The moduleId of the driver
          name:
            type:
              - string
              - "null"
            description: The name of the driver
          private:
            type: boolean
            description: Indicates if the source code is private or not
          producerId:
            type: string
            description: The producerId of the driver
          source:
            type: string
            enum:
              - custom
              - system
          type:
            type: string
            enum:
              - thingpark-x-java
              - thingpark-x-js
              - ttn
          version:
            type: string
            description: The version of the driver
      example:
        - private: true
          id: abeeway:asset-tracker:3
          name: asset tracker js driver
          producerId: abeeway
          moduleId: asset-tracker
          source: system
          version: 3.0.0
          application:
            producerId: abeeway
            moduleId: asset-tracker
            version: "2"
          type: thingpark-x-js
        - private: true
          id: actility:a:2
          name: Sensing Labs SenlabA driver
          producerId: actility
          moduleId: a
          source: system
          version: 2.5.1
          application:
            producerId: senlab
            moduleId: a
            version: "1"
          type: thingpark-x-js
        - private: false
          id: actility:adeunis-analog:1
          name: Adeunis Analog v2 driver
          producerId: actility
          moduleId: adeunis-analog
          source: system
          version: 1.1.3
          application:
            producerId: adeunis
            moduleId: analog
            version: "2"
          type: thingpark-x-js
    Error:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: integer
          format: int32
          example: 25
        message:
          type: string
          example: unknown error
    FramesDevice:
      type: object
      required:
        - briefs
        - now
      properties:
        briefs:
          type: array
          items:
            type: object
            required:
              - type
              - timestamp
            properties:
              bitrate:
                type:
                  - number
                  - "null"
                description: |
                  Bitrate associated to the frame

                  Only applies to uplink frames (type=0) and downlink frames
                  (type=1)
                format: float
              cellID:
                type:
                  - string
                  - "null"
                description: |
                  Microflow Cell-ID

                  Only applies to microflow events (type=4)
              deliveryStatus:
                type:
                  - integer
                  - "null"
                description: |
                  Delivery status of the frame: Sent (1) or Failed (0)

                  Only applies to downlink frames (type=1)
                format: int32
              duration:
                type:
                  - integer
                  - "null"
                description: |
                  Microflow duration in seconds

                  Only applies to microflow events (type=4)
                format: int32
              instantPER:
                type:
                  - number
                  - "null"
                description: >
                  Instantaneous PER (Packet Error Rate) computed upon reception
                  of this uplink frame. Only applies to uplink frames (type=0).

                  - When lrrID query parameter is not specified: instantaneous PER without consideration for LRRs.

                  - When lrrID query parameter is specified: instantaneous PER only considering uplink frames received by the LRR identified by this lrrID.


                  The instantaneous PER is computed over the 2 last distinct uplink frames as follows:

                  - InstantPER = 1 – [ 2 / (FCntUp(N)  - FCntUp(N-1)  + 1)], where:
                    - FCntUp(N) is the FCntUp of the last uplink frame
                    - FCntUp(N-1) is the FCntUp of the previous uplink frame (excluding repetitions)
                  - Example: If the two last received uplink frames have FCntUp 33 and 36, then InstantPER = 1 - [2/(36-33+1)] = 0.5 = 50% (because frames 34 & 35 were missing, so 4 frames expected but only 2 frames received).

                  - A device reset/rejoin resets the InstantPER to 0
                format: float
                minimum: 0
                exclusiveMaximum: 1
              late:
                type:
                  - boolean
                  - "null"
                description: >
                  Indicate that this is a late reporting of an uplink frame from
                  the long term queue.


                  Only applies to uplink frames (type=0)
              meanPER:
                type:
                  - number
                  - "null"
                description: >
                  Mean PER (Packet Error Rate) computed upon reception of this
                  uplink frame without consideration for LRRs. Only applies to
                  uplink frames (type=0). Only returned when lrrID query
                  parameter is not specified.


                  The mean PER is computed over the full history of last distinct uplink frames as follows:

                  - MeanPER = 1 - [Distinct_Pkts / (FCntUP(N) - FCntUP(M)  + 1)], where:
                    - Distinct_Pkts is the number of distinct uplink frames stored in the last uplink frames history (containing up to 50 uplink frames)
                    - FCntUp(N) is the FCntUp of the newest uplink frame in the last uplink frames history
                    - FCntUp(M) is the FCntUp of the oldest uplink frame in the last uplink frames history
                  - A device reset/rejoin resets the MeanPER to 0
                format: float
                minimum: 0
                exclusiveMaximum: 1
              overflow:
                type:
                  - boolean
                  - "null"
                description: |
                  Network subscription overflow indicator

                  Only applies to uplink frames (type=0) and downlink frames
                  (type=1)
              rssi:
                type:
                  - number
                  - "null"
                description: >
                  When the `lrrID` query parameter is not specified: RSSI on the
                  best LRR


                  When the `lrrID` query parameter is specified: RSSI on the requested LRR


                  Only applies to uplink frames (type=0)
                format: float
              esp:
                type:
                  - number
                  - "null"
                format: float
                description: >
                  When the `lrrID` query parameter is not specified: ESP on the
                  best  LRR


                  When the `lrrID` query parameter is specified: ESP on the requested  LRR


                  Only applies to uplink frames (type=0)
              sf:
                type:
                  - integer
                  - "null"
                description: |
                  Spreading factor

                  Only applies to uplink frames (type=0) and downlink frames
                  (type=1)
                format: int32
              size:
                type:
                  - integer
                  - "null"
                description: |
                  Size of the payload for uplink frames (type=0) and downlink
                  frames (type=1)

                  Sum of uplink bytes and downlink bytes for microflow events
                  (type=4)
                format: int32
              sizeUp:
                type:
                  - integer
                  - "null"
                description: |
                  Microflow uplink bytes

                  Only applies to microflow events (type=4)
                format: int32
              sizeDown:
                type:
                  - integer
                  - "null"
                description: |
                  Microflow downlink bytes

                  Only applies to microflow events (type=4)
                format: int32
              snr:
                type:
                  - number
                  - "null"
                description: |
                  When lrrID query parameter is no specified: SNR on the best
                  LRR


                  When lrrID query parameter is specified: SNR on the requested
                  LRR


                  Only applies to uplink frames (type=0)
                format: float
              timestamp:
                type: integer
                format: int64
                example: 1577836800000
                description: Timestamp of the frame, epoch time in milliseconds
              type:
                type: integer
                description: >
                  Type of the frame: Uplink (0), downlink (1) or Microflow event
                  (4) frame indicator
                format: int32
        lrrs:
          type:
            - array
            - "null"
          items:
            type: object
            properties:
              lrrID:
                type:
                  - string
                  - "null"
                description: >
                  List of all LRRs that have received or sent at least one frame
                  for the device during the requested period


                  Only returned when lrrID query parameter is no specified
        now:
          type: integer
          format: int64
          example: 1577836800000
          description: Current time of the server, epoch time in milliseconds
    FramesDeviceAggregation:
      type: object
      required:
        - briefs
        - now
      properties:
        briefs:
          type: array
          items:
            type: object
            required:
              - timestamp
              - up
              - dw
              - mf
              - instantPerMean
              - rssiMean
              - snrMean
              - espMean
            properties:
              timestamp:
                type: integer
                format: int64
                example: 1577836800000
                description: Reference timestamp of the aggregated time slot, epoch time in
                  milliseconds.
              instantPerMean:
                type: number
                description: >
                  Mean of instantaneous PER (Packet Error Rate) reported with
                  uplink frames over this time slot.

                  - When the `lrrID` query parameter is not specified: instantaneous PER without consideration for LRRs.

                  - When the `lrrID` query parameter is specified: instantaneous PER only considering uplink frames received by the LRR identified by this lrrID.


                  The instantaneous PER is computed over the 2 last distinct uplink frames as follows:

                  - InstantPER = 1 – [ 2 / (FCntUp(N)  - FCntUp(N-1)  + 1)], where:
                    - FCntUp(N) is the FCntUp of the last uplink frame
                    - FCntUp(N-1) is the FCntUp of the previous uplink frame (excluding repetitions)
                  - Example: If the two last received uplink frames have FCntUp 33 and 36, then InstantPER = 1 - [2/(36-33+1)] = 0.5 = 50% (because frames 34 & 35 were missing, so 4 frames expected but only 2 frames received).

                  - A device reset/rejoin resets the InstantPER to 0


                  Only applicable to LoRaWAN devices.
                format: float
                minimum: 0
                exclusiveMaximum: 1
              meanPerMean:
                type:
                  - number
                  - "null"
                description: >
                  Mean of mean PER (Packet Error Rate) reported with uplink
                  frames over this time slot. Only returned when the `lrrID`
                  query parameter is not specified.


                  The mean PER is computed over the full history of last distinct uplink frames as follows:

                  - MeanPER = 1 - [Distinct_Pkts / (FCntUP(N) - FCntUP(M)  + 1)], where:
                    - Distinct_Pkts is the number of distinct uplink frames stored in the last uplink frames history (containing up to 50 uplink frames)
                    - FCntUp(N) is the FCntUp of the newest uplink frame in the last uplink frames history
                    - FCntUp(M) is the FCntUp of the oldest uplink frame in the last uplink frames history
                  - A device reset/rejoin resets the MeanPER to 0


                  Only applicable to LoRaWAN devices.
                format: float
                minimum: 0
                exclusiveMaximum: 1
              rssiMean:
                type: number
                description: >
                  When the `lrrID` query parameter is not specified: mean of
                  RSSI on the best LRR for this aggregated time slot.


                  When the `lrrID` query parameter is specified: mean of RSSI on the requested LRR for this aggregated time slot.


                  Only applicable to LoRaWAN devices.
                format: float
              snrMean:
                type: number
                description: >
                  When the `lrrID` query parameter is not specified: mean of SNR
                  on the best LRR for this aggregated time slot.


                  When the `lrrID` query parameter is specified: mean of SNR on the requested LRR for this aggregated time slot.


                  Only applicable to LoRaWAN devices.
                format: float
              espMean:
                type: number
                description: >
                  When the `lrrID` query parameter is not specified: mean of ESP
                  on the best LRR for this aggregated time slot.


                  When the `lrrID` query parameter is specified: mean of ESP on the requested LRR for this aggregated time slot.


                  Only applicable to LoRaWAN devices.
                format: float
              mf:
                type: object
                description: |
                  Microflow indicators for this aggregated time slot.

                  Aggregates cellular uplink and downlink frames using direct IP
                  mode.

                  Only applicable to cellular devices.
                required:
                  - count
                  - size
                  - sizeUp
                  - sizeDown
                  - duration
                properties:
                  count:
                    type: integer
                    description: |
                      Number of microflow events received during this aggregated
                      time slot.
                    format: int32
                  size:
                    type: integer
                    description: |
                      Cumulated microflow uplink/downlink bytes transmitted
                      during this aggregated time slot.
                    format: int32
                  sizeUp:
                    type: integer
                    description: |
                      Cumulated microflow uplink bytes transmitted during this
                      aggregated time slot.
                    format: int32
                  sizeDown:
                    type: integer
                    description: |
                      Cumulated microflow downlink bytes transmitted during this
                      aggregated time slot.
                    format: int32
                  duration:
                    type: integer
                    description: |
                      Cumulated microflow duration in seconds during this
                      aggregated time slot.
                    format: int32
              up:
                type: object
                description: |
                  Uplink indicators for this aggregated time slot.

                  Aggregates LoRaWAN uplink frames or cellular uplink frames
                  using message mode.
                required:
                  - count
                  - size
                  - countOnTime
                  - sizeOnTime
                  - countLate
                  - sizeLate
                  - subTypes
                properties:
                  count:
                    type: integer
                    description: |
                      Number of uplink frames received during this aggregated
                      time slot. It includes uplink frames received on time and
                      uplink frames received late.
                    format: int32
                  countLate:
                    type: integer
                    description: |
                      Number of uplink frames received late during this
                      aggregated time slot.

                      Only applicable to LoRaWAN devices.
                    format: int32
                  countOnTime:
                    type: integer
                    description: |
                      Number of uplink frames received on time during this
                      aggregated time slot.
                    format: int32
                  countLost:
                    type:
                      - integer
                      - "null"
                    description: |
                      Number of uplink frames lost during this aggregated time
                      slot.

                      Only applicable to LoRaWAN devices.
                    format: int32
                  size:
                    type: integer
                    description: |
                      Cumulated size in bytes of uplink frame payloads during
                      this aggregated time slot. It includes uplink frames
                      received on time and uplink frames received late.
                    format: int32
                  sizeLate:
                    type: integer
                    description: |
                      Cumulated size in bytes of uplink frame payloads received
                      late during this aggregated time slot.

                      Only applicable to LoRaWAN devices.
                    format: int32
                  sizeOnTime:
                    type: integer
                    description: |
                      Cumulated size in bytes of uplink frame payloads received
                      on time during this aggregated time slot.
                    format: int32
                  subTypes:
                    type: array
                    description: |
                      Indicators per uplink subtypes

                      Only applicable to LoRaWAN devices.
                    items:
                      type: object
                      properties:
                        subType:
                          type:
                            - integer
                            - "null"
                          description: |
                            Uplink subtype: only the Join Request (4) is
                            implemented for now
                          format: int32
                          enum:
                            - 4
                            - null
                        countOnTime:
                          type:
                            - integer
                            - "null"
                          description: |
                            Number of uplink frames received on time for this
                            subtype during this aggregated time slot.
                          format: int32
                        countLate:
                          type:
                            - integer
                            - "null"
                          description: |
                            Number of uplink frames received late for this
                            subtype during this aggregated time slot.
                          format: int32
              dw:
                type: object
                description: |
                  Downlink indicators for this aggregated time slot.

                  Aggregates LoRaWAN downlink frames or cellular downlink
                  frames using message mode.
                required:
                  - count
                  - size
                  - countSent
                  - sizeSent
                  - countFailed
                  - sizeFailed
                  - subTypes
                properties:
                  count:
                    type: integer
                    description: |
                      Number of downlink frames scheduled for transmission
                      during this aggregated time slot. It includes downlink
                      frames effectively sent and downlink frames whose
                      transmission failed.
                    format: int32
                  countFailed:
                    type: integer
                    description: |
                      Number of downlink frames whose transmission failed during
                      this aggregated time slot.

                      Only applicable to LoRaWAN devices.
                    format: int32
                  countSent:
                    type: integer
                    description: |
                      Number of downlink frames effectively sent during this
                      aggregated time slot.
                    format: int32
                  size:
                    type: integer
                    description: |
                      Cumulated size in bytes of downlink frame payloads during
                      this aggregated time slot. It includes downlink frames
                      effectively sent and downlink frames whose transmission
                      failed.
                    format: int32
                  sizeFailed:
                    type: integer
                    description: |
                      Cumulated size in bytes of downlink frame payloads whose
                      transmission failed during this aggregated time slot.

                      Only applicable to LoRaWAN devices.
                    format: int32
                  sizeSent:
                    type: integer
                    description: |
                      Cumulated size in bytes of downlink frame payloads
                      effectively sent during this aggregated time slot.
                    format: int32
                  subTypes:
                    type: array
                    description: |
                      Indicators per downlink subtypes

                      Only applicable to LoRaWAN devices.
                    items:
                      type: object
                      properties:
                        subType:
                          type:
                            - integer
                            - "null"
                          description: |
                            Downlink subtype: only the Join Accept (1004) is
                            implemented for now
                          format: int32
                          enum:
                            - 1004
                            - null
                        countSent:
                          type:
                            - integer
                            - "null"
                          description: |
                            Number of downlink frames effectively sent for this
                            subtype during this aggregated time slot.
                          format: int32
                        countFailed:
                          type:
                            - integer
                            - "null"
                          description: |
                            Number of downlink frames whose transmission failed
                            for this subtype during this aggregated time slot.
                          format: int32
          example:
            - timestamp: 1673478000
              instantPerMean: 0.002677373
              meanPerMean: 0.003886952
              rssiMean: -51.96787149
              snrMean: 14.8815261
              espMean: -52.10906216
              mf:
                count: 0
                size: 0
                sizeUp: 0
                sizeDown: 0
                duration: 0
              up:
                count: 498
                size: 3984
                countOnTime: 497
                sizeOnTime: 3974
                countLate: 1
                sizeLate: 10
                countLost: 4
                subTypes:
                  - subType: 4
                    countOnTime: 2
                    countLate: 0
              dw:
                count: 516
                size: 0
                countSent: 516
                sizeSent: 0
                countFailed: 0
                sizeFailed: 0
                subTypes:
                  - subType: 1004
                    countSent: 251
                    countFailed: 0
            - timestamp: 1673391600
              instantPerMean: 0
              meanPerMean: 0
              rssiMean: -50.94097222
              snrMean: 14.92230903
              espMean: -51.08380203
              mf:
                count: 0
                size: 0
                sizeUp: 0
                sizeDown: 0
                duration: 0
              up:
                count: 576
                size: 4612
                countOnTime: 576
                sizeOnTime: 4612
                countLate: 0
                sizeLate: 0
                countLost: 0
                subTypes: []
              dw:
                count: 577
                size: 0
                countSent: 577
                sizeSent: 0
                countFailed: 0
                sizeFailed: 0
                subTypes: []
            - timestamp: 1673305200
              instantPerMean: 0.000580719
              meanPerMean: 0.001890106
              rssiMean: -51.80139373
              snrMean: 14.96385017
              espMean: -51.93797024
              mf:
                count: 0
                size: 0
                sizeUp: 0
                sizeDown: 0
                duration: 0
              up:
                count: 574
                size: 4606
                countOnTime: 574
                sizeOnTime: 4606
                countLate: 0
                sizeLate: 0
                countLost: 1
                subTypes:
                  - subType: 4
                    countOnTime: 1
                    countLate: 0
              dw:
                count: 607
                size: 0
                countSent: 606
                sizeSent: 0
                countFailed: 1
                sizeFailed: 0
                subTypes:
                  - subType: 1004
                    countSent: 1
                    countFailed: 0
            - timestamp: 1673218800
              instantPerMean: 0
              meanPerMean: 0
              rssiMean: -52.14285714
              snrMean: 14.75714286
              espMean: -52.29131353
              mf:
                count: 0
                size: 0
                sizeUp: 0
                sizeDown: 0
                duration: 0
              up:
                count: 140
                size: 1094
                countOnTime: 140
                sizeOnTime: 1094
                countLate: 0
                sizeLate: 0
                countLost: 0
                subTypes: []
              dw:
                count: 140
                size: 0
                countSent: 140
                sizeSent: 0
                countFailed: 0
                sizeFailed: 0
                subTypes: []
            - timestamp: 1673132400
              instantPerMean: 0
              meanPerMean: 0
              rssiMean: -52.95703125
              snrMean: 14.95214844
              espMean: -53.09435815
              mf:
                count: 0
                size: 0
                sizeUp: 0
                sizeDown: 0
                duration: 0
              up:
                count: 256
                size: 2042
                countOnTime: 256
                sizeOnTime: 2042
                countLate: 0
                sizeLate: 0
                countLost: 0
                subTypes: []
              dw:
                count: 256
                size: 0
                countSent: 256
                sizeSent: 0
                countFailed: 0
                sizeFailed: 0
                subTypes: []
            - timestamp: 1673046000
              instantPerMean: 0
              meanPerMean: 0
              rssiMean: -51.92013889
              snrMean: 14.91579861
              espMean: -52.05901586
              mf:
                count: 0
                size: 0
                sizeUp: 0
                sizeDown: 0
                duration: 0
              up:
                count: 576
                size: 4608
                countOnTime: 576
                sizeOnTime: 4608
                countLate: 0
                sizeLate: 0
                countLost: 0
                subTypes: []
              dw:
                count: 578
                size: 0
                countSent: 578
                sizeSent: 0
                countFailed: 0
                sizeFailed: 0
                subTypes: []
            - timestamp: 1672959600
              instantPerMean: 0
              meanPerMean: 0
              rssiMean: -54.109375
              snrMean: 14.91579861
              espMean: -54.24896719
              mf:
                count: 0
                size: 0
                sizeUp: 0
                sizeDown: 0
                duration: 0
              up:
                count: 576
                size: 4608
                countOnTime: 576
                sizeOnTime: 4608
                countLate: 0
                sizeLate: 0
                countLost: 0
                subTypes: []
              dw:
                count: 579
                size: 0
                countSent: 579
                sizeSent: 0
                countFailed: 0
                sizeFailed: 0
                subTypes: []
        now:
          type: integer
          format: int64
          example: 1577836800000
          description: Current time of the server, epoch time in milliseconds
    FramesDevices:
      type: object
      required:
        - briefs
        - now
      properties:
        briefs:
          type: array
          items:
            type: object
            required:
              - timestamp
              - up
              - dw
              - mf
            properties:
              dw:
                type: object
                description: |
                  Downlink indicators for this aggregated time slot.

                  Aggregates LoRaWAN downlink frames and cellular downlink
                  frames using message mode.
                required:
                  - count
                  - size
                  - countSent
                  - sizeSent
                  - countFailed
                  - sizeFailed
                  - subTypes
                properties:
                  count:
                    type: integer
                    description: |
                      Number of downlink frames scheduled for transmission
                      during this aggregated time slot. It includes downlink
                      frames effectively sent and downlink frames whose
                      transmission failed.
                    format: int32
                  countFailed:
                    type: integer
                    description: |
                      Number of downlink frames whose transmission failed during
                      this aggregated time slot.

                      Only applicable to LoRaWAN devices.
                    format: int32
                  countSent:
                    type: integer
                    description: |
                      Number of downlink frames effectively sent during this
                      aggregated time slot.
                    format: int32
                  size:
                    type: integer
                    description: |
                      Cumulated size in bytes of downlink frame payloads during
                      this aggregated time slot. It includes downlink frames
                      effectively sent and downlink frames whose transmission
                      failed.
                    format: int32
                  sizeFailed:
                    type: integer
                    description: |
                      Cumulated size in bytes of downlink frame payloads whose
                      transmission failed during this aggregated time slot.

                      Only applicable to LoRaWAN devices.
                    format: int32
                  sizeSent:
                    type: integer
                    description: |
                      Cumulated size in bytes of downlink frame payloads
                      effectively sent during this aggregated time slot.
                    format: int32
                  subTypes:
                    type: array
                    description: |
                      Indicators per downlink subtypes

                      Only applicable to LoRaWAN devices.
                    items:
                      type: object
                      properties:
                        subType:
                          type:
                            - integer
                            - "null"
                          description: |
                            Downlink subtype: only the Join Accept (1004) is
                            implemented for now
                          format: int32
                          enum:
                            - 1004
                            - null
                        countSent:
                          type:
                            - integer
                            - "null"
                          description: |
                            Number of downlink frames effectively sent for this
                            subtype during this aggregated time slot.
                          format: int32
                        countFailed:
                          type:
                            - integer
                            - "null"
                          description: |
                            Number of downlink frames whose transmission failed
                            for this subtype during this aggregated time slot.
                          format: int32
              timestamp:
                type: integer
                format: int64
                example: 1577836800000
                description: Reference timestamp of the aggregated time slot, epoch time in
                  milliseconds.
              up:
                type: object
                description: |
                  Uplink indicators for this aggregated time slot.

                  Aggregates LoRaWAN uplink frames and cellular uplink frames
                  using message mode.
                required:
                  - count
                  - size
                  - countOnTime
                  - sizeOnTime
                  - countLate
                  - sizeLate
                  - subTypes
                properties:
                  count:
                    type: integer
                    description: |
                      Number of uplink frames received during this aggregated
                      time slot. It includes uplink frames received on time and
                      uplink frames received late.
                    format: int32
                  countLate:
                    type: integer
                    description: |
                      Number of uplink frames received late during this
                      aggregated time slot.

                      Only applicable to LoRaWAN devices.
                    format: int32
                  countOnTime:
                    type: integer
                    description: |
                      Number of uplink frames received on time during this
                      aggregated time slot.
                    format: int32
                  countLost:
                    type:
                      - integer
                      - "null"
                    description: |
                      Number of uplink frames lost during this aggregated time
                      slot.

                      Only applicable to LoRaWAN devices.
                    format: int32
                  size:
                    type: integer
                    description: |
                      Cumulated size in bytes of uplink frame payloads during
                      this aggregated time slot. It includes uplink frames
                      received on time and uplink frames received late.
                    format: int32
                  sizeLate:
                    type: integer
                    description: |
                      Cumulated size in bytes of uplink frame payloads received
                      late during this aggregated time slot.

                      Only applicable to LoRaWAN devices.
                    format: int32
                  sizeOnTime:
                    type: integer
                    description: |
                      Cumulated size in bytes of uplink frame payloads received
                      on time during this aggregated time slot.
                    format: int32
                  subTypes:
                    type: array
                    description: |
                      Indicators per uplink subtypes

                      Only applicable to LoRaWAN devices.
                    items:
                      type: object
                      properties:
                        subType:
                          type:
                            - integer
                            - "null"
                          description: |
                            Uplink subtype: only the Join Request (4) is
                            implemented for now
                          format: int32
                          enum:
                            - 4
                            - null
                        countOnTime:
                          type:
                            - integer
                            - "null"
                          description: |
                            Number of uplink frames received on time for this
                            subtype during this aggregated time slot.
                          format: int32
                        countLate:
                          type:
                            - integer
                            - "null"
                          description: |
                            Number of uplink frames received late for this
                            subtype during this aggregated time slot.
                          format: int32
              mf:
                type: object
                description: |
                  Microflow indicators for this aggregated time slot.

                  Aggregates cellular uplink and downlink frames using direct IP
                  mode.
                required:
                  - count
                  - size
                  - sizeUp
                  - sizeDown
                  - duration
                properties:
                  count:
                    type: integer
                    description: |
                      Number of microflow events received during this aggregated
                      time slot.
                    format: int32
                  size:
                    type: integer
                    description: |
                      Cumulated microflow uplink/downlink bytes transmitted
                      during this aggregated time slot.
                    format: int32
                  sizeUp:
                    type: integer
                    description: |
                      Cumulated microflow uplink bytes transmitted during this
                      aggregated time slot.
                    format: int32
                  sizeDown:
                    type: integer
                    description: |
                      Cumulated microflow downlink bytes transmitted during this
                      aggregated time slot.
                    format: int32
                  duration:
                    type: integer
                    description: |
                      Cumulated microflow duration in seconds during this
                      aggregated time slot.
                    format: int32
        now:
          type: integer
          format: int64
          example: 1577836800000
          description: Current time of the server, epoch time in milliseconds
    FramesMulticastGroup:
      type: object
      required:
        - briefs
        - now
      properties:
        briefs:
          type: array
          items:
            type: object
            required:
              - timestamp
              - size
              - fPort
              - fCnt
              - status
              - bsCount
              - bsSuccessCount
              - bsFailedCount
            properties:
              bsCount:
                type: integer
                description: |
                  Number of Base Stations associated with the multicast group
                format: int32
              bsFailedCount:
                type: integer
                description: |
                  Number of Base Stations that failed in transmitting the
                  downlink frame over the air
                format: int32
              bsSuccessCount:
                type: integer
                description: |
                  Number of Base Stations having successfully transmitted the
                  downlink frame over the air
                format: int32
              fCnt:
                type: integer
                description: FCnt of the multicast downlink frame
                format: int32
              fPort:
                type: integer
                description: FPort of the multicast downlink frame
                format: int32
              overflow:
                type:
                  - boolean
                  - "null"
                description: |
                  Network subscription overflow indicator
                format: int32
              size:
                type: integer
                description: |
                  Size of the multicast downlink payload
                format: int32
              status:
                type: string
                enum:
                  - SUCCESS
                  - ABORTED
                description: |
                  Transmission status of the multicast downlink frame:
                  - SUCCESS: the multicast downlink frame has been successfully
                  transmitted over the air by all Base Stations associated with
                  the Multicast Group
                  - ABORTED: at least one Base Station was not able to transmit
                  the multicast downlink frame over the air
              timestamp:
                type: integer
                format: int64
                example: 1577836800000
                description: Reference timestamp of the multicast downlink frame, epoch time in
                  milliseconds.
          example:
            - bsCount: 93
              bsFailedCount: 7
              bsSuccessCount: 86
              fCnt: 8
              fPort: 7
              overflow: false
              size: 8
              status: ABORTED
              timestamp: 1577923200000
            - bsCount: 93
              bsFailedCount: 0
              bsSuccessCount: 93
              fCnt: 7
              fPort: 7
              overflow: false
              size: 8
              status: SUCCESS
              timestamp: 1577836800000
        now:
          type: integer
          format: int64
          example: 1577836800000
          description: Current time of the server, epoch time in milliseconds
    FramesMulticastGroupAggregation:
      type: object
      required:
        - briefs
        - now
      properties:
        briefs:
          type: array
          items:
            type: object
            required:
              - successfulTransmissionValues
              - timestamp
            properties:
              successfulTransmissionValues:
                type: array
                items:
                  type: object
                  required:
                    - count
                    - size
                  properties:
                    count:
                      type: integer
                      format: int32
                      description: Number of multicast downlinks for this ratio index and aggregated
                        time slot
                    size:
                      type: integer
                      format: int32
                      description: Cumulated size of multicast downlink payloads in bytes for this
                        ratio index and aggregated time slot.
              timestamp:
                type: integer
                format: int64
                example: 1577836800000
                description: Reference timestamp of the aggregated time slot, epoch time in
                  milliseconds.
          example:
            - successfulTransmissionValues:
                - count: 5
                  size: 52
                - count: 3
                  size: 35
                - count: 2
                  size: 19
                - count: 0
                  size: 0
              timestamp: 1577923200000
            - successfulTransmissionValues:
                - count: 7
                  size: 64
                - count: 0
                  size: 0
                - count: 3
                  size: 41
                - count: 1
                  size: 11
              timestamp: 1577836800000
        ratioRangeDefinitions:
          type:
            - array
            - "null"
          items:
            type: object
            required:
              - minimumRatio
              - maximumRatio
            properties:
              minimumRatio:
                type: object
                required:
                  - inclusive
                  - value
                description: Minimum ratio for this range.
                properties:
                  inclusive:
                    type: boolean
                    description: TRUE if the minimum ratio value is inclusive.
                  value:
                    type: number
                    description: Minimum ratio value.
              maximumRatio:
                type: object
                required:
                  - inclusive
                  - value
                description: Maximum ratio for this range.
                properties:
                  inclusive:
                    type: boolean
                    description: TRUE if the maximum successful transmission ratio value is
                      inclusive.
                  value:
                    type: number
                    description: Maximum successful transmission ratio value.
          example:
            - minimumRatio:
                inclusive: true
                value: 1
              maximumRatio:
                inclusive: true
                value: 1
            - minimumRatio:
                inclusive: true
                value: 0.8
              maximumRatio:
                inclusive: false
                value: 1
            - minimumRatio:
                inclusive: true
                value: 0.3
              maximumRatio:
                inclusive: false
                value: 0.8
            - minimumRatio:
                inclusive: true
                value: 0
              maximumRatio:
                inclusive: false
                value: 0.3
        now:
          type: integer
          format: int64
          example: 1577836800000
          description: Current time of the server, epoch time in milliseconds
    HsmGroups:
      type: object
      required:
        - briefs
        - more
      properties:
        briefs:
          type: array
          items:
            type: object
            required:
              - ID
              - name
            properties:
              ID:
                type: string
                description: HSM group ID
              hsmExchangeKeyVersion:
                type:
                  - string
                  - "null"
                description: HSM Exchange Key version
                example: HEK1
              name:
                type: string
                description: HSM group name
        more:
          $ref: "#/components/schemas/More"
    TpxIotFlow:
      type:
        - object
        - "null"
      required:
        - state
        - flowId
      properties:
        connectionId:
          type:
            - string
            - "null"
          description: ID of the associated Connection in TPX IoT Flow
        state:
          type: string
          description: >
            IoT Flow Connection state:

            - OPENED: the connection is up and running

            - OPENING: the connection is currently opening

            - CLOSED: the connection is closed

            - CLOSING: the connection is currently closing

            - AUTHENTICATING: the connection is currently authenticating

            - AUTHENTICATION_FAILED: failed to authenticate on the remote server with provided credentials

            - UNREACHABLE: the remote server is unreachable and therefore the connection will be retried

            - DEACTIVATED: the connection is deactivated
          enum:
            - OPENED
            - OPENING
            - CLOSED
            - CLOSING
            - AUTHENTICATING
            - AUTHENTICATION_FAILED
            - UNREACHABLE
            - DEACTIVATED
          readOnly: true
        connectorId:
          type:
            - string
            - "null"
          description: ID of the associated Connector in TPX IoT Flow
        flowId:
          type: string
          description: ID of the associated Flow in TPX IoT Flow
    IsmBandID:
      type:
        - string
        - "null"
      enum:
        - eu868
        - eu433
        - cn779
        - as923
        - kr920
        - us915
        - au915
        - cn470
        - in865
        - ru864
        - ww2g4
        - null
      description: ISM band ID
      example: eu868
    IsmBandName:
      type:
        - string
        - "null"
      enum:
        - EU863-870 (EU868)
        - EU433
        - CN779-787 (CN779)
        - AS923
        - KR920-923 (KR920)
        - US902-915 (US915)
        - AU915-928 (AU915)
        - CN470-510 (CN470)
        - IN865-867 (IN865)
        - RU864-870 (RU864)
        - WW2400
        - null
      description: ISM band name
      readOnly: true
      example: EU863-870 (EU868)
    IsmBands:
      type: object
      required:
        - briefs
        - more
      properties:
        briefs:
          type: array
          items:
            type: object
            required:
              - ID
              - name
            properties:
              ID:
                $ref: "#/components/schemas/IsmBandID"
              name:
                $ref: "#/components/schemas/IsmBandName"
          example:
            - ID: eu868
              name: EU863-870 (EU868)
            - ID: eu433
              name: EU433
            - ID: cn779
              name: CN779-787 (CN779)
            - ID: as923
              name: AS923
            - ID: kr920
              name: KR920-923 (KR920)
            - ID: us915
              name: US902-915 (US915)
            - ID: au915
              name: AU915-928 (AU915)
            - ID: cn470
              name: CN470-510 (CN470)
            - ID: in865
              name: IN865-867 (IN865)
            - ID: ru864
              name: RU864-870 (RU864)
            - ID: ww2g4
              name: WW2400
        more:
          $ref: "#/components/schemas/More"
    Locations:
      type: object
      required:
        - briefs
      properties:
        briefs:
          type: array
          items:
            type: object
            required:
              - timestamp
              - lat
              - lon
              - alt
              - hRadius
              - vRadius
            properties:
              alt:
                type: number
                description: Aggregated ALT of the step in `meter`
                format: float
                example: 157.1
              hRadius:
                type: number
                description: Aggregated horizontal radius in `meter`
                format: float
                example: 1.2
              lat:
                type: number
                description: Aggregated LAT of the step (WGS84)
                format: float
                example: 48.636
              lon:
                type: number
                description: Aggregated LON of the step (WGS84)
                format: float
                example: -1.5114
              timestamp:
                type: integer
                format: int64
                example: 1577836800000
                description: Timestamp of the step, epoch time in milliseconds
              vRadius:
                type: number
                description: Aggregated vertical radius in `meter`
                format: float
                example: 1.2
              nVelocity:
                type:
                  - number
                  - "null"
                description: Aggregated north velocity in `m/s`
                format: float
                example: 1.42
              eVelocity:
                type:
                  - number
                  - "null"
                description: Aggregated east velocity in `m/s`
                format: float
                example: 0.45
              velocity:
                type:
                  - object
                  - "null"
                required:
                  - speed
                  - direction
                properties:
                  speed:
                    type: number
                    description: Deplacement speed in `m/s`
                    example: 1.49
                  direction:
                    type: number
                    description: Deplacement direction in `°`. North is 0°, east is 90°, south is
                      180° and west is 270°.
                    example: 17.58
              FCntUp:
                type:
                  - integer
                  - "null"
                description: Associated FCntUp (when applicable)
                example: 32
        more:
          $ref: "#/components/schemas/More"
    MulticastDownlinkSettings:
      type: object
      required:
        - ismBand
        - lcs
      properties:
        ismBand:
          type: object
          required:
            - ID
            - minDownlinkDR
            - maxDownlinkDR
          properties:
            ID:
              type: string
              description: ISM band ID
              example: eu868
            minDownlinkDR:
              type: integer
              description: Minimum supported downlink data-rate
              example: 0
            maxDownlinkDR:
              type: integer
              description: Maximum supported downlink data-rate
              example: 5
        lcs:
          type: array
          items:
            type: object
            required:
              - frequency
            properties:
              lc:
                type:
                  - integer
                  - "null"
                minimum: 0
                maximum: 255
                description: This parameter defines the Logical Channel index of the LoRaWAN
                  channel.
                example: 1
              frequency:
                type: number
                format: float
                description: This parameter defines the center frequency in MHz of the LoRaWAN
                  Channel.
                example: 923.2
          example:
            - lc: 1
              frequency: 868.1
            - lc: 2
              frequency: 868.3
            - lc: 3
              frequency: 868.5
            - lc: 4
              frequency: 867.1
            - lc: 5
              frequency: 867.3
            - lc: 6
              frequency: 867.5
            - lc: 7
              frequency: 867.7
            - lc: 8
              frequency: 867.9
            - lc: 253
              frequency: 869.525
            - lc: 254
              frequency: 869.525
            - lc: 255
              frequency: 869.525
    MulticastGroup:
      type: object
      x-requiredCreate:
        - EUI
        - nwAddress
        - class
        - nwKey
      x-requiredRead:
        - name
        - EUI
        - nwAddress
        - class
        - nwKey
      required:
        - historyDwDaily
        - alarm6
        - alarm5
        - alarm4
        - alarm3
        - alarm2
        - alarm1
        - creationDate
        - now
      properties:
        EUI:
          type: string
          x-updateForbidden: true
          description: LoRaWAN DevEUI (16 hexadecimal characters / case insensitive but
            always converted in upper case by the server)
          example: 000000000522D8EB
        alarm1:
          type: integer
          description: Number of CLEARED alarms not ACKED
          format: int32
          example: 9
          readOnly: true
        alarm2:
          type: integer
          description: Number of INDETERMINATE alarms not ACKED
          format: int32
          example: 0
          readOnly: true
        alarm3:
          type: integer
          description: Number of WARNING alarms not ACKED
          format: int32
          example: 1
          readOnly: true
        alarm4:
          type: integer
          description: Number of MINOR alarms not ACKED
          format: int32
          example: 0
          readOnly: true
        alarm5:
          type: integer
          description: Number of MAJOR alarms not ACKED
          format: int32
          example: 1
          readOnly: true
        alarm6:
          type: integer
          description: Number of CRITICAL alarms not ACKED
          format: int32
          example: 0
          readOnly: true
        appKeys:
          type:
            - string
            - "null"
          deprecated: true
          description: |
            LoRaWAN AppSKey XML document:
            - The root XML element is `AppSKeys`
            - The enclosed `AppSKey` XML element contains the AppSKey value (hexadecimal encoding)
            - The `AppSKey@Port` attribute must be set to `*`

            This property must no longer be used: the `appSKey` property should be used in replacement.
          pattern: ^<AppSKeys><AppSKey Port="\*">[0-9a-fA-F]{32}<\/AppSKey><\/AppSKeys>$
          example: <AppSKeys><AppSKey
            Port="*">8D67B0D6359D11ACFC45AD4BB9CE2D4F</AppSKey></AppSKeys>
          writeOnly: true
        appSKey:
          type:
            - string
            - "null"
          description: LoRaWAN AppSKey in hexadecimal encoding
          pattern: ^[0-9a-fA-F]{32}$
          example: 8D67B0D6359D11ACFC45AD4BB9CE2D4F
          writeOnly: true
        appServers:
          type:
            - array
            - "null"
          description: >
            The Application Servers list must be compatible with the network

            subscription if any


            **Access right**: Not available for update with `LPWA_MGR::WRITE_NODE`


            This attribute is FORBIDDEN if the Multicast Group is associated

            with an AS Routing Profile


            If the authenticated user has domain restrictions, only the following

            application servers can be associated with a multicast group:

            - Application servers not associated with any domain

            - Application servers associated with domains and matching the domain
              restrictions
          items:
            $ref: "#/components/schemas/DeviceAppServer"
        bss:
          type:
            - object
            - "null"
          x-updateForbidden: true
          required:
            - tags
          properties:
            tags:
              type: array
              description: Base Station tags associated with the multicast group
              items:
                $ref: "#/components/schemas/BsTag"
              example:
                - name: tag1
                  namespace: OPERATOR
                - name: tag2
                  namespace: SUBSCRIBER
                - name: tag3
                  namespace: OPERATOR
        class:
          type: string
          enum:
            - B
            - C
          description: |
            LoRaWAN class:
            - 'B': Class B
            - 'C': Class C
        creationDate:
          type: integer
          format: int64
          example: 1577836800000
          description: Epoch time in milliseconds when the Multicast Group was created.
          readOnly: true
        customerAdminData:
          type:
            - string
            - "null"
          description: |
            Free administrative data associated to the Multicast Group (e.g.
            floor number, building, addresss...).
          example: ""
        domains:
          $ref: "#/components/schemas/Domains"
        downlinkDataRate:
          type:
            - integer
            - "null"
          description: |
            LoRaWAN data rate (integer between 0 and 15) used to transmit
            multicast downlink packets. When not set, network subscription or RF
            Region settings apply.
          format: int32
          minimum: 0
          maximum: 15
        downlinkFrequency:
          type:
            - number
            - "null"
          description: |
            Frequency in MHz used to transmit multicast downlink packets. When
            not set, RF Region settings apply.
          format: float
          minimum: 433
          maximum: 928
          example: 869.525
        firstDwTimestamp:
          type:
            - integer
            - "null"
          format: int64
          example: 1577836800000
          description: First contact timestamp with the ThingPark Infrastructure, epoch
            time in milliseconds.
          readOnly: true
        historyDwDaily:
          type: object
          required:
            - val
          readOnly: true
          properties:
            val:
              description: |
                Cumulated number of downlink frames per 2h period for a 24h
                duration before `lastDwTimestamp`.

                The array is sorted from the most recent period (index 0) to the
                oldest period.
              type: array
              items:
                type: integer
                format: int32
        lastDwTimestamp:
          type:
            - integer
            - "null"
          format: int64
          example: 1577836800000
          description: Timestamp of the last downlink frame, epoch time in milliseconds
          readOnly: true
        lastFCntDn:
          type:
            - integer
            - "null"
          description: FCntDn of the last downlink frame
          format: int32
          readOnly: true
        name:
          type: string
          description: The multicast group name is automatically set to the DevEUI when
            not provided at creation.
          example: My multicast group
        networkSubscription:
          type:
            - object
            - "null"
          description: |
            Network subscription associated with the multicast group

            The network subscription must be compatible with the AS routing
            profile associated with the multicast group (if any)

            On multicast group creation or update, the selection of the network
            subscription depends on `networkSubscriptionsHandlingMode` query
            parameter:
            - `BASIC`: the network subscription is automatically selected. If
              several network subscriptions match, the network subscription with
              the oldest subscription date is selected. Only applicable to
              ThingPark Enterprise.
            - `ADVANCED`: the network subscription is selected based on its
              `ID` value. If no `ID` is provided, the multicast group is
              not associated with a network subscription.

            On multicast group creation, the network subscription is always
            selected as described above.

            On multicast group update, the network subscription is selected as
            described above only if the `networkSubscription` property is
            provided. Otherwise the current network subscription is kept.

            **Access right: Not available for update with**
            LPWA_MGR::WRITE_NODE
          required:
            - supplier
            - multicastMaxLrrCells
            - href
          x-requiredRead:
            - ID
          properties:
            ID:
              type:
                - string
                - "null"
              description: ID of the network subscription
              example: acme-cs/production
            commercialName:
              type:
                - string
                - "null"
              description: Name of the network subscription
              readOnly: true
              example: Basic Unicast
            href:
              type: string
              description: Network Subscription HREF
              readOnly: true
            multicastMaxLrrCells:
              type: integer
              description: >
                Maximum number of LRRs associated with the multicast group
                (absolute maximum is 1000)
              readOnly: true
              example: 100
            supplier:
              type: object
              required:
                - ID
              readOnly: true
              properties:
                ID:
                  type: string
                  example: acme-cs
                commercialName:
                  type:
                    - string
                    - "null"
                  description: |
                    Note: For performance issue, the commercial name is not

                    returned on CREATE and UPDATE (only returned on a RETRIEVE)
                  example: ACME Connectivity Supplier
        now:
          type: integer
          format: int64
          example: 1577836800000
          description: Current time of the server, epoch time in milliseconds
          readOnly: true
        nwAddress:
          type: string
          x-updateForbidden: true
          description: LoRaWAN DevAddr (8 hexadecimal characters / case insensitive but
            always converted in upper case by the server)
          example: 785D25E2
        nwKey:
          type: string
          description: LoRaWAN FNwkSIntKey/NwkSKey
          writeOnly: true
          pattern: ^[0-9a-fA-F]{32}$
          example: EF694882209C5C9543A5D3DA3CF32AFF
        nwkSEncKey:
          type:
            - string
            - "null"
          description: |
            LoRaWAN NwkSEncKey

            Mandatory when the LoRaWAN version is 1.1, Not used otherwise.
          writeOnly: true
          pattern: ^[0-9a-fA-F]{32}$
          example: EF694882209C5C9543A5D3DA3CF32AFF
        sNwkSIntKey:
          type:
            - string
            - "null"
          description: |
            LoRaWAN SNwkSIntKey

            Mandatory when the LoRaWAN version is 1.1, Not used otherwise.
          writeOnly: true
          pattern: ^[0-9a-fA-F]{32}$
          example: EF694882209C5C9543A5D3DA3CF32AFF
        occContext:
          $ref: "#/components/schemas/OccContext"
        pingSlotPeriod:
          type:
            - integer
            - "null"
          minimum: 1
          maximum: 128
          description: |
            Class B ping-slot period in seconds
            Supported values are 1, 2, 4, 8, 16, 32, 64 and 128
            Class B: MANDATORY
            Class C: FORBIDDEN
          example: 8
        verificationCode:
          deprecated: true
          type:
            - string
            - "null"
          description: >
            Verification code associated to the DevAddr/DevEUI pair when the ADM

            validation code has been activated.


            This property must no longer be used: the associated feature is no more available in the product.
          writeOnly: true
          example: VOv1_E1832D04
    MulticastGroupBss:
      type: object
      required:
        - briefs
        - bsCount
        - now
        - more
      properties:
        briefs:
          type: array
          items:
            type: object
            required:
              - lrrID
              - healthState
              - tags
            properties:
              lrrID:
                type: string
                description: Base Station LRR ID
              healthState:
                enum:
                  - INIT
                  - ACTIVE
                  - BACKHAUL_CNX_ERROR
                  - RF_ERROR
                  - SUSPENDED
                type: string
                description: >
                  Base Station health state:

                  - INIT: The base station has been created, but has never
                    communicated with the network server
                  - ACTIVE: The base station is connected to the network, transmitting
                    and receiving packets
                  - BACKHAUL_CNX_ERROR: The base station has backhaul connection
                    issues, and cannot communicate with the network server
                  - RF_ERROR: The base station has radio transmission issues, and
                    cannot send or receive LoRaWAN packets to or from a device
                  - SUSPENDED: The base station has been administratively suspended
                    and is no more connected to the network server
              lat:
                type:
                  - number
                  - "null"
                format: float
                description: Base Station latitude
              lon:
                type:
                  - number
                  - "null"
                format: float
                description: Base Station longitude
              tags:
                type: array
                description: Tags associated with the multicast group and matching the Base
                  Station
                items:
                  $ref: "#/components/schemas/BsTag"
              href:
                type:
                  - string
                  - "null"
                description: >
                  Base Station href (only returned if the base station belongs
                  to the subscriber).


                  If the authenticated user has domain restrictions, only

                  returned if the base station matches the domain restrictions.
          example:
            - lrrID: 100001C3
              healthState: ACTIVE
              lat: 48.636
              lon: -1.5114
              tags:
                - name: tag1
                  namespace: OPERATOR
            - lrrID: 100001C2
              healthState: ACTIVE
              lat: 48.636
              lon: -1.5114
              tags:
                - name: tag2
                  namespace: SUBSCRIBER
            - lrrID: 100001C1
              healthState: ACTIVE
              lat: 48.636
              lon: -1.5114
              tags:
                - name: tag3
                  namespace: OPERATOR
        bsCount:
          type: integer
          description: |
            Number of Base Stations associated with the multicast group
          example: 2
        more:
          $ref: "#/components/schemas/More"
        now:
          type: integer
          format: int64
          example: 1577836800000
          description: Current time of the server, epoch time in milliseconds
    MulticastGroupBssTag:
      type: object
      allOf:
        - $ref: "#/components/schemas/BsTag"
        - type: object
          required:
            - bsCount
          properties:
            bsCount:
              type: integer
              description: Number of Base Stations associated with the tag
              readOnly: true
              example: 5
    MulticastGroupBssTags:
      type: object
      required:
        - briefs
        - more
      properties:
        briefs:
          type: array
          description: Base Station tags associated with the multicast group
          items:
            $ref: "#/components/schemas/MulticastGroupBssTagsBrief"
          example:
            - name: tag1
              namespace: OPERATOR
              bsCount: 5
              href: /thingpark/wireless/rest/subscriptions/33/multicastGroups/22/bss/tags/64
            - name: tag2
              namespace: SUBSCRIBER
              bsCount: 1
              href: /thingpark/wireless/rest/subscriptions/33/multicastGroups/22/bss/tags/79
            - name: tag3
              namespace: OPERATOR
              bsCount: 4
              href: /thingpark/wireless/rest/subscriptions/33/multicastGroups/22/bss/tags/5
        more:
          $ref: "#/components/schemas/More"
    MulticastGroupBssTagsBrief:
      type: object
      allOf:
        - $ref: "#/components/schemas/BsTag"
        - type: object
          required:
            - bsCount
            - href
          properties:
            bsCount:
              type: integer
              description: Number of Base Stations associated with the tag
            href:
              type: string
              description: Base Station tag href in Multicast Group context
              example: /thingpark/wireless/rest/subscriptions/33/multicastGroups/22/bss/tags/64
    MulticastGroups:
      type: object
      required:
        - briefs
        - now
        - more
        - count
      properties:
        briefs:
          type: array
          items:
            type: object
            required:
              - name
              - EUI
              - nwAddress
              - bss
              - historyDwDaily
              - alarmLevel
              - alarmCount
              - href
              - creationDate
              - alarm1
              - alarm2
              - alarm3
              - alarm4
              - alarm5
              - alarm6
            properties:
              EUI:
                type: string
                description: LoRaWAN DevEUI (16 hexadecimal characters / always converted in
                  upper case by the server)
                example: 000000000522D8EB
              alarm1:
                type: integer
                description: Number of CLEARED alarms not ACKED
                format: int32
                example: 9
                readOnly: true
              alarm2:
                type: integer
                description: Number of INDETERMINATE alarms not ACKED
                format: int32
                example: 0
                readOnly: true
              alarm3:
                type: integer
                description: Number of WARNING alarms not ACKED
                format: int32
                example: 1
                readOnly: true
              alarm4:
                type: integer
                description: Number of MINOR alarms not ACKED
                format: int32
                example: 0
                readOnly: true
              alarm5:
                type: integer
                description: Number of MAJOR alarms not ACKED
                format: int32
                example: 1
                readOnly: true
              alarm6:
                type: integer
                description: Number of CRITICAL alarms not ACKED
                format: int32
                example: 0
                readOnly: true
              alarmCount:
                type: integer
                description: Total number of alarm not acked
                format: int32
              alarmLevel:
                type: integer
                description: Highest not acked alarm level (6 ... 1) or 0 when the Multicast
                  Group is not associated with not acked alarm
                format: int32
              appServers:
                type:
                  - array
                  - "null"
                description: |
                  List of Application Servers directly associated with the
                  multicast group
                items:
                  $ref: "#/components/schemas/DeviceAppServer"
              bss:
                type: object
                required:
                  - tags
                properties:
                  tags:
                    type: array
                    description: Base Station tags associated with the multicast group
                    items:
                      $ref: "#/components/schemas/BsTag"
                    example:
                      - name: tag1
                        namespace: OPERATOR
                      - name: tag2
                        namespace: SUBSCRIBER
                      - name: tag3
                        namespace: OPERATOR
              creationDate:
                type: integer
                format: int64
                example: 1577836800000
                description: Epoch time in milliseconds when the device was created .
              domains:
                $ref: "#/components/schemas/Domains"
              historyDwDaily:
                type: object
                required:
                  - val
                properties:
                  val:
                    description: >
                      Cumulated number of downlink frames per 2h period for a
                      24h

                      duration before `lastDwTimestamp`.


                      The array is sorted from the most recent period (index 0) to the

                      oldest period.
                    type: array
                    items:
                      type: integer
                      format: int32
              href:
                type: string
                example: /thingpark/wireless/rest/subscriptions/33/multicastGroups/22
              lastDwTimestamp:
                type:
                  - integer
                  - "null"
                format: int64
                example: 1577836800000
                description: Timestamp of the last downlink frame, epoch time in milliseconds
              name:
                type: string
                example: MyMCgroup
              networkSubscription:
                type:
                  - object
                  - "null"
                description: |
                  Network subscription associated with the multicast group
                required:
                  - ID
                  - supplier
                properties:
                  ID:
                    type: string
                    description: ID of the network subscription
                    example: acme-cs/production
                  commercialName:
                    type:
                      - string
                      - "null"
                    description: Name of the network subscription
                    example: Basic Unicast
                  supplier:
                    type: object
                    required:
                      - ID
                    properties:
                      ID:
                        type: string
                        description: ID of the associated connectivity supplier
                        example: acme-cs
                      commercialName:
                        type:
                          - string
                          - "null"
                        description: Name of the associated connectivity supplier
                        example: ACME Connectivity Supplier
              nwAddress:
                type: string
                description: LoRaWAN DevAddr (8 hexadecimal characters / always converted in
                  upper case by the server)
                example: 785D25E2
        more:
          $ref: "#/components/schemas/More"
        now:
          type: integer
          format: int64
          example: 1577836800000
          description: Current time of the server, epoch time in milliseconds
        count:
          type: integer
          description: Total number of matching multicast groups
          example: 32
    MulticastGroupsDomain:
      type: object
      required:
        - devEUIs
      properties:
        addedDomains:
          type:
            - array
            - "null"
          description: >
            List of domains to add to the list of Multicast Groups. The list

            cannot contain more than one domain for a given group and cannot contain a

            domain belonging to a group used in `removedDomains` list.
          items:
            type: object
            allOf:
              - $ref: "#/components/schemas/Domain"
              - type: object
                description: |
                  The domain must exist in the subscriber account and must be in
                  ACTIVE state to be used. Any existing domain belonging to the
                  same group is replaced by the new one.
          example:
            - name: France/Paris
              group:
                name: Site
        removedDomains:
          type:
            - array
            - "null"
          description: |
            List of domains to remove from the list of Multicast Groups. The
            list may contain several domains for a given group but cannot
            contain a domain belonging to a group used in `addedDomains` list.
          items:
            type: object
            allOf:
              - $ref: "#/components/schemas/Domain"
              - type: object
                description: |
                  No error is returned if the domain is not associated with a
                  subset or all targeted Multicast Groups.
          example:
            - name: Energy
              group:
                name: Vertical
            - name: Location
              group:
                name: Vertical
        devEUIs:
          type: array
          items:
            type: string
          minItems: 1
          description: >
            Add or remove domains on multicast groups matching these DevEUIs
            (exact match).
          example:
            - "2504201820020000"
            - "2504201820020001"
    NetworkSubscription:
      type: object
      required:
        - ID
        - supplier
        - used
        - granted
        - uplinkRate
        - uplinkRateUnit
        - uplinkBucketSize
        - uplinkRegulatorPolicy
        - downlinkTransmission
        - downlinkRate
        - downlinkRateUnit
        - downlinkBucketSize
        - downlinkRegulatorPolicy
        - thingParkCloudRouting
        - thirdPartyAppServersRouting
        - thingParkKafkaRouting
        - communicationType
      oneOf:
        - $ref: "#/components/schemas/NetworkSubscriptionLorawan"
        - $ref: "#/components/schemas/NetworkSubscriptionCellular"
      properties:
        ID:
          type: string
          description: ID of the network subscription
        commercialDescription:
          type:
            - string
            - "null"
          description: Description of the network subscription
        commercialName:
          type:
            - string
            - "null"
          description: Name of the network subscription
        communicationType:
          type: string
          enum:
            - UNICAST
            - MULTICAST
          description: |
            Communication type:
            - 'UNICAST': Unicast communication
            - 'MULTICAST': Multicast communication
        downlinkBucketSize:
          type: integer
          description: Token bucket burst size
          format: int32
        downlinkRate:
          type: number
          description: Token bucket filling rate
          format: float
        downlinkRateUnit:
          enum:
            - HOUR
            - DAY
            - WEEK
          type: string
          description: |
            Token bucket filling rate unit for downlink frames:
            - HOUR: packet/hour
            - DAY: packet/day
            - WEEK: packet/week
        downlinkRegulatorPolicy:
          enum:
            - DROP
            - MARK
          type: string
          description: >
            Feature flag (DROP, MARK)


            Note: **Mandatory** when downlink transmission is enable, **forbidden** otherwise.
        downlinkTransmission:
          type: boolean
          description: Feature flag
        granted:
          type: integer
          description: Number of granted network subscription licenses
          format: int32
        managedCustomerNetwork:
          type:
            - boolean
            - "null"
          description: >
            Managed Customer Network activation flag


            This property must no longer be used: the associated feature is no more available in the product.
          deprecated: true
        maxDestinationPerRoute:
          type:
            - integer
            - "null"
          description: Number of allowed Third Party Application Servers.
          format: int32
        supplier:
          type: object
          required:
            - commercialName
            - ID
          properties:
            ID:
              type: string
              description: ID of the associated Connectivity Supplier.
            commercialName:
              type: string
              description: Name of the associated Connectivity Supplier.
        thingParkCloudRouting:
          type: boolean
          description: Allow ThingPark X connections
        thingParkKafkaRouting:
          type: boolean
          description: Allow Basic Kafka connections
        thirdPartyAppServersRouting:
          type: boolean
          description: Allow Basic HTTPS connections
        uplinkBucketSize:
          type: integer
          description: Token bucket burst size
          format: int32
        uplinkRate:
          type: number
          description: Token bucket filling rate
          format: float
        uplinkRateUnit:
          enum:
            - HOUR
            - DAY
            - WEEK
          type: string
          description: |
            Token bucket filling rate unit for uplink frames:
            - HOUR: packet/hour
            - DAY: packet/day
            - WEEK: packet/week
        uplinkRegulatorPolicy:
          enum:
            - DROP
            - MARK
          type: string
          description: Feature flag (DROP, MARK)
        used:
          type: integer
          description: Number of network subscription licenses currently in use
          format: int32
      discriminator:
        propertyName: connectivity
        mapping:
          CELLULAR: "#/components/schemas/NetworkSubscriptionCellular"
          LORAWAN: "#/components/schemas/NetworkSubscriptionLorawan"
    NetworkSubscriptionCellular:
      title: CELLULAR
      type: object
      readOnly: true
      required:
        - connectivity
      properties:
        connectivity:
          enum:
            - CELLULAR
          type: string
          description: |
            Connectivity:
            - `LORAWAN`: LoRaWAN connectivity
            - `CELLULAR`: Cellular connectivity

            `CELLULAR` is only applicable if the
            cellular connectivity is enabled.
        allowMessageMode:
          type:
            - boolean
            - "null"
          description: Enable the Device to send message mode packets
        allowDirectIPMode:
          type:
            - boolean
            - "null"
          description: Enable the Device to send direct IP mode traffic
        maximumBandwidthUp:
          type:
            - integer
            - "null"
          description: |
            Maximum allowed bandwidth in kbps for the direct IP mode traffic
            sent by the Device
        maximumBandwidthDown:
          type:
            - integer
            - "null"
          description: |
            Maximum allowed bandwidth in kbps for the direct IP mode traffic
            received by the Device
        microflowMinimalDuration:
          type:
            - integer
            - "null"
          description: |
            Minimal duration of a microflow event in seconds. Acceptable range
            is from 10 seconds to 1 minute
        microflowMaximalDuration:
          type:
            - integer
            - "null"
          description: |
            Maximal duration of a microflow event in seconds. Acceptable range
            is from 1 minute to 1 hour
        microflowMaximalVolume:
          type:
            - integer
            - "null"
          description: |
            Maximal volume of the uplink and downlink direct IP mode traffic in
            KB to close a microflow event. Acceptable range is from 50 KB to 10
            MB
    NetworkSubscriptionLorawan:
      title: LORAWAN
      type: object
      required:
        - connectivity
        - downlinkSentIndication
        - macroDiversityReliability
        - prAllowed
        - targetPacketErrorRate
      readOnly: true
      properties:
        connectivity:
          enum:
            - LORAWAN
          type: string
          description: |
            Connectivity:
            - `LORAWAN`: LoRaWAN connectivity
            - `CELLULAR`: Cellular connectivity

            `CELLULAR` is only applicable if the
            cellular connectivity is enabled.
        ackedDownlinkFrame:
          type:
            - boolean
            - "null"
          description: Feature flag
        ackedUplinkFrame:
          type:
            - boolean
            - "null"
          description: Feature flag
        addLrrMetaInfo:
          type:
            - boolean
            - "null"
          description: Feature flag
        addPerInfo:
          type:
            - boolean
            - "null"
          description: >
            When activated the PER information elements are reported on
            tunneling interface.
          default: false
        adrVersion:
          type:
            - integer
            - "null"
          description: "ADR algorithm version: SNR based ADR optimization algorithm (2),
            PER based ADR optimization algorithm (3)"
          format: int32
        allowClassB:
          type:
            - boolean
            - "null"
          description: Flag to signal that the network will honor requests to switch to
            LoraWAN class B.
        allowActingAsRelay:
          type:
            - boolean
            - "null"
          description: Allows the device to enable its LoRaWAN relay activity.
        deviceStatusRequestFrequency:
          type:
            - number
            - "null"
          description: |
            Device status request frequency (request/day)

            Note: 0 Means disable
          format: float
        deviceStatusRequestFrequencyUnit:
          enum:
            - DAY
            - WEEK
            - null
          type:
            - string
            - "null"
          description: |
            Device status request frequency unit:
            - DAY: request/day
            - WEEK: request/week
        downlinkSentIndication:
          type: boolean
          description: |
            Downlink sent indication: when activated a downlink sent indication
            is reported to the third party AS when a downlink frame has been
            sent by the Base Station or when a downlink frame cannot be sent.
          default: false
        forceAdaptiveDataRate:
          type:
            - boolean
            - "null"
          description: Force ADR
        forceChannelMask:
          type:
            - string
            - "null"
          description: Force channel mask (16 bits, 64 bits, 72 bits or 96 bits channel
            mask).
        forceRx2DataRate:
          type:
            - integer
            - "null"
          description: Force RX2 DR
          format: int32
        hrAllowed:
          type:
            - boolean
            - "null"
          description: Handover roaming allowed.
        hsmGroupID:
          type:
            - string
            - "null"
          description: ID of HSM group associated with the network subscription
        macroDiversityReliability:
          type: number
          description: Target Macro Diversity reliability (i.e. min required probability
            of having N gateways receiving device packets)
          format: float
        marginOffset:
          type:
            - integer
            - "null"
          description: |
            Margin offset.
          default: 0
          format: int32
        minAntennaDiversity:
          type:
            - integer
            - "null"
          description: |
            Minimum antenna diversity: number of distinct receiving radio paths
            (antennas) of the network base stations that the ADR algorithms
            should try to maintain. Typically used for network geolocation.
          default: 3
          format: int32
        minRx1Delay:
          type:
            - integer
            - "null"
          description: Optional minimal RX1 delay. When defined, the value has precedence
            on the RX1 value defined in the RF Region.
          format: int32
        mobility:
          type:
            - boolean
            - "null"
          description: Feature flag
        multicastCollisionAvoidanceDistance:
          type:
            - integer
            - "null"
          description: |
            Minimum distance between two LRRs to avoid transmission collision
            (in meters)
          format: int32
        multicastInterDelay:
          type:
            - integer
            - "null"
          description: |
            Transmission delay between different LRRs (in seconds)
          format: int32
        multicastMaxLrrCells:
          type:
            - integer
            - "null"
          description: |
            Maximum number of LRRs associated with the multicast group (absolute
            maximum is 1000)
          format: int32
        multicastMaxTransmit:
          type:
            - integer
            - "null"
          description: |
            Maximum number of times the LRC will attempts to transmit frames to
            LRRs which could not broadcast it
          format: int32
        multicastRetransmitTimer:
          type:
            - integer
            - "null"
          description: |
            Delay between two multicast retransmissions burst (in seconds)

            This property must no longer be used: it is ignored, this delay is
            no more customizable by network subscription.
          format: int32
          deprecated: true
        nbTransMax:
          type:
            - integer
            - "null"
          description: Maximum allowed number of transmissions
          format: int32
        nbTransMin:
          type:
            - integer
            - "null"
          description: Minimum allowed number of transmissions
          format: int32
        nbTransOffset:
          type:
            - integer
            - "null"
          description: |
            Number of transmissions offset.
          default: 0
          format: int32
        npAccessControlList:
          type:
            - array
            - "null"
          description: >
            List of whitelisted or blacklisted Network Partners:

            - If npAccessControlType is 'WHITELIST': List of whitelisted Network Partners

            - If npAccessControlType is 'BLACKLIST': List of blacklisted Network Partners
          items:
            type: object
            properties:
              ID:
                type:
                  - string
                  - "null"
                description: Network Partner ID
        npAccessControlType:
          type:
            - string
            - "null"
          description: |
            Network Partner access control type:
            - 'NONE': no access control
            - 'WHITELIST': Whitelist access control
            - 'BLACKLIST': Blacklist access control
          enum:
            - NONE
            - WHITELIST
            - BLACKLIST
            - null
        nwGeolocAlgo:
          enum:
            - TDOA
            - RSSI
            - BOTH
            - null
          type:
            - string
            - "null"
          description: >
            Network geolocation algorithm

            - TDOA: The calculation uses the time of arrival and received signal characteristics of uplink frames at the receiving gateways.

            - RSSI: The calculation uses the received signal strength of uplink frames at the receiving gateways.
        nwGeolocTdoaOpt:
          enum:
            - ELM
            - LMS
            - CMB
            - null
          type:
            - string
            - "null"
          description: |
            Network geolocation TDOA algorithm option:
            - ELM: Extended least median (ELM) method, based on finding the
            least median error. ELM is the default value and should be selected
            in the general case.
            - LMS: Least mean square (LMS) method, based on finding the least
            mean square error. LMS may be selected when all gateways have the
            same or similar level of multipath delay spread.
            - CMB: A combination of ELM and LMS. CMB commands the solver to run
            combined ELM and LMS, which may outperform the individual methods
            under some conditions.
        nwGeolocalization:
          type:
            - boolean
            - "null"
          description: Feature flag
        prAllowed:
          type: boolean
          description: Passive roaming allowed.
        raAllowed:
          type:
            - boolean
            - "null"
          description: Roaming activation allowed.
        reportDeviceBatteryLevel:
          type:
            - boolean
            - "null"
          description: Report battery level to the third party AS
        reportDeviceMargin:
          type:
            - boolean
            - "null"
          description: Report device margin to the third party AS
        spreadingFactorMax:
          type:
            - integer
            - "null"
          description: Upper spreading factor for Device testing.
          format: int32
        spreadingFactorMin:
          type:
            - integer
            - "null"
          description: Lower spreading factor for Device testing.
          format: int32
        targetPacketErrorRate:
          type: number
          description: Target Packet Error Rate
          format: float
        uplinkLrrBufferingDuration:
          type:
            - string
            - "null"
          description: |
            LRR uplink frame local buffering capacity configuration.

            ISO 8601 duration (eg. PT1H, PT24H...)
        uplinkLrrBufferingSize:
          type:
            - integer
            - "null"
          description: |
            LRR uplink frame local buffering capacity configuration.

            ISO 8601 duration (eg. PT1H, PT24H...)
          format: int32
        uplinkProcessing:
          type:
            - integer
            - "null"
          description: |
            Configures the UL processing on the LRC:
            - 0: Synchronous processing
            - &gt;0: Asynchronous processing as described in NFR 729
          format: int32
    NetworkSubscriptions:
      type: object
      required:
        - briefs
        - more
      properties:
        briefs:
          type: array
          items:
            type: object
            required:
              - commercialName
              - ID
              - supplier
              - used
              - granted
              - href
              - connectivity
              - communicationType
              - nwGeolocalization
              - thingParkCloudRouting
              - thirdPartyAppServersRouting
              - thingParkKafkaRouting
            properties:
              ID:
                type: string
                description: ID of the network subscription
              commercialName:
                type: string
                description: B2C name of the network subscription
              communicationType:
                type: string
                enum:
                  - UNICAST
                  - MULTICAST
                description: |
                  Communication type:
                  - 'UNICAST': Unicast communication
                  - 'MULTICAST': Multicast communication
              connectivity:
                enum:
                  - LORAWAN
                  - CELLULAR
                type: string
                description: |
                  Connectivity:
                  - `LORAWAN: LoRaWAN connectivity
                  - `CELLULAR`: Cellular connectivity

                  `CELLULAR` is only applicable if the
                  cellular connectivity is enabled.
              hsmGroupID:
                type:
                  - string
                  - "null"
                description: ID of HSM group associated with the network subscription
              maxDestinationPerRoute:
                type:
                  - integer
                  - "null"
                description: Number of allowed Third Party Application Servers.
                format: int32
                example: 5
              nwGeolocalization:
                type: boolean
                description: True if network geolocation is enabled
              prAllowed:
                type:
                  - boolean
                  - "null"
                description: True if passive roaming is allowed.
              granted:
                type: integer
                description: Number of granted network subscription licenses
                format: int32
              href:
                type: string
                description: Network Subscription HREF
              supplier:
                type: object
                required:
                  - commercialName
                  - ID
                properties:
                  ID:
                    type: string
                    description: ID of the associated Connectivity Supplier.
                  commercialName:
                    type: string
                    description: Name of the associated Connectivity Supplier.
              thingParkCloudRouting:
                type: boolean
                description: Allow ThingPark X connections
              thingParkKafkaRouting:
                type: boolean
                description: Allow Basic Kafka connections
              thirdPartyAppServersRouting:
                type: boolean
                description: Allow Basic HTTPS connections
              used:
                type: integer
                description: Number of network subscription licenses currently in use
                format: int32
        more:
          $ref: "#/components/schemas/More"
    NwSubsTransactions:
      type: object
      required:
        - briefs
        - more
      properties:
        briefs:
          type: array
          items:
            type: object
            required:
              - commercialName
              - ID
              - supplier
              - vendor
              - granted
              - status
              - subscriptionTimestamp
              - subscriptionOption
            properties:
              ID:
                type: string
                description: ID of the network subscription
              commercialName:
                type: string
                description: Name of the network subscription
              granted:
                type: integer
                description: Number of granted network subscription licenses
                format: int32
              status:
                enum:
                  - SUBSCRIBED
                  - UNSUBSCRIBED
                type: string
                description: State of the network subscription transaction ('SUBSCRIBED',
                  'UNSUBSCRIBED')
              subscriptionOption:
                type: object
                required:
                  - href
                properties:
                  href:
                    type: string
                    description: >
                      Linked Application Instance HREF (as defined by the
                      application WS), or Application Option Instance HREF (as
                      defined by the application WS).


                      Note: The transaction is ALWAYS initiated from the ThingPark Store.
              subscriptionTimestamp:
                type: integer
                description: Subscription timestamp, epoch time in milliseconds.
                format: int64
              supplier:
                type: object
                required:
                  - commercialName
                  - ID
                properties:
                  ID:
                    type: string
                    description: ID of the associated Connectivity Supplier.
                  commercialName:
                    type: string
                    description: Name of the associated Connectivity Supplier.
              unsubscriptionTimestamp:
                type:
                  - integer
                  - "null"
                description: |
                  Unsubscription timestamp (only available when the transaction
                  status is UNSUBSCRIBED), epoch time in milliseconds.
                format: int64
              vendor:
                type: object
                required:
                  - ID
                properties:
                  ID:
                    type: string
                    description: ID of the associated Vendor.
        more:
          $ref: "#/components/schemas/More"
    OccContext:
      deprecated: true
      type:
        - object
        - "null"
      required:
        - version
      x-createForbidden: true
      properties:
        lastUpdate:
          type:
            - integer
            - "null"
          format: int64
          example: 1577836800000
          readOnly: true
        version:
          minimum: 0
          type: integer
          example: 1
        who:
          type:
            - string
            - "null"
          example: John Doe
          readOnly: true
      description: |
        Optimistic Concurrency Control.

        This property must no longer be used: it is useless and ignored.
    ParsedOnboardingTag:
      type: object
      required:
        - parts
        - models
        - vendors
        - device
      properties:
        parts:
          type: object
          description: Elements parsed from the onboarding tag.
          required:
            - joinEUI
            - devEUI
            - prodID
          properties:
            joinEUI:
              type: string
              example: "1122334455667788"
            devEUI:
              type: string
              example: AABBCCDDEEFF0011
            profileID:
              type:
                - string
                - "null"
              example: AABB11122
            checksum:
              type:
                - string
                - "null"
              example: AF2C
            ownerToken:
              type:
                - string
                - "null"
              example: AABBCCDDEEFF
            serNum:
              type:
                - string
                - "null"
              example: YYWWNNNNNN
            proprietary:
              type:
                - string
                - "null"
              example: FOOBAR
        models:
          description: >
            Models matching the LoRaWAN® profile identifier of the onboarding
            tag.


            The list may be empty if no matching device model found. The list may contains

            more than one model if multiple models reference the profile identifier.
          type: array
          items:
            type: object
            required:
              - ID
              - commercialName
              - logo
              - vendor
            properties:
              ID:
                type: string
                description: |
                  Device Profile ID
                example: SMTC/LoRaMote.2.Join
              commercialName:
                type: string
                description: Device Profile commercial name
                readOnly: true
                example: LoRaMote fw3/JOIN
              logo:
                type: string
                description: Device Profile logo href
                readOnly: true
                example: /thingpark/wireless/rest/resources/files/logo/deviceProfile/42
              defaultIsmBands:
                type:
                  - array
                  - "null"
                description: >
                  List of ISM bands supported by the device profile.

                  This list is an intersection between subscriber ISM bands and supported ISM bands.
                items:
                  type: object
                  properties:
                    ID:
                      type:
                        - string
                        - "null"
                      description: ISM band ID
                      example: eu868
                    name:
                      type:
                        - string
                        - "null"
                      description: ISM band name
                      example: EU863-870 (EU868)
              vendor:
                type: object
                required:
                  - ID
                properties:
                  ID:
                    type: string
                    description: ID of the device vendor
                    example: semtech
                  commercialName:
                    type:
                      - string
                      - "null"
                    description: Commercial name of the device vendor
                    example: Semtech
                  commercialDescription:
                    type:
                      - string
                      - "null"
                    description: Commercial description of the device vendor
                    example: Semtech devices
                  logo:
                    type:
                      - string
                      - "null"
                    description: Logo HREF of the device vendor
                    example: /thingpark/wireless/rest/resources/files/logo/deviceVendor/484
        vendors:
          description: >
            Vendors matching the vendor identifier part of the LoRaWAN® device
            profile

            identifier of the onboarding tag.


            The list may be empty if no matching vendor found. The list may contains

            more than one vendor if multiple vendors reference the vendor identifier.
          type: array
          items:
            type: object
            required:
              - ID
            properties:
              ID:
                type: string
                description: ID of the device vendor
                example: semtech
              commercialName:
                type:
                  - string
                  - "null"
                description: Commercial name of the device vendor
                example: Semtech
              commercialDescription:
                type:
                  - string
                  - "null"
                description: Commercial description of the device vendor
                example: Semtech devices
              logo:
                type:
                  - string
                  - "null"
                description: Logo HREF of the device vendor
                example: /thingpark/wireless/rest/resources/files/logo/deviceVendor/484
        device:
          type: object
          description: Device resource that can be used to create the device corresponding
            to the onboarding tag.
          required:
            - name
            - EUI
            - connectivity
            - activation
            - appEUI
          properties:
            EUI:
              type: string
              description: |
                DevEUI (16 hexadecimal characters / upper case)
              example: AABBCCDDEEFF0011
            connectivity:
              type: string
              enum:
                - LORAWAN
              description: |
                Device connectivity, always LORAWAN
              default: LORAWAN
            model:
              type:
                - object
                - "null"
              description: Model matching the onboarding tag. Present only if exactly one
                model match.
              required:
                - ID
                - vendor
              properties:
                ID:
                  type: string
                  description: |
                    Device Profile ID
                  example: SMTC/LoRaMote.2.Join
                vendor:
                  type: object
                  required:
                    - ID
                  properties:
                    ID:
                      type: string
                      description: ID of the device vendor
                      example: semtech
            name:
              type: string
              description: The name is generated.
              example: AA-BB-CC-DD-EE-FF-00-11
            activation:
              enum:
                - OTAA
              type: string
              example: OTAA
              description: |
                Type of activation associated to the device:
                - OTAA: Over The Air Activation
                Always OTAA.
            appEUI:
              type: string
              description: |
                LoRaWAN JoinEUI/AppEUI (16 hexadecimal characters)
              example: "1122334455667788"
            ownerToken:
              type:
                - string
                - "null"
              description: |
                Owner token proving the ownership of the device
              example: AABBCCDDEEFF
    PublicRsaJsonWebKey:
      description: A RSA public key as a JSON Web Key
      type: object
      required:
        - kid
        - kty
        - n
        - e
      properties:
        kid:
          type: string
          description: Key identifier (also named key version)
          example: TWK1
        kty:
          type: string
          description: Key type
          enum:
            - RSA
        n:
          type: string
          description: Base64url-encoded modulus
          example: iAquKWN2Fex2qRFchDvl6IlTPLNhN4vwcGG-oHadxJUCmMp_G0CX5yd7CF92-jJNw2HTdSnpr6RFLadk_7uOMV9hUX7GcMTJ22vyHWrjoBpHy8FzHw3mV-X3Vhs8K0zSNzeFFvCTbX2COTparCV_7F5EYJeXq8R1vXPxsVD-27bCRWDuTvt6-H1XE0dcw3_bznzXf7VRORgPP_mBPZWFpcL95V-WIyhjgADqIqwYqK-V2502ayOnk86Gu2_ksuDBP4ehjGQ5gVjOF-ZYvVPcC8gAnDy45tlC93Q6wILWdPD-vdzi3hp_nNRkUhfujlXlesAS2CxgON3TRfeLVQlQxw
        e:
          type: string
          description: Base64url-encoded public exponent
          example: AQAB
    Relay:
      type: object
      x-requiredRead:
        - enabled
      properties:
        enabled:
          type: boolean
          description: True if the relay activity is enabled for this device
          default: true
        cadPeriodicity:
          type:
            - integer
            - "null"
          format: int32
          description: |
            Delay in milliseconds between two consecutive Channel Activity
            Detection (CAD) scans performed by the relay on a single channel
          enum:
            - 1000
            - 500
            - 250
            - 100
            - 50
            - 20
            - null
          default: 1000
        defaultChannel:
          type:
            - object
            - "null"
          required:
            - index
          description: Settings of the Wake On Radio (WOR) default channel
          properties:
            index:
              type: integer
              format: int32
              description: |
                Index of the Wake On Radio (WOR) default channel. Refer to
                LoRaWAN Regional Parameters specification for more information.
              enum:
                - 0
                - 1
              default: 0
        secondChannel:
          type:
            - object
            - "null"
          description: Settings of the Wake On Radio (WOR) second channel
          required:
            - enabled
          properties:
            enabled:
              type: boolean
              description: |
                Enable the Wake On Radio (WOR) second channel. When two channels
                are used, the relay alternately scans the two channels.
              default: false
            frequency:
              type:
                - number
                - "null"
              format: float
              description: Frequency in MHz used for the second channel
              minimum: 433
              maximum: 928
            dataRate:
              type:
                - integer
                - "null"
              format: int32
              description: |
                Data rate used for the second channel. Refer to LoRaWAN Regional
                Parameters specification for more information on the bandwidth
                and spreading factor.
              minimum: 0
              maximum: 15
            worAckFrequencyOffset:
              type:
                - number
                - "null"
              format: float
              description: |
                Frequency offset in MHz used for the second channel WOR ACK
                frame
              enum:
                - 0
                - 0.2
                - 0.4
                - 0.8
                - 1.6
                - 3.2
                - null
          example:
            enabled: true
            frequency: 865.5
            dataRate: 3
            worAckFrequencyOffset: 0.4
        forwardFilterJoinRequestRules:
          type:
            - array
            - "null"
          description: |
            A relay is able to filter Join-Requests based on their JoinEUI and
            DevEUI. Up to 16 forward/filter rules can be defined. The
            forward/filter algorithm used is the longest prefix match (LPM).
          items:
            type: object
            description: Join-Requests forward/filter rule
            minItems: 1
            maxItems: 16
            required:
              - index
              - action
            properties:
              index:
                type: integer
                format: int32
                description: |
                  Index of the rule. The rule with index 0 defines the default
                  behavior and is mandatory. 2 rules cannot have the same index.
                minimum: 0
                maximum: 15
                default: 0
              action:
                type: integer
                format: int32
                description: |
                  Forward or filter the Join-Request messages matching the rule:
                  - 1: Forward
                  - 2: Filter
                minimum: 1
                maximum: 2
                default: 1
              joinEUI:
                type:
                  - string
                  - "null"
                description: >
                  Hexadecimal representation of the leftmost bytes of the
                  JoinEUI.

                  Not applicable to index 0, mandatory for indexes 1-15.
                pattern: ^([0-9a-fA-F][0-9a-fA-F]){1,8}$
              devEUI:
                type:
                  - string
                  - "null"
                description: >
                  Hexadecimal representation of the leftmost bytes of the
                  DevEUI.

                  Not applicable to index 0, optional for indexes 1-15. Forbidden

                  if `joinEUI` does not contain a full JoinEUI (16 hexadecimal characters).
                pattern: ^([0-9a-fA-F][0-9a-fA-F]){1,8}$
          example:
            - index: 0
              action: 2
            - index: 1
              action: 1
              joinEUI: ABCDEF
            - index: 2
              action: 2
              joinEUI: ABCDEFABCDEFABCD
            - index: 3
              action: 1
              joinEUI: ABCDEFABCDEFABCD
              devEUI: "12345678283746"
            - index: 4
              action: 2
              joinEUI: ABCDEFABCDEFABCD
              devEUI: "1234567828374648"
        forwardingLimitations:
          type:
            - object
            - "null"
          description: |
            A relay implements a function limiting the uplink forwarding. This
            function is based on a token bucket system. The relay only forwards
            the uplink when it has at least 1 token remaining for that type of
            message, and it decrements the associated bucket by 1 token while
            doing so.
          properties:
            resetTokenCounters:
              type:
                - integer
                - "null"
              format: int32
              description: |
                Instruct the relay to reset (or not) all the token counters:
                - 0: Set the token counters to 0
                - 1: Set the token counters to the reload rate
                - 2: Set the token counters to the maximum value
                - 3: Do not change the token counters
              minimum: 0
              maximum: 3
              default: 2
            joinRequest:
              type:
                - object
                - "null"
              description: Forwarding limitations for Join-Request messages.
              required:
                - enabled
              properties:
                enabled:
                  type: boolean
                  description: Enable the forwarding limitation for Join-Request messages.
                  default: true
                reloadRate:
                  type:
                    - integer
                    - "null"
                  format: int32
                  description: Number of tokens added every hour for Join-Request messages.
                  minimum: 0
                  maximum: 126
                  default: 4
                bucketSizeMultiplier:
                  type:
                    - integer
                    - "null"
                  format: int32
                  description: |
                    This parameter is used to determine the number of tokens
                    that the bucket for Join-Request messages can hold. It is
                    expressed as a multiplier of the `reloadRate`. For instance
                    if `reloadRate` is set to 4 and `bucketSizeMultiplier` is
                    set to 2, the bucket size is 8.
                  enum:
                    - 1
                    - 2
                    - 4
                    - 12
                    - null
                  default: 2
            notify:
              type:
                - object
                - "null"
              description: |
                Forwarding limitations for unknown end-device notifications.
              required:
                - enabled
              properties:
                enabled:
                  type: boolean
                  description: |
                    Enable the forwarding limitation for unknown end-device
                    notifications.
                  default: true
                reloadRate:
                  type:
                    - integer
                    - "null"
                  format: int32
                  description: |
                    Number of tokens added every hour for unknown end-device
                    notifications.
                  minimum: 0
                  maximum: 126
                  default: 4
                bucketSizeMultiplier:
                  type:
                    - integer
                    - "null"
                  format: int32
                  description: |
                    This parameter is used to determine the number of tokens
                    that the bucket for unknown end-device notifications can
                    hold. It is expressed as a multiplier of the `reloadRate`.
                    For instance if `reloadRate` is set to 4 and
                    `bucketSizeMultiplier` is set to 2, the bucket size is 8.
                  enum:
                    - 1
                    - 2
                    - 4
                    - 12
                    - null
                  default: 2
            globalUplink:
              type:
                - object
                - "null"
              description: |
                Forwarding limitations for uplinks of all trusted end-devices.
              required:
                - enabled
              properties:
                enabled:
                  type: boolean
                  description: |
                    Enable the forwarding limitation for uplinks of all trusted
                    end-devices.
                  default: true
                reloadRate:
                  type:
                    - integer
                    - "null"
                  format: int32
                  description: |
                    Number of tokens added every hour for uplinks of all trusted
                    end-devices.
                  minimum: 0
                  maximum: 126
                  default: 8
                bucketSizeMultiplier:
                  type:
                    - integer
                    - "null"
                  format: int32
                  description: |
                    This parameter is used to determine the number of tokens
                    that the bucket for uplinks of all trusted end-devices can
                    hold. It is expressed as a multiplier of the `reloadRate`.
                    For instance if `reloadRate` is set to 4 and
                    `bucketSizeMultiplier` is set to 2, the bucket size is 8.
                  enum:
                    - 1
                    - 2
                    - 4
                    - 12
                    - null
                  default: 2
            overall:
              type:
                - object
                - "null"
              description: Forwarding limitations for uplinks of all messages.
              required:
                - enabled
              properties:
                enabled:
                  type: boolean
                  description: >
                    Enable the forwarding limitation for uplinks of all messages.
                  default: true
                reloadRate:
                  type:
                    - integer
                    - "null"
                  format: int32
                  description: Number of tokens added every hour for all messages.
                  minimum: 0
                  maximum: 126
                  default: 8
                bucketSizeMultiplier:
                  type:
                    - integer
                    - "null"
                  format: int32
                  description: |
                    This parameter is used to determine the number of tokens
                    that the bucket for all messages can hold. It is expressed
                    as a multiplier of the `reloadRate`. For instance if
                    `reloadRate` is set to 4 and `bucketSizeMultiplier` is set
                    to 2, the bucket size is 8.
                  enum:
                    - 1
                    - 2
                    - 4
                    - 12
                    - null
                  default: 2
    RelayServedDevices:
      type: object
      required:
        - devices
      properties:
        devices:
          type: array
          description: List of devices served by the relay
          items:
            type: object
            required:
              - devAddr
              - devEUI
              - lastUpTimestamp
              - rssi
              - snr
              - esp
            properties:
              devAddr:
                type: string
                description: DevAddr
              devEUI:
                type: string
                description: DevEUI
              name:
                type:
                  - string
                  - "null"
                description: >
                  Device name.


                  Only returned if the device belongs to the same subscriber.

                  Additionally, if the authenticated user has domain restrictions,

                  only returned if the device matches the domain restrictions.
              href:
                type:
                  - string
                  - "null"
                description: >
                  Device href.


                  Only returned if the device belongs to the same subscriber.

                  Additionally, if the authenticated user has domain restrictions,

                  only returned if the device matches the domain restrictions.
              domains:
                type:
                  - array
                  - "null"
                description: >
                  List of domains associated with the device.


                  Only returned if the device belongs to the same subscriber.

                  Additionally, if the authenticated user has domain restrictions,

                  only returned if the device matches the domain restrictions.
                items:
                  $ref: "#/components/schemas/Domain"
              lastUpTimestamp:
                type: integer
                format: int64
                description: Timestamp of the last uplink frame, epoch time in milliseconds
              loc:
                type:
                  - object
                  - "null"
                description: Last known device location (when available)
                required:
                  - lat
                  - lon
                properties:
                  lat:
                    type: number
                    description: Device latitude
                    format: float
                  lon:
                    type: number
                    description: Device longitude
                    format: float
              rssi:
                type: number
                description: Last RSSI
                format: float
              snr:
                type: number
                description: Last SNR
                format: float
              esp:
                type: number
                description: Last ESP
                format: float
          example:
            - devAddr: 04F5F519
              devEUI: "2504201820020000"
              name: Device 1
              href: /thingpark/wireless/rest/subscriptions/72619/devices/183760
              domains:
                - name: France/Paris
                  group:
                    name: Site
                - name: Location
                  group:
                    name: Vertical
              lastUpTimestamp: 1577836800000
              loc:
                lat: 48.636
                lon: -1.5114
              rssi: -48
              snr: 10
              esp: -48.41
            - devAddr: 04F5F51A
              devEUI: "2504201820020001"
              name: Device 2
              href: /thingpark/wireless/rest/subscriptions/72619/devices/183763
              domains:
                - name: France/Lyon
                  group:
                    name: Site
                - name: Energy
                  group:
                    name: Vertical
              lastUpTimestamp: 1577836800000
              loc:
                lat: 48.636
                lon: -1.5114
              rssi: -36
              snr: 9.25
              esp: -36.48
    SecurityAppServer:
      type: object
      required:
        - downlinkSecurity
      properties:
        downlinkSecurity:
          type: object
          required:
            - status
          properties:
            asID:
              type:
                - string
                - "null"
              description: >
                AS ID for uplink/downlink security


                Allowed characters: alphanumeric, dash (-), dot (.) and underscore (_)
            downlinkAsKey:
              type:
                - string
                - "null"
              description: AS Transport Key
              writeOnly: true
            maxTimestampDeviation:
              type:
                - integer
                - "null"
              description: |
                Downlink maximal timestamp deviation in seconds
                0 means no maximal timestamp deviation
              format: int32
            status:
              enum:
                - DOWNLINK_AS_KEY
                - NONE
              type: string
              description: >
                When set to DOWNLINK_AS_KEY: asID and downlinkAsKey are
                mandatory, maxTimestampDeviation is optional.


                When set to NONE: asID, downlinkAsKey and maxTimestampDeviation are forbidden.
        occContext:
          $ref: "#/components/schemas/OccContext"
    SfDistributions:
      type: object
      required:
        - briefs
        - up
        - dw
      properties:
        briefs:
          type: array
          items:
            type: object
            required:
              - sf
              - up
              - dw
            properties:
              sf:
                type: integer
                minimum: 7
                maximum: 12
                description: |
                  Reference spreading factor (7 to 12) used for this brief.
              up:
                type: object
                required:
                  - count
                properties:
                  count:
                    type: integer
                    description: |
                      Number of uplink frames received with this SF.
              dw:
                type: object
                required:
                  - count
                properties:
                  count:
                    type: integer
                    description: |
                      Number of downlink frames received with this SF.
        up:
          type: object
          required:
            - totalCount
          properties:
            totalCount:
              type: integer
              description: |
                Total number of uplink frames analyzed on the reference period.
        dw:
          type: object
          required:
            - totalCount
          properties:
            totalCount:
              type: integer
              description: |
                Total number of downlink frames analyzed on the reference
                period.
    Subscription:
      type: object
      required:
        - creationTimestamp
        - networkSubscriptionsHandling
        - state
        - subscriber
        - subscription
        - operator
        - options
      properties:
        alarmStateNotifications:
          type:
            - string
            - "null"
          description: |
            Alarm state notification XML document

            ```xml
            <!-- Example for the basic mode -->
            <notifications>
              <state val="1-6">
                <contact address="sms:+33123456789"/>
                <contact address="email:john.doe@supplier1.com"/>
                <contact address="email:alice.smith@supplier1.com"/>
              </state>
            </notifications>


            <!-- Example for the advanced mode -->
            <notifications>
              <state val="3">
                <contact address="email:john.doe@supplier1.com"/>
              </state>
              <state val="4-6">
                <contact address="sms:+33123456789"/>
                <contact address="email:john.doe@supplier1.com"/>
                <contact address="email:alice.smith@supplier1.com"/>
              </state>
            </notifications>
            ```
          example: |
            <notifications>
              <state val="1-6">
                <contact address="sms:+33123456789"/>
                <contact address="email:john.doe@supplier1.com"/>
                <contact address="email:alice.smith@supplier1.com"/>
              </state>
            </notifications>
        baseStationTagsNamespace:
          enum:
            - OPERATOR
            - SUBSCRIBER
            - ALL
            - null
          type:
            - string
            - "null"
          description: >
            Base Station Tags Namespace:

            - When set to OPERATOR, Base Station tags defined in the Operator Namespace are used for Multicast purposes.

            - When set to SUBSCRIBER, Base Station tags defined in the Subscriber Namespace are used for Multicast purposes.

            - When set to ALL, Base Station tags defined in the Operator Namespace and the Subscriber Namespace are used for Multicast purposes.


            This parameter must no longer be used: always set to ALL.
          readOnly: true
          deprecated: true
        creationTimestamp:
          type: integer
          format: int64
          example: 1577836800000
          description: Epoch time in milliseconds when the Subscription was created
          readOnly: true
        defaultIsmBand:
          type:
            - object
            - "null"
          deprecated: true
          description: >
            This property must no longer be used: the property `defaultIsmBands`
            must be used in replacement.
          properties:
            ID:
              $ref: "#/components/schemas/IsmBandID"
            name:
              $ref: "#/components/schemas/IsmBandName"
        defaultIsmBands:
          type:
            - array
            - "null"
          items:
            type: object
            properties:
              ID:
                $ref: "#/components/schemas/IsmBandID"
              name:
                $ref: "#/components/schemas/IsmBandName"
        installationID:
          type:
            - string
            - "null"
          description: Installation ID
          readOnly: true
          example: adea5b3fe3d76ec7d424bc3d04d2a8634cbf30675bce559c16a814ebf92a4fe7
        networkSubscriptionsHandling:
          type: object
          readOnly: true
          required:
            - mode
          properties:
            mode:
              type: string
              enum:
                - BASIC
                - ADVANCED
              description: |
                Network subscriptions handling mode:
                - `BASIC`: Network subscriptions associated with devices and
                  multicast groups are automatically selected without the need
                  to provide their IDs. Supported network subscription settings
                  are described in the `supportedNetworkSubscriptions` property.
                  Only applicable to ThingPark Enterprise.
                - `ADVANCED`: Network subscriptions associated with devices and
                  multicast groups are explicitly selected based on their IDs.
            supportedNetworkSubscriptions:
              type:
                - array
                - "null"
              description: |
                List of supported network subscription settings.

                Only returned when mode is `BASIC`.
              items:
                type: object
                description: Supported network subscription settings
                required:
                  - communicationType
                  - connectivity
                properties:
                  communicationType:
                    type: string
                    enum:
                      - UNICAST
                      - MULTICAST
                    description: |
                      Communication type:
                      - `UNICAST`: Unicast communication
                      - `MULTICAST`: Multicast communication
                  connectivity:
                    type: string
                    enum:
                      - LORAWAN
                      - CELLULAR
                    description: |
                      Connectivity:
                      - `LORAWAN`: LoRaWAN connectivity
                      - `CELLULAR`: Cellular connectivity

                      `CELLULAR` is only applicable if the
                      cellular connectivity is enabled.
                  maxDestinationPerRoute:
                    type:
                      - integer
                      - "null"
                    description: |
                      Number of allowed Third Party Application Servers.

                      Only applicable if `communicationType` is `UNICAST`.
                    format: int32
                    example: 5
                  nwGeolocalization:
                    type:
                      - boolean
                      - "null"
                    description: |
                      True if network geolocation is enabled.

                      Only applicable if `communicationType` is `UNICAST` and
                      `connectivity` is `LORAWAN`.
                  prAllowed:
                    type:
                      - boolean
                      - "null"
                    description: |
                      True if passive roaming is allowed.

                      Only applicable if `communicationType` is `UNICAST` and
                      `connectivity` is `LORAWAN`.
              example:
                - communicationType: UNICAST
                  connectivity: LORAWAN
                  maxDestinationPerRoute: 5
                  nwGeolocalization: false
                  prAllowed: false
                - communicationType: UNICAST
                  connectivity: LORAWAN
                  maxDestinationPerRoute: 5
                  nwGeolocalization: true
                  prAllowed: false
                - communicationType: UNICAST
                  connectivity: LORAWAN
                  maxDestinationPerRoute: 5
                  nwGeolocalization: false
                  prAllowed: true
                - communicationType: UNICAST
                  connectivity: LORAWAN
                  maxDestinationPerRoute: 5
                  nwGeolocalization: true
                  prAllowed: true
                - communicationType: MULTICAST
                  connectivity: LORAWAN
        nonRoamingDevicesNetID:
          type:
            - string
            - "null"
          maxLength: 6
          minLength: 6
          pattern: ^([02]000[0-3][0-9a-fA-F]|400[0-1][0-9a-fA-F]{2}|[6-9a-fA-F][0-9a-fA-F]{5})$
          description: NetID used for non-roaming Devices at Subscription level. NetID
            defined at Operator level is used if not set.
          readOnly: true
          example: "000000"
        nsID:
          type:
            - string
            - "null"
          maxLength: 16
          minLength: 16
          pattern: ^[0-9a-fA-F]{16}$
          description: NSID at Subscription level. NSID defined at Operator level is used
            if not set.
          example: F03D290200000000
        occContext:
          $ref: "#/components/schemas/OccContext"
        operator:
          type: object
          required:
            - nonRoamingDevicesNetID
            - roamingDevicesNetID
          readOnly: true
          properties:
            nonRoamingDevicesNetID:
              type: string
              maxLength: 6
              minLength: 6
              pattern: ^([02]000[0-3][0-9a-fA-F]|400[0-1][0-9a-fA-F]{2}|[6-9a-fA-F][0-9a-fA-F]{5})$
              description: NetID used for non-roaming Devices at Operator level.
              example: "000000"
            nsID:
              type:
                - string
                - "null"
              maxLength: 16
              minLength: 16
              pattern: ^[0-9a-fA-F]{16}$
              description: NSID at Operator level.
              example: F03D290200000000
            roamingDevicesNetID:
              type: string
              maxLength: 6
              minLength: 6
              pattern: ^([02]000[0-3][0-9a-fA-F]|400[0-1][0-9a-fA-F]{2}|[6-9a-fA-F][0-9a-fA-F]{5})$
              description: NetID used for roaming Devices at Operator level.
              example: "000002"
        options:
          type: object
          required:
            - cellularSupport
            - license
            - hsm
          readOnly: true
          properties:
            cellularSupport:
              enum:
                - DEACTIVATED
                - SPR
                - HSS_SPR
              type: string
              description: >
                Support of cellular devices:

                - 'DEACTIVATED': cellular devices cannot be created

                - 'SPR': cellular devices can be created, only SPR data must be provided

                - 'HSS_SPR': cellular devices can be created, HSS and SPR data must be provided
            devAddrValidation:
              deprecated: true
              enum:
                - DEACTIVATED
                - ADM-VC
                - null
              type:
                - string
                - "null"
              description: >
                DevAddr validation option:

                - DEACTIVATED

                - ADM-VC (ADM verification code validation)


                This property must no longer be used: the associated feature is no more available in the product.
            devEUIValidation:
              deprecated: true
              enum:
                - DEACTIVATED
                - ADM-VC
                - null
              type:
                - string
                - "null"
              description: >
                DevEUI validation option:

                - DEACTIVATED

                - ADM-VC (ADM verification code validation)


                This property must no longer be used: the associated feature is no more available in the product.
            externalJS:
              enum:
                - DEACTIVATED
                - ACTIVATED
                - null
              type:
                - string
                - "null"
              description: >
                External Join Server option:

                - DEACTIVATED

                - ACTIVATED


                This property must no longer be used: it is ignored, the external Join Server option is always activated.
              deprecated: true
            license:
              enum:
                - DEACTIVATED
                - ACTIVATED
              type: string
              description: |
                License option:
                - DEACTIVATED
                - ACTIVATED
            hsm:
              enum:
                - DEACTIVATED
                - ACTIVATED
              type: string
              description: >
                Hardware Security Module (HSM) option:

                - DEACTIVATED: the root keys of LoRaWAN OTAA devices cannot be protected by an HSM

                - ACTIVATED: the root keys of LoRaWAN OTAA devices can be protected by an HSM
        roamingDevicesNetID:
          type:
            - string
            - "null"
          maxLength: 6
          minLength: 6
          pattern: ^([02]000[0-3][0-9a-fA-F]|400[0-1][0-9a-fA-F]{2}|[6-9a-fA-F][0-9a-fA-F]{5})$
          description: NetID used for roaming Devices at Subscription level. NetID defined
            at Operator level is used if not set.
          readOnly: true
          example: "000002"
        segregationID:
          type:
            - string
            - "null"
          maxLength: 8
          minLength: 8
          pattern: ^[0-9a-fA-F]{8}$
          description: Segregation ID used for Devices. When not set, the segregation ID
            is automatically generated based on network traffic segregation
            defined at Operator level.
          readOnly: true
          example: 1234ABCD
        showTagSuggestionsWhenDomainRestrictions:
          type:
            - boolean
            - "null"
          description: |
            When false, tag suggestions cannot be retrieved by users having
            domain restrictions for confidentiality purposes.
          default: true
        state:
          type: object
          readOnly: true
          required:
            - value
            - timestamp
          properties:
            timestamp:
              type: integer
              format: int64
              example: 1577836800000
            value:
              type: string
              example: ACTIVE
        subscriber:
          type: object
          required:
            - ID
            - name
          readOnly: true
          properties:
            ID:
              type: string
              example: "199906997"
            extID:
              type:
                - string
                - "null"
              description: External subscriber ID
              example: extID1
            name:
              type: string
              example: John Doe
            organization:
              type:
                - string
                - "null"
              example: ACME
        subscription:
          type: object
          readOnly: true
          required:
            - grantedPermissions
          properties:
            grantedPermissions:
              type: array
              items:
                type: string
                enum:
                  - x
                  - a
                  - ra
                  - rc
                  - s1
            domainRestrictions:
              $ref: "#/components/schemas/DomainRestrictions"
        twaExchangeKeyVersion:
          type:
            - string
            - "null"
          description: |
            TWA Exchange Key (RSA) version used to encrypt keys when
            HSM is not used
          example: TWK1
          readOnly: true
    TagName:
      type: string
      pattern: ^[^\x00-\x20\x3C\x3E\x7F]([^\x00-\x1F\x3C\x3E\x7F]{0,38}[^\x00-\x20\x3C\x3E\x7F])?$
      description: Tag name
      example: tag1
    TagSuggestions:
      type: object
      required:
        - briefs
        - query
      properties:
        briefs:
          type: array
          description: List of tags matching the query string
          items:
            type: object
            required:
              - name
            properties:
              name:
                $ref: "#/components/schemas/TagName"
          example:
            - name: tag1
            - name: tag2
            - name: tag3
        query:
          type: string
          description: The query string provided in the request
          example: tag
    AlarmsSubscription:
      type: object
      required:
        - minimumSeverity
      properties:
        minimumSeverity:
          type: integer
          description: Notifies alarms equal to the selected severity or higher
          format: int32
          minimum: 2
          maximum: 6
          example: 2
        href:
          type:
            - string
            - "null"
          description: HREF of the user alarms subscription
          readOnly: true
          example: /thingpark/wireless/rest/subscriptions/33/users/tpk-100000123/alarmsSubscription
    UsersAlarmsSubscriptions:
      type: object
      readOnly: true
      required:
        - briefs
        - more
      properties:
        briefs:
          type: array
          items:
            type: object
            required:
              - user
              - subscription
            properties:
              user:
                type: object
                required:
                  - thingparkID
                properties:
                  thingparkID:
                    type: string
                    description: ThingPark ID of the user
                    example: tpk-100000123
              subscription:
                $ref: "#/components/schemas/AlarmsSubscription"
        more:
          $ref: "#/components/schemas/More"
    More:
      type:
        - boolean
        - "null"
      description: "`TRUE` when more briefs can be retrieved with an upper page index."
      example: false
  responses:
    Alarms:
      description: Successful RETRIEVE
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/Alarms"
    AlarmsActive:
      description: Successful RETRIEVE
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/AlarmsActive"
    AlarmsDevice:
      description: Successful RETRIEVE
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/AlarmsDevice"
    AlarmsDeviceActive:
      description: Successful RETRIEVE
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/AlarmsDeviceActive"
    AlarmsDevicesStateDistributions:
      description: Successful RETRIEVE
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/AlarmsDevicesStateDistributions"
    AlarmsMulticastGroupActive:
      description: Successful RETRIEVE
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/AlarmsMulticastGroupActive"
    AppServer:
      description: Successful UPDATE or RETRIEVE
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/AppServer"
          examples:
            subscriberBasicHttps:
              $ref: "#/components/examples/AppServerSubscriptionBasicHttps"
            subscriberTpxIotFlow:
              $ref: "#/components/examples/AppServerSubscriptionTpxIotFlow"
            operator:
              $ref: "#/components/examples/AppServerOperator"
    AppServerIotFlowConnectorMetrics:
      description: Successful RETRIEVE
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/AppServerIotFlowConnectorMetrics"
    AppServers:
      description: Successful UPDATE or RETRIEVE
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/AppServers"
    AsTransportKey:
      description: Successful RETRIEVE
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/AsTransportKey"
    AsTransportKeys:
      description: Successful RETRIEVE
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/AsTransportKeys"
    Async:
      description: |
        Asynchronous task is successfully created.
        Task href is returned in Location HTTP header.
    BatLevels:
      description: Successful UPDATE or RETRIEVE
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/BatLevels"
    BsTagSuggestions:
      description: Successful RETRIEVE
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/BsTagSuggestions"
    CellularNetworkContext:
      description: Successfull RETRIEVE
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/CellularNetworkContext"
    CellularNetworkContexts:
      description: Successfull RETRIEVE
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/CellularNetworkContexts"
    Counters:
      description: Successful UPDATE or RETRIEVE
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/Counters"
    Delete:
      description: Successful DELETE
    Device:
      description: Successful UPDATE or RETRIEVE
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/Device"
    DeviceProfiles:
      description: Successful UPDATE or RETRIEVE
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/DeviceProfiles"
    DeviceTag:
      description: Successful CREATE
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/DeviceTag"
    DeviceTags:
      description: Successful RETRIEVE
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/DeviceTags"
    DeviceVendors:
      description: Successful UPDATE or RETRIEVE
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/DeviceVendors"
    Devices:
      description: Successful UPDATE or RETRIEVE
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/Devices"
    Drivers:
      description: Successful RETRIEVE
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/Drivers"
    DevicesClusters:
      description: Successful RETRIEVE
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/DevicesClusters"
    Error:
      description: Unexpected error
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/Error"
    FramesDevice:
      description: Successful UPDATE or RETRIEVE
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/FramesDevice"
    FramesDeviceAggregation:
      description: Successful UPDATE or RETRIEVE
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/FramesDeviceAggregation"
    FramesDevices:
      description: Successful UPDATE or RETRIEVE
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/FramesDevices"
    FramesMulticastGroup:
      description: Successful RETRIEVE
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/FramesMulticastGroup"
    FramesMulticastGroupAggregation:
      description: Successful RETRIEVE
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/FramesMulticastGroupAggregation"
    HsmGroups:
      description: Successful UPDATE or RETRIEVE
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/HsmGroups"
    IsmBands:
      description: Successful UPDATE or RETRIEVE
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/IsmBands"
    Locations:
      description: Successful UPDATE or RETRIEVE
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/Locations"
    MulticastDownlinkSettings:
      description: Successful RETRIEVE
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/MulticastDownlinkSettings"
    MulticastGroup:
      description: Successful CREATE, UPDATE or RETRIEVE
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/MulticastGroup"
    MulticastGroupBss:
      description: Successful RETRIEVE
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/MulticastGroupBss"
    MulticastGroupBssTags:
      description: Successful RETRIEVE
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/MulticastGroupBssTags"
    MulticastGroupBssTag:
      description: Successful CREATE
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/MulticastGroupBssTag"
    MulticastGroups:
      description: Successful RETRIEVE
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/MulticastGroups"
    NetworkSubscription:
      description: Successful UPDATE or RETRIEVE
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/NetworkSubscription"
    NetworkSubscriptions:
      description: Successful UPDATE or RETRIEVE
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/NetworkSubscriptions"
    NwSubsTransactions:
      description: Successful UPDATE or RETRIEVE
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/NwSubsTransactions"
    OnboardingTag:
      description: Successful read
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/ParsedOnboardingTag"
    Relay:
      description: Successful UPDATE or RETRIEVE
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/Relay"
    RelayServedDevices:
      description: Successful UPDATE or RETRIEVE
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/RelayServedDevices"
    SecurityAppServer:
      description: Successful UPDATE or RETRIEVE
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/SecurityAppServer"
    SfDistributions:
      description: Successful RETRIEVE
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/SfDistributions"
    Subscription:
      description: Successful UPDATE or RETRIEVE
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/Subscription"
    TagSuggestions:
      description: Successful RETRIEVE
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/TagSuggestions"
    AlarmsSubscription:
      description: Successful CREATE, UPDATE or RETRIEVE
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/AlarmsSubscription"
    UsersAlarmsSubscriptions:
      description: Successful RETRIEVE
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/UsersAlarmsSubscriptions"
  parameters:
    AggregationBegin:
      name: begin
      in: query
      description: >
        Begining date/time of the history window.


        Syntax: ISO 8601 date/time including time offset. If no time offset is

        provided the server's offset is used by default.


        If this query parameter is not specified, the beginning of the history

        window is determined by subtracting the requested duration (e.g. 7 days)

        from the date and time corresponding to the end of the ongoing step (e.g.

        the end of the current hour or current day).
      schema:
        type: string
        format: date-time
    AggregationStep:
      name: step
      in: query
      description: |
        Aggregation step (OPTIONAL). This parameter is used to determine the
        size of each time slot.

        Default value: When this query parameter is not specified the **PT1H**
        duration is used by default.

        Supported duration step: **PTxH** (between 1...24 hours) or **P1D** (1
        day, take into account STD and DST clock shifts when applicable to the
        selected time zone)
      schema:
        type: string
        default: PT1H
    Alarm:
      name: alarmUid
      in: path
      description: Uid of Alarm
      required: true
      schema:
        type: string
        example: 5d31b91ccc9cc606607bc0a8
    AlarmAcked:
      name: acked
      in: query
      description: Only returns alarms that match the query parameter
      schema:
        type: boolean
    AlarmID:
      name: ID
      in: query
      description: ID of the alarm
      schema:
        type: integer
        format: int32
    AlarmIndex:
      name: index
      in: query
      description: Index of the alarm
      schema:
        type: string
    AlarmHistoryState:
      name: state
      in: query
      description: >
        Only returns alarm for which the state is equal or upper than the
        provided state according to the following definition:

        - 6: returns CRITICAL alarms (state = 6)

        - 5: returns CRITICAL and MAJOR alarms (state >=5)

        - 4: returns CRITICAL, MAJOR and MINOR alarms (state >=4)

        - 3: returns CRITICAL, MAJOR, MINOR and WARNING alarms (state >= 3)


        Note: When this query parameter is not specified, alarms are returned without consideration for the state.
      schema:
        type: integer
        format: int32
        minimum: 3
        maximum: 6
    AlarmState:
      name: state
      in: query
      description: >
        Only returns alarm for which the state is equal or upper than the
        provided state according to the following definition:

        - 6: returns CRITICAL alarms (state = 6)

        - 5: returns CRITICAL and MAJOR alarms (state >=5)

        - 4: returns CRITICAL, MAJOR and MINOR alarms (state >=4)

        - 3: returns CRITICAL, MAJOR, MINOR and WARNING alarms (state >= 3)

        - 2: return all UNCLEARED alarms (state >=2)

        - 1: only returns CLEARED alarms (state = 1)


        Note: When this query parameter is not specified, alarms are returned without consideration for the state (i.e. alarms can be UNCLEARED or CLEARED)
      schema:
        type: integer
        format: int32
        minimum: 1
        maximum: 6
    AlarmUid:
      name: alarmUid
      in: query
      description: Alarm Uid identifying the alarm occurrence
      schema:
        type: string
        example: 5d31b91ccc9cc606607bc0a8
    AppServer:
      name: appServerUid
      in: path
      description: |
        Unique identifier of the application server, either
        * the sequential integer (`UID`) of the application server (only
          applicable to application servers with the `SUBSCRIPTION` scope)
        * the identifier (`ID`) of the application server prefixed by `id:`
          (applicable to all application servers)
      required: true
      examples:
        uid:
          summary: UID
          value: "123"
        ID:
          summary: Application Server ID
          value: id:TWA_199906997.1123
      schema:
        type: string
        example: "123"
    AsTransportKey:
      name: asTransportKeyID
      in: path
      required: true
      description: ID of the AS transport key
      schema:
        type: string
        example: ASTK_3BC
    Async:
      name: async
      in: query
      description: |
        Triggers the asynchronous behavior.
        When not set, the synchronous behavior is triggered.
      schema:
        type: boolean
        default: false
      allowEmptyValue: true
    BsTagExclude:
      name: exclude
      in: query
      description: >
        Syntax: `<name>,<namespace>`


        Excludes any Base Station tag matching the `<name>` (exact match) in the `<namespace>`.


        `<namespace>` may be:

        - OPERATOR: public tag managed by the Operator

        - SUBSCRIBER: private tag managed by the Subscriber
      schema:
        type: array
        items:
          type: string
    CellularNetworkContext:
      name: networkContextID
      in: path
      required: true
      description: ID of the cellular network context
      schema:
        type: string
        example: 1AF3B
    DevEUIFilter:
      name: devEUI
      in: query
      description: Device EUI filtering (prefix match)
      schema:
        type: array
        items:
          type: string
    Device:
      name: deviceUid
      in: path
      description: >
        Unique identifier of the device, either

        * the sequential integer (`UID`) assigned to the device at creation (for example `123`)

        * the `EUI` in uppercase prefixed with the e letter in downcase (for example `e000000000522D8EB`)
      required: true
      examples:
        uid:
          summary: UID
          value: "123"
        devEUI:
          summary: EUI of a LoRaWAN device (devEUI)
          value: e000000000522D8EB
        imei:
          summary: IMEI of a Cellular device (deprecated)
          value: e61684684684678
      schema:
        type: string
        pattern: ^(\d+|e[0-9A-F]+)$
        example: "123"
    DeviceAlarmLevel:
      name: alarmLevel
      in: query
      description: >
        Only returns Devices for which one or several NOT-ACKED alarms exist:

        - 6: returns devices with at least a CRITICAL nack alarm (state = 6)

        - 5: returns devices with at least a CRITICAL or a MAJOR nack alarm (state >=5)

        - 4: returns devices with at least a CRITICAL, MAJOR or MINOR nack alarm (state >=4)

        - 3: returns devices with at least a CRITICAL, MAJOR, MINOR or WARNING nack alarm (state >=3)

        - 2: return devices with at least an UNCLEARED nack alarm (state >=2)

        - 1: return devices with at least an UNCLEARED or CLEARED nack alarm (state >=1)


        Note: When this query parameter is not specified, devices are returned without consideration for alarms.
      schema:
        type: integer
        format: int32
    DeviceAppServerID:
      name: appServerID
      in: query
      description: |
        Only returns Devices associated with the Application Server through
        direct association or through AS Routing Profile.

        Multiple values can be set: in this case Devices must be associated
        with all provided Application Servers.
      schema:
        type: array
        items:
          type: string
      style: form
      explode: true
    DeviceBatteryLevel:
      name: batteryLevel
      in: query
      description: >
        Only returns Devices for which the last known battery level is equal or
        lower than the provided battery level.


        Note: No including 0 (because 0 means powered)
      schema:
        type: integer
        format: int32
    DeviceCellularIMEI:
      name: imei
      in: query
      description: |
        Only return cellular devices with a matching `lastIMEI`.
      schema:
        type: string
      example: "862156804039920"
    DeviceCellularNetworkContext:
      name: networkContextID
      in: query
      description: Return devices attached to the cellular network context
      schema:
        type: string
        example: 1AF3B
    DeviceCellularSimID:
      name: simID
      in: query
      description: >
        Only return cellular devices attached to a SIM card having this ID
        (prefix match).

        The SIM ID may be an IMSI, ICCID or eID.
      schema:
        type: string
      examples:
        IMSI:
          summary: IMSI
          value: "460004777770001"
        ICCID:
          summary: ICCID
          value: "89208013535718672291"
        eID:
          summary: eID
          value: "89345678912345678912345678912370"
    DeviceConnectivity:
      name: connectivity
      in: query
      description: |
        Returns Devices matching connectivity:
        - `LORAWAN`
        - `CELLULAR`

        `CELLULAR` is only applicable if the
        cellular connectivity is enabled.
      schema:
        enum:
          - LORAWAN
          - CELLULAR
        type: string
    DeviceConnectivityPlanFilter:
      name: connectivityPlan
      in: query
      description: |
        When the string contains a network subscription ID: Only Devices
        associated with the network subscription are returned.

        When the string contains the _NOCP keyword: Only Devices not
        associated with a network subscription are returned. 

        When the string contains the _CP keyword: Only Devices attached with
        a network subscription are returned (without consideration for the
        network subscription).

        This parameter must no longer be used: the parameter
        `networkSubscriptionID` must be used in replacement.
      schema:
        type: string
      deprecated: true
    DeviceLoraWanAsTransportKey:
      name: asTransportKeyID
      in: query
      description: Only return LoRaWAN devices attached to the AS transport key having
        this ID (exact match).
      schema:
        type: string
        example: ASTK_3BC
    DeviceLoraWanRelayEnabled:
      name: relayEnabled
      in: query
      description: >
        Only return LoRaWAN devices for which the relay activity is enabled or
        disabled.
      schema:
        type: boolean
    DeviceNetworkSubscriptionIDFilter:
      name: networkSubscriptionID
      in: query
      description: |
        When the string contains a network subscription ID: Only Devices
        associated with the network subscription are returned.

        When the string contains the `_unset` keyword: Only Devices not
        associated with a network subscription are returned.

        When the string contains the `_any` keyword: Only Devices attached with
        a network subscription are returned (without consideration for the
        network subscription).
      schema:
        type: string
    DeviceNwGeolocalizationFilter:
      name: nwGeolocalization
      in: query
      description: |
        Only returns Devices associated with a network subscription matching
        this network geolocation value.

        Ignored if `networkSubscriptionID` query parameter is used.

        **Only applicable when connectivity is 'LORAWAN'**
      schema:
        type: boolean
    DevicePrAllowedFilter:
      name: prAllowed
      in: query
      description: |
        Only returns Devices associated with a network subscription matching
        this passive roaming value.

        Ignored if `networkSubscriptionID` query parameter is used.

        **Only applicable when connectivity is 'LORAWAN'**
      schema:
        type: boolean
    DeviceFrom:
      name: from
      in: query
      description: >
        Only returns Devices created on or after this date/time.


        Syntax: ISO 8601 date/time including time offset. If no time offset is provided the server's offset is used by default.
      schema:
        type: string
        format: date-time
      example: 2018-08-24T09:27:59.512Z
    DeviceHealthState:
      name: healthState
      in: query
      description: |
        Health state filtering.

        Multiple values can be set. If not provided, all Devices are
        returned.
      schema:
        type: array
        items:
          $ref: "#/components/schemas/DeviceHealthState"
      style: form
      explode: true
    DeviceInfRSSI:
      name: infRSSI
      in: query
      description: |
        Only returns Devices for which the average RSSI is equal or lower
        than the provided RSSI.
      schema:
        type: number
        format: float
    DeviceInfSNR:
      name: infSNR
      in: query
      description: |
        Only returns Devices for which the average SNR is equal or lower
        than the provided SNR.
      schema:
        type: number
        format: float
    DeviceNameFilter:
      name: name
      in: query
      description: Device name filtering (prefix match)
      schema:
        type: string
    DeviceQuery:
      name: query
      in: query
      description: |
        Search devices with a devEUI or a name containing the provided term.
        (prefix match)
      schema:
        type: string
    DeviceSupSNR:
      name: supSNR
      in: query
      description: |
        Only returns Devices for which the average SNR is equal or upper
        than the provided SNR.
      schema:
        type: number
        format: float
    DeviceTag:
      name: tag
      in: query
      description: Tag name filtering (exact match)
      schema:
        type: array
        items:
          $ref: "#/components/schemas/TagName"
    DeviceTo:
      name: to
      in: query
      description: >
        Only returns Devices created on or before this date/time.


        Syntax: ISO 8601 date/time including time offset. If no time offset is provided the server's offset is used by default.
      schema:
        type: string
        format: date-time
      example: 2018-08-24T09:27:59.512Z
    Domain:
      name: domain
      in: query
      description: |
        Domain filtering (exact match)

        Domain group name and domain name must be provided as follow:
        `domain.group.name`:`domain.name`
      style: form
      explode: true
      schema:
        type: array
        items:
          type: string
        example:
          - Site:France/Caen
          - Vertical:Location
    Language-tag:
      name: language-tag
      in: query
      description: >
        Return resource document by using the language-tag.


        When this query parameter is not specified in the request or when requested language is

        not available, en-US is used by default.
      schema:
        type: string
    MulticastGroup:
      name: multicastGroupUid
      in: path
      description: >
        Unique identifier of the Multicast Group, either

        * the sequential integer (`UID`) assigned to the Multicast Group at creation (for example `123`)

        * the `EUI` in uppercase prefixed with the e letter in downcase (for example `e000000000522D8EB`)
      required: true
      examples:
        uid:
          summary: UID
          value: "123"
        devEUI:
          summary: EUI
          value: e000000000522D8EB
      schema:
        type: string
        pattern: ^(\d+|e[0-9A-F]+)$
        example: "123"
    NetworkSubscription:
      name: networkSubscriptionUid
      in: path
      description: Uid of NetworkSubscription
      required: true
      schema:
        type: integer
        format: int32
    NetworkSubscriptionsHandlingMode:
      name: networkSubscriptionsHandlingMode
      in: query
      description: |
        Requested network subscriptions handling mode:
        - `BASIC`: the network subscription is automatically selected without
          the need to provide its ID. Only applicable to ThingPark Enterprise.
        - `ADVANCED`: the network subscription is explicitly selected based on
          its ID.

        The default value is the network subscriptions handling mode of the
        subscription.
      schema:
        type: string
        enum:
          - BASIC
          - ADVANCED
    PageIndex:
      name: pageIndex
      in: query
      description: >
        Returns the page at the requested index, starting at 1 for the first
        page.

        The maximum value is limited (system-wide).
      schema:
        type: integer
        format: int32
        minimum: 1
    PageSize:
      name: pageSize
      in: query
      description: |
        Size of the expected page result.

        If not specified or lower than the minimum page size (system-wide
        configuration), the minimum page size is used.

        If greater than the maximum page size (system-wide configuration), the
        maximum page size is used.
      schema:
        type: integer
        format: int32
    Query:
      name: query
      in: query
      description: Returns the tag names starting with query value (case insensitive)
      required: true
      schema:
        $ref: "#/components/schemas/TagName"
    Tag:
      name: tagUid
      in: path
      description: Uid of Tag
      required: true
      schema:
        type: integer
        format: int32
    TagExclude:
      name: exclude
      in: query
      description: Excludes any tag name matching this value (exact match)
      schema:
        type: array
        items:
          $ref: "#/components/schemas/TagName"
    TimestampFrom:
      name: from
      in: query
      description: >
        Date/time of the first alarm to retrieve (the creation timestamp is used
        for the "from").


        Syntax: ISO 8601 date/time including time offset. If no time offset is provided the server's offset is used by default.
      schema:
        type: string
        format: date-time
    TimestampTo:
      name: to
      in: query
      description: >
        Date/time of the last alarm to retrieve (the last update timestamp is
        used for the "to").


        Syntax: ISO 8601 date/time including time offset. If no time offset is provided the server's offset is used by default.
      schema:
        type: string
        format: date-time
    Timezone:
      name: timezone
      in: query
      description: |
        Time zone used to compute the beginning of aggregation time slots. Time
        slots are aligned to January 1, 1970 at midnight in the specified
        timezone. The time zone must be a valid name from the
        <a href="https://www.iana.org/time-zones" target="_blank">IANA time zone
        database</a>
      schema:
        type: string
        default: UTC
        example: Europe/Paris
    Force:
      name: force
      in: query
      deprecated: true
      description: |
        Indicates that the issuer accept to force the OCC.

        This parameter must no longer be used: it is useless and ignored.
      schema:
        type: boolean
      allowEmptyValue: true
    User:
      name: thingparkID
      in: path
      description: ThingPark ID of the User
      required: true
      schema:
        type: string
  examples:
    AppServerSubscriptionBasicHttps:
      summary: "Subscription scope: Basic HTTPS"
      value:
        occContext:
          lastUpdate: 1577836800000
          version: 1
          who: John Doe
        baseStationCount: 0
        deviceCount: 40
        multicastGroupCount: 2
        rfProbeCount: 1
        state: ACTIVE
        validationState: VALIDATED
        healthState: ACTIVE
        ID: TWA_199983788.568.AS
        name: my HTTP application
        downlinkSecurity:
          status: DOWNLINK_AS_KEY
          asID: TWA_199983788.568.AS
          maxTimestampDeviation: 10
        contentType: jsontyped
        type: HTTP
        destinations:
          - ports: "*"
            strategy: SEQUENTIAL
            addresses:
              - https://www.example.com/myApp
        description: description of my HTTP application
        customHttpHeaders:
          - name: Authorization
            value: Bearer AbCdEf123456
        domains:
          - name: France/Paris
            group:
              name: Site
          - name: Energy
            group:
              name: Vertical
        scope: SUBSCRIPTION
    AppServerSubscriptionTpxIotFlow:
      summary: "Subscription scope: ThingPark X IoT Flow"
      value:
        occContext:
          lastUpdate: 1577836800000
          version: 1
          who: John Doe
        baseStationCount: 5
        deviceCount: 22
        multicastGroupCount: 0
        rfProbeCount: 1
        state: ACTIVE
        validationState: VALIDATED
        healthState: ERROR
        ID: TWA_199983788.1972.AS
        name: my MQTT application
        downlinkSecurity:
          status: DOWNLINK_AS_KEY
          asID: TWA_199983788.1972.AS
          maxTimestampDeviation: 10
        contentType: jsontyped
        type: KAFKA
        destinations:
          - brokerID: KAFKA_DEFAULT
            topicName: AS.TPX.FLOW.v1
        notification:
          baseStationAlarms: true
          deviceAlarms: true
        description: description of my MQTT application
        flowMatcherTags:
          - TWA_199983788.1972.AS
        domains:
          - name: France/Caen
            group:
              name: Site
          - name: Energy
            group:
              name: Vertical
        tpxIotFlow:
          connectionId: "24"
          state: UNREACHABLE
          connectorId: actility-mqtt-iot
          flowId: "19"
        scope: SUBSCRIPTION
    AppServerOperator:
      summary: Operator scope
      value:
        deviceCount: 52
        multicastGroupCount: 8
        healthState: ACTIVE
        name: ACME Cloud AS
        ID: TWA_acme-as-supplier.16.AS
        scope: OPERATOR
    AppServerHttpPost:
      summary: HTTP LoRaWAN
      value:
        contentType: json
        destinations:
          - addresses:
              - https://www.example.com/myApp
            ports: "*"
            strategy: SEQUENTIAL
        downlinkSecurity:
          downlinkAsKey: C72C6F867B150B1210ACDA5F3CDFB449
          maxTimestampDeviation: 10
          status: DOWNLINK_AS_KEY
        name: My HTTP LoRaWAN app server
    DeviceTpeLorawanOtaaPost:
      summary: LoRaWAN OTAA
      value:
        EUI: 000000000522D8EB
        activation: OTAA
        appKey: 8D67B0D6359D11ACFC45AD4BB9CE2D4F
        appServers:
          - ID: TWA_199906997.1972.AS
        model:
          ID: LORA/GenericA.1.0.4a_ETSI
        name: My LoRaWAN OTAA device
        networkSubscription:
          nwGeolocalization: true
          prAllowed: false
    DeviceTpeLorawanAbpPost:
      summary: LoRaWAN ABP
      value:
        EUI: 000000000522D8EB
        activation: ABP
        appSKey: 8D67B0D6359D11ACFC45AD4BB9CE2D4F
        appServers:
          - ID: TWA_199906997.1972.AS
        model:
          ID: LORA/GenericA.1.0.4a_ETSI
        name: My LoRaWAN ABP device
        nwAddress: 0070C5BB
        nwKey: 46DFD544535CC01B6B1EE7DFED8910FD
        networkSubscription:
          nwGeolocalization: true
          prAllowed: false
  requestBodies:
    AlarmsAck:
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/AlarmsAck"
      required: true
    AppServer:
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/AppServer"
      required: true
    AsTransportKey:
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/AsTransportKey"
      required: true
    CellularNetworkContext:
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/CellularNetworkContext"
      required: true
    Device:
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/Device"
      required: true
    DeviceTag:
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/DeviceTag"
      required: true
    DevicesTag:
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/DevicesTag"
      required: true
    DevicesDomains:
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/DevicesDomains"
      required: true
    MulticastGroup:
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/MulticastGroup"
      required: true
    MulticastGroupBssTag:
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/MulticastGroupBssTag"
      required: true
    MulticastGroupsDomain:
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/MulticastGroupsDomain"
      required: true
    OnboardingTag:
      content:
        text/plain:
          schema:
            type: string
            example: LW:D0:1122334455667788:AABBCCDDEEFF0011:AABB1122:OAABBCCDDEEFF:SYYWWNNNNNN:PFOOBAR:CAF2C
      required: true
    Relay:
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/Relay"
      required: true
    SecurityAppServer:
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/SecurityAppServer"
      required: true
    Subscription:
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/Subscription"
      required: true
    AlarmsSubscription:
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/AlarmsSubscription"
      required: true
  headers: {}
  securitySchemes:
    Subscriber_service_account:
      type: oauth2
      description: Authenticate using subscriber service account credentials
      flows:
        clientCredentials:
          tokenUrl: /users-auth/protocol/openid-connect/token
          scopes: {}
  links: {}
  callbacks: {}
security:
  - Subscriber_service_account: []
tags:
  - name: subscriptions
    description: Subscriptions
  - name: app-servers
    description: Application Servers
  - name: as-transport-keys
    description: AS transport keys
  - name: cellular-network-contexts
    description: Cellular network contexts
  - name: devices
    description: Devices
  - name: device-profiles
    description: Device profiles
  - name: multicast-groups
    description: Multicast Groups
  - name: network-subscriptions
    description: Network Subscriptions
  - name: users
    description: Users
