swagger: "2.0"
schemes:
  - https
host: platform.clearblade.com
basePath: /
info:
  contact:
    email: support@clearblade.com
  description: A friendly little API to help you interact with the ClearBlade platform.
  termsOfService: https://docs.clearblade.com/v/4/static/tac.html
  title: ClearBlade API
  version: "3.0"
  x-apisguru-categories:
    - iot
  x-origin:
    - format: swagger
      url: https://docs.clearblade.com/v/4/static/api/openapi.yaml
      version: "2.0"
  x-providerName: clearblade.com
tags:
  - description: Adapter configuration and management.
    name: Adapter
  - description: Admin developer operations.
    name: Admin
  - description: Interactions for Two Factor Authentication.
    name: 2FA
  - description: Interactions with the developer audit trail.
    name: Audit
  - description: Interactions with code services.
    name: Code
  - description: Interactions with webhooks.
    name: Webhooks
  - description: Interactions with data collections.
    name: Data
  - description: Interactions with external database connections.
    name: Databases
  - description: Deployment CRUD Operations
    name: Deployments
  - description: Device authentication and management.
    name: Device
  - description: Developer operations.
    name: Developer
  - description: Interactions with edges.
    name: Edge
  - description: Interactions triggers and timers.
    name: Handlers
  - description: MQTT messaging and push notifications.
    name: Messaging
  - description: Interactions with Shared Caches
    name: Shared Cache
  - description: User authentication and management.
    name: User
  - description: Interactions with user and device sessions.
    name: Session
  - description: Interactions with portals.
    name: Portal
  - description: Interactions with file management.
    name: Files
paths:
  /admin/allapps:
    get:
      description: Retrieves system information for all systems in the developer account.
      operationId: DevGetAssets
      parameters:
        - description: Developer Token obtained through admin authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: Returns an array of system information.
        "400":
          description: Bad Request.
      summary: DEVELOPER - Get platform assets
      tags:
        - Developer
  /admin/allcollections:
    get:
      description: Returns all the collections in the specified system.
      operationId: DevGetCollections
      parameters:
        - description: Developer Token obtained through admin authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: System Key that identifies the system the collections belong to.
          in: query
          name: appid
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: A list of collections in the specified system.
        "400":
          description: Bad Request.
      summary: DEVELOPER - Get collections
      tags:
        - Developer
  /admin/allsystems:
    get:
      description: Returns all the systems tied to the specified developer's account.
      operationId: GetSystems
      parameters:
        - description: Developer Token obtained through admin authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: List of systems.
      summary: DEVELOPER - Get systems
      tags:
        - Developer
  /admin/audit:
    get:
      description: |
        ## Description:
        Returns list of assets and the information about the changes that have been made. This endpoint is for Admin only.
        ### Query Structure:
        ```json
        {"PAGESIZE":int,"PAGENUM":int,"FILTERS":[[{"_REPLACE_WITH_OPERATOR_":[{"valueType":"value"}]}]], "SORT":[{"DESC":"value"}]}
        ```
          Note - You can generate a complex query object in a code service using the `ClearBlade.Query()` object. 
        ## Audit Table Schema:
        Refer to this when building the query.

          | Column | Type | Possible Values|Example|
          |:---------|:---------|:------|:---------|
          | id   | bigint   |ANY_POSITIVE_INTEGER|10440595|
          |system_key|string|SINGLE_STRING_WITH_HEX_CHARS_ONLY|"ccafb4cadaccaf9ebba01"|
          |time|timestamp|ISO_DATE_TIME_STRING|"2020-01-29T20:18:18.475214Z"|
          |response_time|bigint|ANY_POSITIVE_INTEGER|4038669|
          |asset_class|string|adapters, adapterFiles, devices, users, multi_dev, services, libraries, servicecaches, timers, triggers, webhooks, portals, plugins, rolesperms, collections, edges, messaging, deployments, edgegroups, system, usersessions, devicesessions|"collections"|
          |action_type|string|Create, Update, Delete, Create Columns, Delete Columns, Developer Password Reset, User Password Reset, MQTT Disconnect, MQTT Connect|"MQTT Connect"|
          |email|string|SINGLE_VALID_EMAIL_STRING|"example@clearblade.com"|
          |asset_id|string|ANY_STRING|"ClearBlade-iPhone"|
          |changes|string|STRINGIFIED_JSON|"{\\"newVersion\\":2}"|
          |user_type|string|UNKNOWN, DEV, USER, DEVICE, Invalid UserType|"DEVICE"|
          
        ### Example:

        ```json
        {"FILTERS":[[{"NEQ":[{"asset_class":"services"}]},{"EQ":[{"action_type":"create"}]}]],"PAGESIZE":0,"PAGENUM":0}
        ```
      operationId: GetAudit
      parameters:
        - description: Developer Token obtained through admin authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: Query object used to filter the items. See query model at in the description for example.
          in: query
          name: query
          required: false
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: Returns audit information
          schema:
            $ref: "#/definitions/auditInfo"
      summary: AUDIT  - Get Audit Info
      tags:
        - Audit
  /admin/audit/count:
    get:
      description: Gets total number of changes made to assets across all systems on the instance. This endpoint is Admin only.
      operationId: GetCounts
      parameters:
        - description: Developer Token obtained through admin authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: Returns number of actions
      summary: Audit - Get counts
      tags:
        - Audit
  "/admin/audit/{systemKey}":
    get:
      description: |
        ## Description:
        Returns list of assets and the information about the changes that have been made. This endpoint is for Admin and Dev.

        ### Query Structure:
        ```json
        {"PAGESIZE":int,"PAGENUM":int,"FILTERS":[[{"_REPLACE_WITH_OPERATOR_":[{"valueType":"value"}]}]], "SORT":[{"DESC":"value"}]}
        ```
          Note - You can generate a complex query object in a code service using the `ClearBlade.Query()` object. 
        ## Audit Table Schema:
        Refer to this when building the query.

          | Column | Type | Possible Values|Example|
          |:---------|:---------|:------|:---------|
          | id   | bigint   |ANY_POSITIVE_INTEGER|10440595|
          |system_key|string|SINGLE_STRING_WITH_HEX_CHARS_ONLY|"ccafb4cadaccaf9ebba01"|
          |time|timestamp|ISO_DATE_TIME_STRING|"2020-01-29T20:18:18.475214Z"|
          |response_time|bigint|ANY_POSITIVE_INTEGER|4038669|
          |asset_class|string|adapters, adapterFiles, devices, users, multi_dev, services, libraries, servicecaches, timers, triggers, webhooks, portals, plugins, rolesperms, collections, edges, messaging, deployments, edgegroups, system, usersessions, devicesessions|"collections"|
          |action_type|string|Create, Update, Delete, Create Columns, Delete Columns, Developer Password Reset, User Password Reset, MQTT Disconnect, MQTT Connect|"MQTT Connect"|
          |email|string|SINGLE_VALID_EMAIL_STRING|"example@clearblade.com"|
          |asset_id|string|ANY_STRING|"ClearBlade-iPhone"|
          |changes|string|STRINGIFIED_JSON|"{\\"newVersion\\":2}"|
          |user_type|string|UNKNOWN, DEV, USER, DEVICE, Invalid UserType|"DEVICE"|
          
        ### Example:

        ```json
        {"FILTERS":[[{"NEQ":[{"asset_class":"services"}]},{"EQ":[{"action_type":"create"}]}]],"PAGESIZE":0,"PAGENUM":0}
        ```
      operationId: GetAuditDev
      parameters:
        - description: System Key that identifies the system that holds the deployment.
          in: path
          name: systemKey
          required: true
          type: string
        - description: Developer Token obtained through admin authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: Query object used to filter the items. See query model at in the description for example.
          in: query
          name: query
          required: false
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: Returns audit information
          schema:
            $ref: "#/definitions/auditInfo"
      summary: AUDIT  - Get Audit Info
      tags:
        - Audit
  "/admin/audit/{systemKey}/count":
    get:
      description: Gets total number of changes made to assets across all systems on the instance. This endpoint is for Admin and Dev.
      operationId: GetCountsDev
      parameters:
        - description: System Key that identifies the system that holds the deployment.
          in: path
          name: systemKey
          required: true
          type: string
        - description: Developer Token obtained through admin authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: Returns number of actions
      summary: AUDIT - Get counts
      tags:
        - Audit
  /admin/auth:
    post:
      description: |
        ## Description
        Logs developer into system and returns an Developer Token
        ## Endpoint Body Values
        Here are the body values for the two scenarios
        ### Basic Auth
        Required Keys
          - username
          - password

        Example 
        ```json
        {
          "username":"cbman@clearblade.com",
          "password":"cl34rbl4d3"
        }
        ```  

        ### Refreshing Token
        Required Keys 
          - grant_type (only one valid value - "refresh_token")
          - refresh_token
          - access_token

        Example 
        ```json
        {
          "grant_type":"refresh_token",
          "refresh_token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOiJmMjkwZTJlYjBiZDRmNjhiZDRkM2RlZjNkMWM0MDEiLCJzaWQiOiIzOWFkM2U5OC1hMmU0LTQxYzQtOGMzNi03ZjQxNDFhYzYxN2IiLCJ1dCI6MiwidHQiOjMsImV4cCI6MTU5MDI3ODExMSwiaWF0IjoxNTg5NDE0MTExfQ.iY6uJu2QgNP0uHoGdmEZm9wsztB1SUrCHrisxoXoxolol",
          "access_token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOiJmMjkwZTJlYjBiZDRmNjhiZDRkM2RlZjNkMWM0MDEiLCJzaWQiOiI3NmY4ODg4MS04YmU5LTRiM2UtOWJkNi1jOTJjZGQ4OTNlMmEiLCJ1dCI6MiwidHQiOjEsImV4cCI6MTU4OTg0NjExMSwiaWF0IjoxNTg5NDE0MTExfQ.xboryHuVn2zz-gSZ_JcD7-j_eBmJU1SMHkiDl9j8bak"
        }
        ```
      operationId: AuthDev
      parameters:
        - description: Developer credentials.
          in: body
          name: credentials
          required: true
          schema:
            $ref: "#/definitions/authdata"
      produces:
        - application/json
      responses:
        "200":
          description: Developer authenticated.
          schema:
            $ref: "#/definitions/devregresp"
      summary: DEVELOPER - Authenticate dev
      tags:
        - Developer
  /admin/checkauth:
    post:
      description: Verifies developer access to the system
      operationId: VerifyAuth
      parameters:
        - description: Developer Token obtained through admin authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: Receives access to the system.
        "400":
          description: Bad Request.
      summary: DEVELOPER - Verifies access to the system
      tags:
        - Developer
  /admin/collectionmanagement:
    delete:
      description: Deletes an existing collection in the specified system.
      operationId: DevDeleteCollection
      parameters:
        - description: Developer Token obtained through admin authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: ID that identifies the collection to be deleted.
          in: query
          name: id
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: Collection was successfully deleted.
      summary: DEVELOPER - Delete collection
      tags:
        - Developer
    post:
      description: Creates a new collection or database connection in the specified system.
      operationId: DevCreateCollection
      parameters:
        - description: Developer Token obtained through authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: Configuration info for new collection.
          in: body
          name: Collection info
          required: true
          schema:
            $ref: "#/definitions/newcollection"
      produces:
        - application/json
      responses:
        "200":
          description: Collection was successfully created.
      summary: DEVELOPER - Create collection
      tags:
        - Developer
    put:
      description: Creates or deletes a column within an existing collection, or updates an existing database connection in the specified system.
      operationId: DevUpdateCollection
      parameters:
        - description: Developer Token obtained through admin authentication.
          in: header
          name: ClearBlade-DevToken
          required: false
          type: string
        - description: Updated collection information.
          in: body
          name: body
          required: false
          schema:
            $ref: "#/definitions/updateCollection"
      produces:
        - application/json
      responses:
        "200":
          description: Collection was successfully updated.
      summary: DEVELOPER - Update collection
      tags:
        - Developer
  /admin/count/developers:
    get:
      description: Retrieves the number of developers who are considered administrators in their system.
      operationId: GetAdminDevCount
      parameters:
        - description: Developer Token obtained through admin authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: Returns number of admin developers
        "400":
          description: Bad request.
      summary: ADMIN - Get number of admin developers
      tags:
        - Admin
  /admin/count/systems:
    get:
      description: Retrieves the number of systems that are available.
      operationId: GetSystemCount
      parameters:
        - description: Developer Token obtained through admin authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: No response was specified
        "400":
          description: Bad request.
        "404":
          description: Not Found
      summary: ADMIN - Get number of systems available
      tags:
        - Admin
  /admin/database/status:
    get:
      description: Returns all the names and internal and external database statuses
      operationId: GetDatabaseStatus
      produces:
        - application/json
      responses:
        "200":
          description: |
            ## Description:
             Returns all the names and internal and external database statuses in a system
             ### Success Structure:
             ```json
             {
               [IP_ADDRESS]": {
                 "internal_db_stats": {
                   "name": "Postgres",
                   "stats": {
                     "db_type": "PostgreSQL",
                     "info": {
                       "Idle": 2,
                       "InUse": 0,
                       "MaxIdleClosed": 55380,
                       "MaxIdleTimeClosed": 0,
                       "MaxLifetimeClosed": 0,
                       "MaxOpenConnections": 30,
                       "OpenConnections": 2,
                       "WaitCount": 0,
                       "WaitDuration": 0
                   },
                   "is_connected": true
                   }
                  },
                  "external_db_stats": {}
             ```
             |
      summary: DATABASES - Retrieves all internal and external database statuses
      tags:
        - Databases
  "/admin/developers/{systemKey}":
    put:
      description: For admin, you can add/remove/change the owner of a system even if you’re not the system's owner. For Developer,you can add/remove a developer as long as you’re the owner of the system.
      operationId: AdminOwnerChange
      parameters:
        - description: System Key that identifies the system that holds the deployment.
          in: path
          name: systemKey
          required: true
          type: string
        - description: Developer Token obtained through admin authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: Updated system owner email.
          in: body
          name: body
          required: false
          schema:
            $ref: "#/definitions/updateOwner"
      produces:
        - application/json
      responses:
        "200":
          description: Owner successfully added/removed.
        "400":
          description: Bad Request.
        "500":
          description: Internal Server Error.
      summary: ADMIN - Add/Remove/Change owner
      tags:
        - Admin
        - Developer
  "/admin/devices/keys/{systemKey}/{deviceName}":
    delete:
      description: Deletes the rotating keys from its device.
      operationId: DeleteDeviceKeys
      parameters:
        - description: Developer Token obtained through developer authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: System key that identifies the system the device currently belongs to.
          in: path
          name: systemKey
          required: true
          type: string
        - description: Name of the device whose keys are being deleted.
          in: path
          name: deviceName
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: Deletes rotating keys
      summary: DEVELOPER - Delete rotating keys for a device
      tags:
        - Developer
    post:
      description: Creates rotating keys for a device.
      operationId: CreateRotatingKeys
      parameters:
        - description: Developer Token obtained through developer authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: System key that identifies the system the device you're updating belongs to.
          in: path
          name: systemKey
          required: true
          type: string
        - description: Name of the device you are adding keys to .
          in: path
          name: deviceName
          required: true
          type: string
        - description: Number of rotating keys.
          in: body
          name: body
          required: true
          schema:
            $ref: "#/definitions/count"
      produces:
        - application/json
      responses:
        "200":
          description: No response was specified
          schema:
            $ref: "#/definitions/deviceKey"
      summary: DEVICE -Creates rotating keys for a device.
      tags:
        - Device
  "/admin/devices/{systemKey}":
    delete:
      description: Deletes all devices matching the filters specified by a query.
      operationId: DeleteDevicesAdmin
      parameters:
        - description: System Key that identifies the system the device is a part of.
          in: path
          name: systemKey
          required: true
          type: string
        - description: Token obtained through user authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: Tags to filter devices by. See the query model below for an example.
          in: query
          name: query
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: Successfully deleted devices.
        "400":
          description: Bad request.
      summary: DEVELOPER - Delete devices using a query
      tags:
        - Developer
    get:
      description: Retrieves information about all devices in the specified system
      operationId: GetSystemDevices
      parameters:
        - description: Developer Token obtained through admin authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: System key that identifies the system the devices in question belong to.
          in: path
          name: systemKey
          required: true
          type: string
        - description: Tags to filter devices by. See the query model below for an example. All devices are returned if a query is not specified.
          in: query
          name: query
          required: false
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: A list of devices.
        "400":
          description: Bad request.
      summary: DEVELOPER - Get devices with or without a query
      tags:
        - Developer
    put:
      description: Updates all devices matching the filters specified by a query.
      operationId: UpdateDevicesAdmin
      parameters:
        - description: System Key that identifies the system the device is a part of.
          in: path
          name: systemKey
          required: true
          type: string
        - description: Token obtained through user authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: Query to limit scope of update, and new data values.
          in: body
          name: payload
          required: true
          schema:
            $ref: "#/definitions/PutQuery"
      produces:
        - application/json
      responses:
        "200":
          description: A JSON object representing the SQL result set containing the list of affected devices.
          schema:
            $ref: "#/definitions/QueryResultSet"
        "400":
          description: Bad request.
      summary: DEVELOPER - Update devices using a query
      tags:
        - Developer
  "/admin/devices/{systemKey}/{name}":
    delete:
      description: Deletes the specified device from its system.
      operationId: DeleteSystemDevice
      parameters:
        - description: Developer Token obtained through admin authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: System key that identifies the system the device currently belongs to.
          in: path
          name: systemKey
          required: true
          type: string
        - description: Name of the device you're deleting.
          in: path
          name: name
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: No response was specified
      summary: DEVELOPER - Delete device
      tags:
        - Developer
    get:
      description: Retrieves information about the specified device.
      operationId: GetSystemDevice
      parameters:
        - description: Developer Token obtained through admin authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: System key that identifies the system the device in question belongs to.
          in: path
          name: systemKey
          required: true
          type: string
        - description: Name of the device you're getting info about.
          in: path
          name: name
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: No response was specified
      summary: DEVELOPER - Get device
      tags:
        - Developer
    post:
      description: Creates a new device in the specified system.
      operationId: CreateSystemDevice
      parameters:
        - description: Developer Token obtained through admin authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: System key that identifies the system the new device will belong to.
          in: path
          name: systemKey
          required: true
          type: string
        - description: Name of the device you're creating.
          in: path
          name: name
          required: true
          type: string
        - description: New device information.
          in: body
          name: body
          required: true
          schema:
            $ref: "#/definitions/deviceAdminNew"
      produces:
        - application/json
      responses:
        "200":
          description: No response was specified
      summary: DEVELOPER - Create device
      tags:
        - Developer
    put:
      description: Updates the specified device's information.
      operationId: UpdateSystemDevice
      parameters:
        - description: Developer Token obtained through admin authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: System key that identifies the system the device you're updating belongs to.
          in: path
          name: systemKey
          required: true
          type: string
        - description: Name of the device you're updating.
          in: path
          name: name
          required: true
          type: string
        - description: Updated device information.
          in: body
          name: body
          required: true
          schema:
            $ref: "#/definitions/deviceAdminUpdate"
      produces:
        - application/json
      responses:
        "200":
          description: No response was specified
      summary: DEVELOPER - Update device
      tags:
        - Developer
  "/admin/edges/template/{systemKey}":
    get:
      description: Get list of which triggers, services, and libraries should be copied onto which edge when it starts up.
      operationId: GetEdgeTemplate
      parameters:
        - description: Developer Token obtained through admin authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: System key that identifies the system the edge template belongs to.
          in: path
          name: systemKey
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: No response was specified
      summary: DEVELOPER - Get edge template
      tags:
        - Developer
  "/admin/edges/template/{systemKey}/{edgeName}":
    put:
      description: Update template for the specified edge.
      operationId: UpdateEdgeTemplate
      parameters:
        - description: Developer Token obtained through admin authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: System key that identifies the system the edge template belongs to.
          in: path
          name: systemKey
          required: true
          type: string
        - description: Name of the edge you're modifying the template for.
          in: path
          name: edgeName
          required: true
          type: string
        - description: list of resources to add or remove to the template for an edge.
          in: body
          name: add
          required: true
          schema:
            $ref: "#/definitions/edgeTemplateUpdate"
      produces:
        - application/json
      responses:
        "200":
          description: No response was specified
      summary: DEVELOPER - Update edge template
      tags:
        - Developer
  "/admin/edges/{systemKey}":
    get:
      description: Retrieves all the edges that belong to the specified system.
      operationId: GetEdges
      parameters:
        - description: Developer Token obtained through admin authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: System key that identifies the system the edges in question belong to.
          in: path
          name: systemKey
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: No response was specified
      summary: DEVELOPER - Get edges
      tags:
        - Developer
  "/admin/edges/{systemKey}/control":
    get:
      description: Retrieves all the edges that the adapter belongs to.
      operationId: GetAdapterEdges
      parameters:
        - description: Developer Token obtained through admin authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: System key that identifies the system the edges in question belong to.
          in: path
          name: systemKey
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: No response was specified
      summary: DEVELOPER - Get edges for the adapter
      tags:
        - Developer
  "/admin/edges/{systemKey}/{edgeName}":
    delete:
      description: Deletes the specified edge from its system.
      operationId: DeleteEdge
      parameters:
        - description: Developer Token obtained through admin authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: System key that identifies the system the edge currently belongs to.
          in: path
          name: systemKey
          required: true
          type: string
        - description: Name of the edge you're deleting.
          in: path
          name: edgeName
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: No response was specified
      summary: DEVELOPER - Delete edge
      tags:
        - Developer
    get:
      description: Retrieves information about the specified edge.
      operationId: GetEdge
      parameters:
        - description: Developer Token obtained through admin authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: System key that identifies the system the edge in question belongs to.
          in: path
          name: systemKey
          required: true
          type: string
        - description: Name of the edge you're getting info about.
          in: path
          name: edgeName
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: No response was specified
      summary: DEVELOPER - Get edge
      tags:
        - Developer
    post:
      description: Creates a new edge in the specified system.
      operationId: CreateEdge
      parameters:
        - description: Developer Token obtained through admin authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: System key that identifies the system the new edge will belong to.
          in: path
          name: systemKey
          required: true
          type: string
        - description: Name of the edge you're creating.
          in: path
          name: edgeName
          required: true
          type: string
        - description: New edge information.
          in: body
          name: body
          required: true
          schema:
            $ref: "#/definitions/edgeNew"
      produces:
        - application/json
      responses:
        "200":
          description: No response was specified
      summary: DEVELOPER - Create edge
      tags:
        - Developer
    put:
      description: Updates the specified edge's information.
      operationId: UpdateEdge
      parameters:
        - description: Developer Token obtained through admin authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: System key that identifies the system the edge you're updating belongs to.
          in: path
          name: systemKey
          required: true
          type: string
        - description: Name of the edge you're updating.
          in: path
          name: edgeName
          required: true
          type: string
        - description: Updated edge information.
          in: body
          name: Edge
          required: true
          schema:
            $ref: "#/definitions/edgeUpdate"
      produces:
        - application/json
      responses:
        "200":
          description: No response was specified
      summary: DEVELOPER - Update edge
      tags:
        - Developer
  /admin/logout:
    post:
      description: Logs the current developer out of their session and invalidates their DevToken
      operationId: DevLogout
      parameters:
        - description: Developer Token obtained through admin authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: Developer was successfully logged out.
      summary: DEVELOPER - Log out dev
      tags:
        - Developer
  /admin/pkey:
    get:
      description: Returns current platform license key.
      operationId: GetLicenseKey
      parameters:
        - description: Developer Token obtained through admin authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: Returns platform license key
        "400":
          description: Bad Request
      summary: ADMIN - Get platform license key.
      tags:
        - Admin
  /admin/platform/developer:
    get:
      description: Returns information about the specified developer.
      operationId: GetDev
      parameters:
        - description: Developer Token obtained through admin authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: Email of the developer in question.
          in: query
          name: developer
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: No response was specified
      summary: ADMIN - Get developer
      tags:
        - Admin
    post:
      description: Disables the specified developer on the platform.
      operationId: DisableDev
      parameters:
        - description: Developer Token obtained through admin authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: Information to identify the developer you're disabling.
          in: body
          name: body
          required: true
          schema:
            $ref: "#/definitions/disableData"
      produces:
        - application/json
      responses:
        "200":
          description: No response was specified
      summary: DEVELOPER - Disable developer
      tags:
        - Developer
  /admin/platform/developers:
    get:
      description: Returns all developers in the platform.
      operationId: GetDevs
      parameters:
        - description: Developer Token obtained through admin authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: Response page size.
          in: query
          name: pagesize
          required: false
          type: string
        - description: Response page number.
          in: query
          name: pagenum
          required: false
          type: string
        - description: ""
          in: query
          name: total
          required: false
          type: string
        - description: Filter response.
          in: query
          name: filter
          required: false
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: No response was specified
      summary: ADMIN - Get developers
      tags:
        - Admin
  /admin/platform/systems:
    get:
      description: |
        ## Description:
        Get list of systems that have been updated. This is an Admin only endpoint.

        ### Query:
        ```json
        {"PAGESIZE":int,"PAGENUM":int,"FILTERS":[[{"_REPLACE_WITH_OPERATOR_":[{"valueType":"value"}]}]],"SORT":[{"DESC":"value"}]}
        ```
          Note - You can generate a complex query object in a code service using the `ClearBlade.Query()` object. 
        ## Admin Audit Table Schema:
        Refer to this when building the query.

          | Column | Type | Possible Values| Examples|
          |:--------|:--------|:------|:------|
          | name   | string   |ANY_STRING|"ClearBladeDev"|
          |owner|string|EMAIL_STRING |"example@clearblade.com"|
          |systemKey|string|SINGLE_STRING_WITH_HEX_CHARS_ONLY|"80sdff82c0b1fbda1f271"|
          |disabled|boolean|true, false|true|
          |lastUpdated|timestamp|ISO_DATE_TIME_STRING|"2020-01-29T20:18:18.475214Z"|
          |numDevs|int|ANY_POSITIVE_INTEGER|2|
          |numServices|int|ANY_POSITIVE_INTEGER|2|
          |numLibraries|int|ANY_POSITIVE_INTEGER|2|
          |numDeployments|int|ANY_POSITIVE_INTEGER|2|
          |numRoles|int|ANY_POSITIVE_INTEGER|2|
          |numUsers|int|ANY_POSITIVE_INTEGER|2|
          |numDevices|int|ANY_POSITIVE_INTEGER|2|
          |numEdge|int|ANY_POSITIVE_INTEGER|2|
          |numAPIReqsTotal|int|ANY_POSITIVE_INTEGER|2|
          |numAPIReqsMonth|int|ANY_POSITIVE_INTEGER|2|
          |numAPIReqsYear|int|ANY_POSITIVE_INTEGER|2|
          |numPub|int|ANY_POSITIVE_INTEGER|2|
          |numPubMonth|int|ANY_POSITIVE_INTEGER|2|
          |numPubYear|int|ANY_POSITIVE_INTEGER|2|
          |numRecTotal|int|ANY_POSITIVE_INTEGER|2|
          |numRecMonth|int|ANY_POSITIVE_INTEGER|2|
          |numRecYear|int|ANY_POSITIVE_INTEGER|2|
          |diskUsage|int|ANY_POSITIVE_INTEGER|2|

        ### Example:

        ```json
         "query":{"FILTERS":[[{"NEQ":[{"disabled":true}]},{"EQ":[{"numDevs":2}]}]],"PAGESIZE":0,"PAGENUM":0}
        ```
      operationId: GetSystemUpdates
      parameters:
        - description: Developer Token obtained through admin authentication.
          in: header
          name: Clearblade-DevToken
          required: true
          type: string
        - description: Query object used to filter the items. See query model at in the description for example.
          in: query
          name: query
          required: false
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: No response was specified.
          schema:
            $ref: "#/definitions/systemInfo"
      summary: AUDIT - Get list of systems that have been updated
      tags:
        - Audit
  "/admin/platform/systems/{systemKey}":
    get:
      description: |
        ## Description:
         Get list of changes that have been made to the system. This is an Admin and Dev endpoint.
        ### Query:
        ```json
        "query":{"PAGESIZE":int,"PAGENUM":int,"FILTERS":[[{"_REPLACE_WITH_OPERATOR_":[{"valueType":"value"}]}]],"SORT":[{"DESC":"value"}]}
        ```
          Note - You can generate a complex query object in a code service using the `ClearBlade.Query()` object. 
        ## Admin Audit Table Schema:
        ## Admin Audit Table Schema:
        Refer to this when building the query.

          | Column | Type | Possible Values| Examples|
          |:--------|:--------|:------|:------|
          | name   | string   |ANY_STRING|"ClearBladeDev"|
          |owner|string|EMAIL_STRING |"example@clearblade.com"|
          |systemKey|string|SINGLE_STRING_WITH_HEX_CHARS_ONLY|"80sdff82c0b1fbda1f271"|
          |disabled|boolean|true, false|true|
          |lastUpdated|timestamp|ISO_DATE_TIME_STRING|"2020-01-29T20:18:18.475214Z"|
          |numDevs|int|ANY_POSITIVE_INTEGER|2|
          |numServices|int|ANY_POSITIVE_INTEGER|2|
          |numLibraries|int|ANY_POSITIVE_INTEGER|2|
          |numDeployments|int|ANY_POSITIVE_INTEGER|2|
          |numRoles|int|ANY_POSITIVE_INTEGER|2|
          |numUsers|int|ANY_POSITIVE_INTEGER|2|
          |numDevices|int|ANY_POSITIVE_INTEGER|2|
          |numEdge|int|ANY_POSITIVE_INTEGER|2|
          |numAPIReqsTotal|int|ANY_POSITIVE_INTEGER|2|
          |numAPIReqsMonth|int|ANY_POSITIVE_INTEGER|2|
          |numAPIReqsYear|int|ANY_POSITIVE_INTEGER|2|
          |numPub|int|ANY_POSITIVE_INTEGER|2|
          |numPubMonth|int|ANY_POSITIVE_INTEGER|2|
          |numPubYear|int|ANY_POSITIVE_INTEGER|2|
          |numRecTotal|int|ANY_POSITIVE_INTEGER|2|
          |numRecMonth|int|ANY_POSITIVE_INTEGER|2|
          |numRecYear|int|ANY_POSITIVE_INTEGER|2|
          |diskUsage|int|ANY_POSITIVE_INTEGER|2|

        ### Example:

        ```json
         "query":{"FILTERS":[[{"NEQ":[{"disabled":true}]},{"EQ":[{"numDevs":2}]}]],"PAGESIZE":0,"PAGENUM":0}
        ```
      operationId: GetSystemUpdatesDev
      parameters:
        - description: System Key that identifies the system that holds the deployment.
          in: path
          name: systemKey
          required: true
          type: string
        - description: Developer Token obtained through admin authentication.
          in: header
          name: clearblade-devtoken
          required: true
          type: string
        - description: Query object used to filter the items. See query model at in the description for example.
          in: query
          name: query
          required: false
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: No response was specified.
          schema:
            $ref: "#/definitions/systemInfo"
      summary: AUDIT - Get list of systems that have been updated
      tags:
        - Audit
  "/admin/platform/{systemKey}":
    get:
      description: Retrieves the specified system's status as it relates to limits. To be used by the billing system.
      operationId: GetSystemStatus
      parameters:
        - description: Developer Token obtained through admin authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: System Key that identifies the system you're requesting information about.
          in: path
          name: systemKey
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: No response was specified
      summary: ADMIN - Get system status
      tags:
        - Admin
  "/admin/portals/{systemKey}":
    get:
      description: Returns information about a specified portal.
      operationId: GetPortalInfo
      parameters:
        - description: Developer Token obtained through developer authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: System Key that identifies the specified system.
          in: path
          name: systemKey
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: No response was specified
          schema:
            $ref: "#/definitions/portalArray"
      summary: DEVELOPER - Gets the information for a portal
      tags:
        - Developer
  /admin/putpass:
    put:
      description: Changes a developer's password.
      operationId: ChangeDevPassword
      parameters:
        - description: Developer Token obtained through admin authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: Password change information.
          in: body
          name: body
          required: true
          schema:
            $ref: "#/definitions/devpass"
      produces:
        - application/json
      responses:
        "200":
          description: Developer's password was successfully changed.
      summary: DEVELOPER - Change dev password
      tags:
        - Developer
  /admin/reg:
    post:
      description: Registers a new developer account with the CB platform.
      operationId: RegDev
      parameters:
        - description: First and last name, organization, email, and password for developer
          in: body
          name: Registration info
          required: true
          schema:
            $ref: "#/definitions/devregdata"
      produces:
        - application/json
      responses:
        "200":
          description: Developer was successfully created.
          schema:
            $ref: "#/definitions/devregresp"
        "500":
          description: Internal Server Error.
      summary: DEVELOPER - Register new dev
      tags:
        - Developer
  /admin/regensystemsecret:
    put:
      description: Generates a new System Secret for the specified system.
      operationId: RegenSecret
      parameters:
        - description: Developer Token obtained through admin authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: System Key that identifies the system you're regenerating the secret for.
          in: body
          name: body
          required: true
          schema:
            $ref: "#/definitions/regensystem"
      produces:
        - application/json
      responses:
        "200":
          description: New System Secret was successfully generated.
      summary: DEVELOPER - Regen secret
      tags:
        - Developer
  /admin/resetpassword:
    post:
      description: Changes a developer's password.
      operationId: ResetPassword
      parameters:
        - description: Developer Token obtained through admin authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: New login information.
          in: body
          name: body
          required: true
          schema:
            $ref: "#/definitions/resetPassword"
      produces:
        - application/json
      responses:
        "200":
          description: Password is resetted
      summary: ADMIN - Change dev password (Admin)
      tags:
        - Admin
  /admin/settings/email-service:
    delete:
      description: Deletes email communication settings. This endpoint is Admin only.
      operationId: DeleteEmailSettings
      parameters:
        - description: Developer Token obtained through admin authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: Email settings was successfully deleted.
          schema:
            $ref: "#/definitions/SuccessResp"
        "400":
          description: Bad Request.
          schema:
            $ref: "#/definitions/ErrorResp"
      summary: 2FA - Delete email settings
      tags:
        - 2FA
    get:
      description: Gets current email communication settings. This endpoint is Admin only.
      operationId: EmailSettings
      parameters:
        - description: Developer Token obtained through admin authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: Returns email communcation settings
          schema:
            $ref: "#/definitions/emailSettings"
        "400":
          description: Bad Request.
          schema:
            $ref: "#/definitions/ErrorResp"
      summary: 2FA - Get Email Settings
      tags:
        - 2FA
    post:
      description: |
        ## Description:
          Creates email communication . This endpoint is Admin only.
          
        ## Settings choices

        |Settings|Allowed Values|
        |--------|-----|
        |encryption_type|STARTTLS, TLS, NONE|
        |protocol|SMTP|
      operationId: CreateEmailCommunication
      parameters:
        - description: Developer Token obtained through admin authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: The email settings to be updated
          in: body
          name: body
          required: true
          schema:
            $ref: "#/definitions/emailSettings"
      produces:
        - application/json
      responses:
        "200":
          description: Successfully added email service settings
        "400":
          description: Bad Request.
          schema:
            $ref: "#/definitions/ErrorResp"
      summary: 2FA - Create Email Communication
      tags:
        - 2FA
    put:
      description: |
        
        ## Description:
        Updates email communication settings. This endpoint is Admin only.
           
        ## Setting options
            
        |Settings|Types|
        |--------|-----|
        |encryption_type|STARTTLS, TLS, NONE|
        |port|25, 465, 587, 2525|

        SMTP is the only protocol supported
      operationId: UpdateEmailSettings
      parameters:
        - description: Developer Token obtained through admin authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: The email settings to be updated
          in: body
          name: body
          required: true
          schema:
            $ref: "#/definitions/emailSettings"
      produces:
        - application/json
      responses:
        "200":
          description: Successfully updated email service settings
          schema:
            $ref: "#/definitions/SuccessResp"
        "400":
          description: Bad Request.
          schema:
            $ref: "#/definitions/ErrorResp"
      summary: 2FA - Update Email Settings
      tags:
        - 2FA
  /admin/settings/email-service/test:
    post:
      description: Test email service . This endpoint is Admin only.
      operationId: TestEmail
      parameters:
        - description: Developer Token obtained through admin authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: The recipient email address to send the test message
          in: body
          name: body
          required: true
          schema:
            $ref: "#/definitions/emailTest"
      produces:
        - application/json
      responses:
        "200":
          description: Successfully sends test email
          schema:
            $ref: "#/definitions/SuccessResp"
        "400":
          description: Bad Request.
          schema:
            $ref: "#/definitions/ErrorResp"
      summary: 2FA - Test Email Service
      tags:
        - 2FA
  /admin/settings/security:
    get:
      description: View instance wide security settings. This endpoint is Admin only.
      operationId: ViewSecurity
      parameters:
        - description: Developer Token obtained through admin authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: Returns 2FA security settings
          schema:
            $ref: "#/definitions/SecuritySettings"
        "400":
          description: Bad Request.
          schema:
            $ref: "#/definitions/ErrorResp"
      summary: 2FA - View Security Settings
      tags:
        - 2FA
    put:
      description: Update instance wide security settings.TTL must be between 86400 and 2592000 seconds. This endpoint is Admin only.
      operationId: UpdateSecurity
      parameters:
        - description: Developer Token obtained through admin authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: The SMS settings to be updated
          in: body
          name: body
          required: true
          schema:
            $ref: "#/definitions/SecuritySettings"
      produces:
        - application/json
      responses:
        "200":
          description: Successfully updated 2FA security settings
          schema:
            $ref: "#/definitions/SecuritySettings"
        "400":
          description: Bad Request.
          schema:
            $ref: "#/definitions/ErrorResp"
      summary: 2FA - Update Security Settings
      tags:
        - 2FA
  /admin/settings/sms-service:
    delete:
      description: Deletes SMS communication settings. This endpoint is Admin only.
      operationId: DeleteSMSSettings
      parameters:
        - description: Developer Token obtained through admin authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: SMS settings was successfully deleted.
          schema:
            $ref: "#/definitions/SuccessResp"
        "400":
          description: Bad Request.
          schema:
            $ref: "#/definitions/ErrorResp"
      summary: 2FA - Delete SMS settings
      tags:
        - 2FA
    get:
      description: Gets current SMS communication settings. This endpoint is Admin only.
      operationId: SMSSettings
      parameters:
        - description: Developer Token obtained through admin authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: Returns SMS communcation settings
          schema:
            $ref: "#/definitions/SMSSettings"
        "400":
          description: Bad Request.
          schema:
            $ref: "#/definitions/ErrorResp"
      summary: 2FA - Get SMS Settings
      tags:
        - 2FA
    post:
      description: Creates SMS communication . Twilio is the only supported service. This endpoint is Admin only.
      operationId: CreateSMSCommunication
      parameters:
        - description: Developer Token obtained through admin authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: The SMS settings to be updated
          in: body
          name: body
          required: true
          schema:
            $ref: "#/definitions/SMSSettings"
      produces:
        - application/json
      responses:
        "200":
          description: Successfully added SMS service settings
          schema:
            $ref: "#/definitions/SuccessResp"
        "400":
          description: Bad Request.
          schema:
            $ref: "#/definitions/ErrorResp"
      summary: 2FA - Create SMS Communication
      tags:
        - 2FA
    put:
      description: Updates SMS communication settings. Twilio is the only supported service. This endpoint is Admin only.
      operationId: UpdateSMSSettings
      parameters:
        - description: Developer Token obtained through admin authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: The SMS settings to be updated
          in: body
          name: body
          required: true
          schema:
            $ref: "#/definitions/SMSSettings"
      produces:
        - application/json
      responses:
        "200":
          description: Successfully updated SMS service settings
          schema:
            $ref: "#/definitions/SuccessResp"
        "400":
          description: Bad Request.
          schema:
            $ref: "#/definitions/ErrorResp"
      summary: 2FA - Update SMS Settings
      tags:
        - 2FA
  /admin/settings/sms-service/test:
    post:
      description: Test SMS service . This endpoint is Admin only.
      operationId: TestSMS
      parameters:
        - description: Developer Token obtained through admin authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: The recipient phone number to send the test message
          in: body
          name: body
          required: true
          schema:
            $ref: "#/definitions/SMSTest"
      produces:
        - application/json
      responses:
        "200":
          description: Successfully sends test message
          schema:
            $ref: "#/definitions/SuccessResp"
        "400":
          description: Bad Request.
          schema:
            $ref: "#/definitions/ErrorResp"
      summary: 2FA - Test SMS Service
      tags:
        - 2FA
  "/admin/systems/{devEmail}":
    get:
      description: Get the list of systems the developer has access to
      operationId: GetSystemsForDev
      parameters:
        - description: Developer Token obtained through admin authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: Email of the Developer. Should be in the format `name@orgname.com`
          in: path
          name: devEmail
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: List of systems the developer has access to.
          schema:
            $ref: "#/definitions/systemInfo"
        "400":
          description: Bad Request.
          schema:
            $ref: "#/definitions/ErrorResp"
      summary: Get Systems for a developer
      tags:
        - Admin
  /admin/triggers/definitions:
    get:
      description: Returns list of trigger definitions. These are the possible actions that can set off a trigger.
      operationId: GetTriggers
      parameters:
        - description: Developer Token obtained through admin authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: List of trigger definitions.
      summary: DEVELOPER - Get trigger definitions
      tags:
        - Developer
  "/admin/triggers/handlers/{systemKey}":
    get:
      description: Returns list of trigger handlers.
      operationId: GetTriggerHandlers
      parameters:
        - description: Developer Token obtained through admin authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: System Key that identifies the system the handlers are in.
          in: path
          name: systemKey
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: A list of trigger handlers
      summary: DEVELOPER - Get trigger handlers
      tags:
        - Developer
  "/admin/triggers/handlers/{systemKey}/{name}":
    delete:
      description: Deletes the specified trigger handler.
      operationId: DeleteTriggerHandler
      parameters:
        - description: Developer Token obtained through admin authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: System Key that identifies the system the handler is in.
          in: path
          name: systemKey
          required: true
          type: string
        - description: Name of the trigger handler you're deleting.
          in: path
          name: name
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: No response was specified
      summary: DEVELOPER - Delete trigger handler
      tags:
        - Developer
    get:
      description: Returns the specified trigger handler information.
      operationId: GetTriggerHandler
      parameters:
        - description: Developer Token obtained through admin authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: System Key that identifies the system the handler is in.
          in: path
          name: systemKey
          required: true
          type: string
        - description: Name of the trigger handler you want.
          in: path
          name: name
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: No response was specified
      summary: DEVELOPER - Get trigger handler
      tags:
        - Developer
    post:
      description: Creates a new trigger handler.
      operationId: CreateTrigger
      parameters:
        - description: Developer Token obtained through admin authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: New trigger information.
          in: body
          name: body
          required: true
          schema:
            $ref: "#/definitions/triggerdata"
        - description: System Key that identifies the system the handler is in.
          in: path
          name: systemKey
          required: true
          type: string
        - description: Name of the trigger handler you're creating.
          in: path
          name: name
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: No response was specified
      summary: DEVELOPER - Create trigger handler
      tags:
        - Developer
    put:
      description: Updates the specified trigger handler.
      operationId: UpdateTriggerHandler
      parameters:
        - description: Developer Token obtained through admin authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: Updated trigger handler information.
          in: body
          name: body
          required: true
          schema:
            $ref: "#/definitions/triggerdata"
        - description: System Key that identifies the system the handler is in.
          in: path
          name: systemKey
          required: true
          type: string
        - description: Name of the trigger handler you're updating.
          in: path
          name: name
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: No response was specified
      summary: DEVELOPER - Update trigger handler
      tags:
        - Developer
  "/admin/triggers/timers/{systemKey}":
    get:
      description: Returns a list of timer handlers.
      operationId: GetTimerHandlers
      parameters:
        - description: Developer Token obtained through admin authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: System Key that identifies the system the handler is in.
          in: path
          name: systemKey
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: No response was specified
      summary: DEVELOPER - Get timer handlers
      tags:
        - Developer
  "/admin/triggers/timers/{systemKey}/{name}":
    delete:
      description: Deletes the specified trigger handler.
      operationId: DeleteTimerHandler
      parameters:
        - description: Developer Token obtained through admin authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: System Key that identifies the system the handler is in.
          in: path
          name: systemKey
          required: true
          type: string
        - description: Name of the timer you're deleting.
          in: path
          name: name
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: No response was specified
      summary: DEVELOPER - Delete trigger handler
      tags:
        - Developer
    get:
      description: Returns the specified timer handler information.
      operationId: GetTimerHandler
      parameters:
        - description: Developer Token obtained through admin authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: System Key that identifies the system the handler is in.
          in: path
          name: systemKey
          required: true
          type: string
        - description: Name of the timer handler you want.
          in: path
          name: name
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: No response was specified
      summary: DEVELOPER - Get timer handler
      tags:
        - Developer
    post:
      description: Creates new timer handler.
      operationId: create_timer_handler
      parameters:
        - description: Developer Token obtained through admin authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: System Key that identifies the system the handler is in.
          in: path
          name: systemKey
          required: true
          type: string
        - description: Name of the timer handler you're creating.
          in: path
          name: name
          required: true
          type: string
        - description: New timer information.
          in: body
          name: body
          required: true
          schema:
            $ref: "#/definitions/timerdata"
      produces:
        - application/json
      responses:
        "200":
          description: No response was specified
      summary: DEVELOPER - Create time handler
      tags:
        - Developer
    put:
      description: Updates the specified timer handler.
      operationId: UpdateTimerHandler
      parameters:
        - description: Developer Token obtained through admin authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: System Key that identifies the system the handler is in.
          in: path
          name: systemKey
          required: true
          type: string
        - description: Name of the timer handler you're updating.
          in: path
          name: name
          required: true
          type: string
        - description: Updated timer handler information.
          in: body
          name: body
          required: true
          schema:
            $ref: "#/definitions/timerdata"
      produces:
        - application/json
      responses:
        "200":
          description: No response was specified
      summary: DEVELOPER - Update timer handler
      tags:
        - Developer
  "/admin/user/{systemKey}":
    delete:
      description: Deletes user from the system
      operationId: DeleteUser
      parameters:
        - description: Developer Token obtained through admin authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: System Key that identifies the system the handler is in.
          in: path
          name: systemKey
          required: true
          type: string
        - description: UserId of the user to delete
          in: query
          name: user
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: User is deleted.
        "400":
          description: Bad Request
        "500":
          description: Internal Server Error
      summary: DEVELOPER - Delete user
      tags:
        - Developer
    get:
      description: Returns list of all of the users in the system
      operationId: GetUserList
      parameters:
        - description: System Key that identifies the system the user is a part of.
          in: path
          name: systemKey
          required: true
          type: string
        - description: Developer Token obtained through admin authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: Tags to filter users. Check 'users' model at the bottom of this page.
          in: query
          name: query
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: Returns list of all users, user information, and count
        "400":
          description: Bad Request
        "500":
          description: Internal Server Error
      summary: DEVELOPER - Get list of users and information
      tags:
        - Developer
    post:
      description: Add an user to the system.
      operationId: AddUser
      parameters:
        - description: System Key that identifies the system the user is a part of.
          in: path
          name: systemKey
          required: true
          type: string
        - description: Developer Token obtained through admin authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: Developer's email.
          in: body
          name: body
          required: true
          schema:
            $ref: "#/definitions/userlogin"
      produces:
        - application/json
      responses:
        "200":
          description: User is added to the system.
        "400":
          description: Bad Request
        "401":
          description: Unauthorized
        "500":
          description: Internal Server Error
      summary: DEVELOPER - Add user
      tags:
        - Developer
    put:
      description: Changes any colomn in users table and update password or permissions of the specified user.
      operationId: UserChangeUserInfo
      parameters:
        - description: System Key that identifies the system the user is a part of.
          in: path
          name: systemKey
          required: true
          type: string
        - description: Developer Token obtained through admin authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: Roles to change for the user.
          in: body
          name: body
          required: true
          schema:
            $ref: "#/definitions/roles"
      produces:
        - application/json
      responses:
        "200":
          description: User's roles successfully changed.
        "400":
          description: Bad Request
        "500":
          description: Internal Server Error
      summary: DEVELOPER - Change user information and permissions
      tags:
        - Developer
  "/admin/user/{systemKey}/columns":
    get:
      description: Returns data in the user list column
      operationId: GetUserColumnData
      parameters:
        - description: System Key that identifies the system the user is a part of.
          in: path
          name: systemKey
          required: true
          type: string
        - description: Developer Token obtained through admin authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: Returns list of all users
        "400":
          description: Bad Request
        "500":
          description: Internal Server Error
      summary: DEVELOPER - Get users column info.
      tags:
        - Developer
    post:
      description: Adds a new column to the user collection
      operationId: AddColumn
      parameters:
        - description: System Key that identifies the system the user is a part of.
          in: path
          name: systemKey
          required: true
          type: string
        - description: Developer Token obtained through admin authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: Column information.
          in: body
          name: payload
          required: true
          schema:
            $ref: "#/definitions/addUserColumn"
      produces:
        - application/json
      responses:
        "200":
          description: Column is added to the collection.
        "400":
          description: Bad Request
        "500":
          description: Internal Server Error
      summary: DEVELOPER - Add new column
      tags:
        - Developer
  "/admin/user/{systemKey}/roles":
    delete:
      description: Deletes roles from the system
      operationId: DeleteRoles
      parameters:
        - description: Developer Token obtained through admin authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: System Key that identifies the system the handler is in.
          in: path
          name: systemKey
          required: true
          type: string
        - description: Role identification key.
          in: query
          name: query
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: No response was specified
        "400":
          description: Bad Request
        "500":
          description: Internal Server Error
      summary: DEVELOPER - Delete roles
      tags:
        - Developer
    get:
      description: |
        ## Description:
          Get as a list of roles that are available to add to an user 
        ### Query:
        ```json
        {"PAGESIZE":int,"PAGENUM":int,"FILTERS":[[{"EQ":[{"name":"value"}]}]]}
        ```

        ### Example:
          0 and 0 for pagesize and pagenum returns all the information in one response.
        ```json
        {"PAGESIZE":0,"PAGENUM":0,"FILTERS":[[{"EQ":[{"name":"Authenticated"}]}]]}
        ```
      operationId: GetRoles
      parameters:
        - description: System Key that identifies the system the user is a part of.
          in: path
          name: systemKey
          required: true
          type: string
        - description: Developer Token obtained through admin authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: Refer to the example query above.
          in: query
          name: query
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: Returns role(s), role information, and permissions for the user
        "400":
          description: Bad Request
        "500":
          description: Internal Server Error
      summary: DEVELOPER - Get list of roles
      tags:
        - Developer
    post:
      description: Adds a new role to the system.
      operationId: AddRole
      parameters:
        - description: System Key that identifies the system the user is a part of.
          in: path
          name: systemKey
          required: true
          type: string
        - description: Developer Token obtained through admin authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: Role information.
          in: body
          name: body
          schema:
            $ref: "#/definitions/rolesinfo"
      produces:
        - application/json
      responses:
        "200":
          description: Role gets added.
        "400":
          description: Bad Request
        "500":
          description: Internal Server Error
      summary: DEVELOPER - Add new role
      tags:
        - Developer
    put:
      description: Changes settings in individual roles
      operationId: SettingsChanges
      parameters:
        - description: System Key that identifies the system the user is a part of.
          in: path
          name: systemKey
          required: true
          type: string
        - description: Developer Token obtained through admin authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: Information about changes
          in: body
          name: payload
          required: true
          schema:
            $ref: "#/definitions/changeRoleSettings"
      produces:
        - application/json
      responses:
        "200":
          description: Column is added to the collection.
        "400":
          description: Bad Request
        "500":
          description: Internal Server Error
      summary: DEVELOPER - Changes roles settings
      tags:
        - Developer
  "/admin/user/{systemKey}/roles/count":
    get:
      description: Get number of roles in a system
      operationId: GetRolesCount
      parameters:
        - description: System Key that identifies the system the user is a part of.
          in: path
          name: systemKey
          required: true
          type: string
        - description: Developer Token obtained through admin authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: Identifies page size and page number for roles list.
          in: query
          name: user
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: Returns list of all users
        "401":
          description: Unauthorized
        "500":
          description: Internal Server Error
      summary: DEVELOPER - Get number of roles
      tags:
        - Developer
  /admin/userinfo:
    get:
      description: Returns all user information about the current developer. This is a developer only endpoint.
      operationId: GetDevInfo
      parameters:
        - description: Developer Token obtained through admin authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: Current developer information.
          schema:
            $ref: "#/definitions/userinfo"
        "400":
          description: Bad Request.
          schema:
            $ref: "#/definitions/ErrorResp"
      summary: DEVELOPER - Get dev info
      tags:
        - Developer
    put:
      description: |
        ## Description:
          Update the developer 2FA information. This is a developer only endpoint.
          Note - the email is taken from the developer's account.
        ## two_factor_method
          * email
          * sms
          * email_sms (enables both method)
      operationId: UpdateDev2FA
      parameters:
        - description: Developer Token obtained through admin authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: Updates to make for the two-factor auth settings for the developer.
          in: body
          name: body
          required: true
          schema:
            $ref: "#/definitions/2FAinfo"
      produces:
        - application/json
      responses:
        "200":
          description: 2FA methods successfully changed.
          schema:
            $ref: "#/definitions/SuccessResp"
        "400":
          description: Bad Request
          schema:
            $ref: "#/definitions/ErrorResp"
      summary: 2FA - Update developer 2FA information.
      tags:
        - 2FA
  "/admin/v/4/service_caches/{systemKey}":
    get:
      operationId: GetSharedCache
      parameters:
        - description: Dev Token obtained through user authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: System Key that identifies the system that holds the deployment.
          in: path
          name: systemKey
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: Retrieves a list of shared caches.
          schema:
            $ref: "#/definitions/CacheArrayResp"
        "400":
          description: Bad Request.
          schema:
            $ref: "#/definitions/ErrorResp"
        "401":
          description: Unauthorized. User cannot access resource.
      summary: SHARED CACHE - Gets shared caches for a system
      tags:
        - Shared Cache
  "/admin/v/4/service_caches/{systemKey}/{cacheName}":
    delete:
      description: Deletes a shared cache
      operationId: DeleteSharedCache
      parameters:
        - description: Dev Token obtained through user authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: System Key that identifies the system that holds the deployment.
          in: path
          name: systemKey
          required: true
          type: string
        - description: Name of the shared cache to delete
          in: path
          name: cacheName
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: Successfully Deleted Cache
          schema:
            $ref: "#/definitions/SuccessResp"
        "400":
          description: Bad Request.
          schema:
            $ref: "#/definitions/ErrorResp"
        "401":
          description: Unauthorized. User cannot access resource.
      summary: SHARED CACHE - Delete a shared cache
      tags:
        - Shared Cache
    post:
      description: Adds a shared cache to the system
      operationId: addSharedCache
      parameters:
        - description: Dev Token obtained through user authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: System Key that identifies the system that holds the shared cache.
          in: path
          name: systemKey
          required: true
          type: string
        - description: Name of the shared cache to add
          in: path
          name: cacheName
          required: true
          type: string
        - description: Information to create a shared cache.
          in: body
          name: body
          required: true
          schema:
            $ref: "#/definitions/addCache"
      produces:
        - application/json
      responses:
        "200":
          description: Creates new shared cache.
          schema:
            $ref: "#/definitions/SuccessResp"
        "400":
          description: Bad Request.
          schema:
            $ref: "#/definitions/ErrorResp"
        "401":
          description: Unauthorized. User cannot access resource.
        "500":
          description: Server error.
          schema:
            $ref: "#/definitions/ErrorResp"
      summary: SHARED CACHE - Add a shared cache
      tags:
        - Shared Cache
    put:
      description: Updates a shared cache properties, like ttl & description.
      operationId: UpdateSharedCache
      parameters:
        - description: Dev Token obtained through user authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: System Key that identifies the system that holds the shared cache.
          in: path
          name: systemKey
          required: true
          type: string
        - description: Name of the shared cache to update
          in: path
          name: cacheName
          required: true
          type: string
        - description: Updated cache information.
          in: body
          name: body
          required: true
          schema:
            $ref: "#/definitions/updateCache"
      produces:
        - application/json
      responses:
        "200":
          description: Shared Cache successfully updated.
          schema:
            $ref: "#/definitions/SuccessResp"
        "400":
          description: Bad Request.
          schema:
            $ref: "#/definitions/ErrorResp"
        "401":
          description: Unauthorized. User cannot access resource.
        "500":
          description: Server error.
          schema:
            $ref: "#/definitions/ErrorResp"
      summary: SHARED CACHE - Update a shared cache
      tags:
        - Shared Cache
  "/admin/v/4/session/{systemKey}/device":
    delete:
      description: |
        ## Description:
        Delete device session. 
        ### Query Structure:
        ```json
        {"PAGESIZE":int,"PAGENUM":int,"FILTERS":[[{"_REPLACE_WITH_OPERATOR_":[{"valueType":"value"}]}]], "SORT":[{"DESC":"value"}]}
        ```
          Note - You can generate a complex query object in a code service using the `ClearBlade.Query()` object.
          
          ### Filter Options

        * device_key - string
        * issued - int (Unix timestamp)

          
        ### Example:

        ```json
        {"FILTERS":[[{"NEQ":[{"device_key":"e2c794e60bee9ced68fc101 :: DEVICENAME0001"}]},{"EQ":[{"issued":1587659839}]}]],"PAGESIZE":0,"PAGENUM":0}
        ```
      operationId: DeleteDeviceSession
      parameters:
        - description: Developer Token obtained through admin authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: Query object used to filter the items. See query model at in the description for example.
          in: query
          name: query
          required: false
          type: string
        - description: System Key that identifies the system.
          in: path
          name: systemKey
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: Deletes device session
        "400":
          description: Bad Request.
          schema:
            $ref: "#/definitions/ErrorResp"
        "401":
          description: Unauthorized.
      summary: SESSION  - Delete device session
      tags:
        - Session
    get:
      description: |
        ## Description:
        Returns list of device sessions with Device Key and Timestamps . 
        ### Query Structure:
        ```json
        {"PAGESIZE":int,"PAGENUM":int,"FILTERS":[[{"_REPLACE_WITH_OPERATOR_":[{"valueType":"value"}]}]], "SORT":[{"DESC":"value"}]}
        ```
          Note - You can generate a complex query object in a code service using the `ClearBlade.Query()` object.
          
        ### Filter Options

        * device_key - string
        * issued - int (Unix timestamp)
          
        ### Example:

        ```json
        {"FILTERS":[[{"NEQ":[{"device_key":"e2c794e60bee9ced68fc101 :: DEVICENAME0001}]},{"EQ":[{"issued":1587659839}]}]],"PAGESIZE":0,"PAGENUM":0}
        ```
      operationId: GetDeviceSession
      parameters:
        - description: Developer Token obtained through admin authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: Query object used to filter the items. See query model at in the description for example.
          in: query
          name: query
          required: false
          type: string
        - description: System Key that identifies the system.
          in: path
          name: systemKey
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: Returns list of device sessions
          schema:
            $ref: "#/definitions/deviceSession"
      summary: SESSION  - Get device session info
      tags:
        - Session
  "/admin/v/4/session/{systemKey}/device/count":
    get:
      description: |
        ## Description:
        Returns number of device sessions. 
        ### Query Structure:
        ```json
        {"PAGESIZE":int,"PAGENUM":int,"FILTERS":[[{"_REPLACE_WITH_OPERATOR_":[{"valueType":"value"}]}]], "SORT":[{"DESC":"value"}]}
        ```
          Note - You can generate a complex query object in a code service using the `ClearBlade.Query()` object.
          
        ### Filter Options

        * device_key - string
        * issued - int
          
        ### Example:

        ```json
        {"FILTERS":[[{"NEQ":[{"device_key":"e2c794e60bee9ced68fc101 :: DEVICENAME0001"}]},{"EQ":[{"issued":1587659839}]}]],"PAGESIZE":0,"PAGENUM":0}
        ```
      operationId: GetDeviceSessionCount
      parameters:
        - description: Developer Token obtained through admin authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: Query object used to filter the items. See query model at in the description for example.
          in: query
          name: query
          required: false
          type: string
        - description: System Key that identifies the system.
          in: path
          name: systemKey
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: Returns number of device sessions
          schema:
            $ref: "#/definitions/count"
      summary: SESSION  - Get device session count
      tags:
        - Session
  "/admin/v/4/session/{systemKey}/user":
    delete:
      description: |
        ## Description:
        Delete user session. 
        ### Query Structure:
        ```json
        {"PAGESIZE":int,"PAGENUM":int,"FILTERS":[[{"_REPLACE_WITH_OPERATOR_":[{"valueType":"value"}]}]], "SORT":[{"DESC":"value"}]}
        ```
          Note - You can generate a complex query object in a code service using the `ClearBlade.Query()` object.
        ### Filter Options

        * user_id - string
        * issued - int (Unix timestamp)
          
        ### Example:

        ```json
        {"FILTERS":[[{"NEQ":[{"user_id":"9cd8ece70bea9e5a6de9cee05"}]},{"EQ":[{"issued":1587659839}]}]],"PAGESIZE":0,"PAGENUM":0}
        ```
      operationId: DeleteUserSession
      parameters:
        - description: Developer Token obtained through admin authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: Query object used to filter the items. See query model at in the description for example.
          in: query
          name: query
          required: false
          type: string
        - description: System Key that identifies the system.
          in: path
          name: systemKey
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: Deletes user session
        "400":
          description: Bad Request.
          schema:
            $ref: "#/definitions/ErrorResp"
        "401":
          description: Unauthorized.
      summary: SESSION  - Delete user session
      tags:
        - Session
    get:
      description: |
        ## Description:
        Returns list of user sessions with User ID and Timestamps . 
        ### Query Structure:
        ```json
        {"PAGESIZE":int,"PAGENUM":int,"FILTERS":[[{"_REPLACE_WITH_OPERATOR_":[{"valueType":"value"}]}]], "SORT":[{"DESC":"value"}]}
        ```
          Note - You can generate a complex query object in a code service using the `ClearBlade.Query()` object.
          
        ### Filter Options

        * user_id - string
        * issued - int (Unix timestamp)
          
        ### Example:

        ```json
        {"FILTERS":[[{"NEQ":[{"user_id":"9cd8ece70bea9e5a6de9cee05"}]},{"EQ":[{"issued":1587659839}]}]],"PAGESIZE":0,"PAGENUM":0}
        ```
      operationId: GetUserSession
      parameters:
        - description: Developer Token obtained through admin authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: Query object used to filter the items. See query model at in the description for example.
          in: query
          name: query
          required: false
          type: string
        - description: System Key that identifies the system.
          in: path
          name: systemKey
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: Returns list of user sessions
          schema:
            $ref: "#/definitions/userSession"
        "400":
          description: Bad Request.
          schema:
            $ref: "#/definitions/ErrorResp"
        "401":
          description: Unauthorized. User cannot access resource.
      summary: SESSION  - Get user session info
      tags:
        - Session
  "/admin/v/4/session/{systemKey}/user/count":
    get:
      description: |
        ## Description:
        Returns number of user sessions. 
        ### Query Structure:
        ```json
        {"PAGESIZE":int,"PAGENUM":int,"FILTERS":[[{"_REPLACE_WITH_OPERATOR_":[{"valueType":"value"}]}]], "SORT":[{"DESC":"value"}]}
        ```
          Note - You can generate a complex query object in a code service using the `ClearBlade.Query()` object.
          
        ### Filter Options

        * user_id - string
        * issued - int (Unix timestamp)
          
        ### Example:

        ```json
        {"FILTERS":[[{"NEQ":[{"user_id":"9cd8ece70bea9e5a6de9cee05"}]},{"EQ":[{"issued":1587659839}]}]],"PAGESIZE":0,"PAGENUM":0}
        ```
      operationId: GetUserSessionCount
      parameters:
        - description: Developer Token obtained through admin authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: Query object used to filter the items. See query model at in the description for example.
          in: query
          name: query
          required: false
          type: string
        - description: System Key that identifies the system.
          in: path
          name: systemKey
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: Returns number of user sessions
          schema:
            $ref: "#/definitions/count"
      summary: SESSION  - Get user session count
      tags:
        - Session
  /admin/v/4/systemmanagement:
    delete:
      description: Deletes the specified system.
      operationId: DeleteSystem
      parameters:
        - description: Developer Token obtained through admin authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: System Key that identifies the system you want to delete.
          in: query
          name: id
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: System was successfully deleted.
      summary: DEVELOPER - Delete system
      tags:
        - Developer
    get:
      description: Returns metadata about specified system.
      operationId: GetSystemInfo
      parameters:
        - description: Developer Token obtained through admin authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: System Key that identifies the system you want the info about.
          in: query
          name: id
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: Specified system metadata.
          schema:
            $ref: "#/definitions/systemSettings"
        "400":
          description: Bad Request.
      summary: DEVELOPER - Get system info
      tags:
        - Developer
    post:
      description: Creates a new system tied to the developer's account.
      operationId: CreateSystem
      parameters:
        - description: Developer Token obtained through developer authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: New system information.
          in: body
          name: body
          required: true
          schema:
            $ref: "#/definitions/newsystem"
      produces:
        - application/json
      responses:
        "200":
          description: System was successfully created.
          schema:
            $ref: "#/definitions/systemSettings"
        "400":
          description: Bad Request.
      summary: DEVELOPER - Create system
      tags:
        - Developer
    put:
      description: Updates a system's metadata.
      operationId: UpdateSystem
      parameters:
        - description: Developer Token obtained through admin authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: Updated system information.
          in: body
          name: body
          required: true
          schema:
            $ref: "#/definitions/systemSettings"
      produces:
        - application/json
      responses:
        "200":
          description: System information successfully updated.
      summary: DEVELOPER - Update system info
      tags:
        - Developer
  "/admin/v/4/webhook/{systemKey}":
    get:
      description: Returns all webhooks in the system.
      operationId: GetWebhooks
      parameters:
        - description: Dev Token obtained through authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: System Key that identifies the system the messages belong to.
          in: path
          name: systemKey
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: List of webhooks is returned.
          schema:
            $ref: "#/definitions/webhookResp"
        "400":
          description: Bad request.
          schema:
            $ref: "#/definitions/ErrorResp"
        "401":
          description: Unauthorized.
      summary: WEBHOOKS - Returns webhooks in the system
      tags:
        - Webhooks
  "/admin/v/4/webhook/{systemKey}/{name}":
    delete:
      description: Deletes an existing webhook in the specified system.
      operationId: DeleteWebhook
      parameters:
        - description: Dev Token obtained through authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: System Key that identifies the system the messages belong to.
          in: path
          name: systemKey
          required: true
          type: string
        - description: Name that identifies the webhook
          in: path
          name: name
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: Webhook was successfully deleted.
          schema:
            $ref: "#/definitions/SuccessResp"
      summary: WEBHOOKS - Delete a webhook
      tags:
        - Webhooks
    post:
      description: |
        Creates a webhook in the system
        ### List of Auth Methods
          These will be used in `auth_method` in the body.
          * `clearblade_auth`
          * `http_basic_auth`
          * `payload_auth`
          * `no_auth`
      operationId: CreateWebhook
      parameters:
        - description: Dev Token obtained through authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: System Key that identifies the system the messages belong to.
          in: path
          name: systemKey
          required: true
          type: string
        - description: Name that identifies the webhook
          in: path
          name: name
          required: true
          type: string
        - description: Properties to create webhooks.
          in: body
          name: body
          required: true
          schema:
            $ref: "#/definitions/webhookCreate"
      produces:
        - application/json
      responses:
        "200":
          description: Creates the webhook
          schema:
            $ref: "#/definitions/SuccessResp"
        "400":
          description: Bad request.
          schema:
            $ref: "#/definitions/ErrorResp"
        "401":
          description: Unauthorized.
          schema:
            $ref: "#/definitions/ErrorResp"
        "500":
          description: Internal Server Error.
          schema:
            $ref: "#/definitions/ErrorResp"
      summary: WEBHOOKS - Creates a webhook
      tags:
        - Webhooks
    put:
      description: |
        Updates an existing webhook in the specified system.
        ### List of Auth Methods
          These will be used in `auth_method` in the body.
          * `clearblade_auth`
          * `http_basic_auth`
          * `payload_auth`
          * `no_auth`
      operationId: UpdateWebhook
      parameters:
        - description: Dev Token obtained through authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: System Key that identifies the system the messages belong to.
          in: path
          name: systemKey
          required: true
          type: string
        - description: Name that identifies the webhook
          in: path
          name: name
          required: true
          type: string
        - description: Updated collection information.
          in: body
          name: body
          required: false
          schema:
            $ref: "#/definitions/webhookUpdate"
      produces:
        - application/json
      responses:
        "200":
          description: Collection was successfully updated.
        "400":
          description: Bad request.
          schema:
            $ref: "#/definitions/ErrorResp"
        "401":
          description: Unauthorized.
          schema:
            $ref: "#/definitions/ErrorResp"
        "500":
          description: Internal Server Error.
          schema:
            $ref: "#/definitions/ErrorResp"
      summary: WEBHOOKS - Update a webhook
      tags:
        - Webhooks
  /admin/validate:
    post:
      description: |
        ## Description:
          Sends a validation link to either the developer's email or phone. This endpoint is for Dev only.
        ## Validation Method Types:
        * email
        * phone
      operationId: SendValidation
      parameters:
        - description: Developer Token obtained through admin authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: The method type to validate
          in: body
          name: body
          required: true
          schema:
            $ref: "#/definitions/validation"
      produces:
        - application/json
      responses:
        "200":
          description: Validation successfully sent.
          schema:
            $ref: "#/definitions/SuccessResp"
        "400":
          description: Bad Request.
          schema:
            $ref: "#/definitions/ErrorResp"
      summary: 2FA - Send validation link
      tags:
        - 2FA
  "/admin/{systemKey}/sync/alledges/status":
    get:
      description: Returns sync status for all edges in a system
      operationId: AllEdgeSyncStatus
      parameters:
        - description: Token obtained through dev authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: System Key that identifies the system that holds the edges.
          in: path
          name: systemKey
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: Returns list of edges and the assets and their sync status related to them
        "400":
          description: Bad request
      summary: EDGE - Gets sync status for all edges
      tags:
        - Edge
  "/admin/{systemKey}/sync/deployment/status/{deploymentName}":
    get:
      operationId: GetSyncStatus
      parameters:
        - description: Dev Token obtained through user authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: System Key that identifies the system that holds the deployment.
          in: path
          name: systemKey
          required: true
          type: string
        - description: Name of the deployment to retrieve
          in: path
          name: deploymentName
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: Retrieves sync status of marked synced items successfully
        "400":
          description: Bad Request.
          schema:
            $ref: "#/definitions/ErrorResp"
        "401":
          description: Unauthorized.
        "500":
          description: Server error.
      summary: DEPLOYMENTS - Gets sync status for a deployment
      tags:
        - Deployments
  "/admin/{systemKey}/sync/edge/status/{edgeName}":
    get:
      description: Returns sync status for an edge
      operationId: EdgeSyncStatus
      parameters:
        - description: Token obtained through dev authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: System Key that identifies the system that holds the edges.
          in: path
          name: systemKey
          required: true
          type: string
        - description: Name of the edge
          in: path
          name: edgeName
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: Returns list of assets and their sync status related to the edge
        "400":
          description: Bad request
      summary: EDGE - Gets sync status for an edge
      tags:
        - Edge
  "/admin/{systemKey}/sync/retry":
    post:
      description: Retries sync for an asset in an deployment
      operationId: RetrySync
      parameters:
        - description: Dev Token obtained through dev authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: System Key that identifies the system that holds the deployment.
          in: path
          name: systemKey
          required: true
          type: string
        - description: Information regarding sync
          in: body
          name: body
          required: true
          schema:
            $ref: "#/definitions/retrySync"
      produces:
        - application/json
      responses:
        "200":
          description: Retries sync successfully
        "500":
          description: Server error.
      summary: DEPLOYMENTS - Retries sync for an asset
      tags:
        - Deployments
  /api/about:
    get:
      description: Returns information about the platform version.
      operationId: APIInfo
      produces:
        - application/json
      responses:
        "200":
          description: Returns platform version information
          schema:
            $ref: "#/definitions/platformInfo"
      summary: DEVELOPER - Gets the information for the platform
  "/api/v/1/code/{systemKey}/{serviceName}":
    get:
      description: Returns setting information and data for a code service
      operationId: GetService
      parameters:
        - description: Dev Token obtained through authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: System key that identifies the system the device is a part of.
          in: path
          name: systemKey
          required: true
          type: string
        - description: Code Service's name
          in: path
          name: serviceName
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: Returns setting information and data for a code service
        "500":
          description: Server error.
      summary: CODE - Retrieve information about service
      tags:
        - Code
    post:
      description: Executes a code service.
      operationId: ExecuteService
      parameters:
        - description: Token obtained through user authentication.
          in: header
          name: ClearBlade-UserToken
          required: true
          type: string
        - description: System Key that identifies the system that holds the code service.
          in: path
          name: systemKey
          required: true
          type: string
        - description: Code Service's name
          in: path
          name: serviceName
          required: true
          type: string
        - description: Parameters for code service.
          in: body
          name: parameters
          required: false
          schema:
            type: object
      produces:
        - application/json
      responses:
        "200":
          description: Code service successfully executed.
        "500":
          description: Server error.
      summary: CODE - Call/Execute code service
      tags:
        - Code
  "/api/v/1/collection/{systemKey}/{collectionName}":
    delete:
      description: Deletes data rows in the specified collection.
      operationId: DeleteCollectionData
      parameters:
        - description: Token obtained through user authentication.
          in: header
          name: ClearBlade-UserToken
          required: true
          type: string
        - description: System Key that identifies the system that holds the collection.
          in: path
          name: systemKey
          required: true
          type: string
        - description: Name of the collection.
          in: path
          name: collectionName
          required: true
          type: string
        - description: Query to limit scope of deletion.
          in: query
          name: query
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: Rows successfully deleted.
          schema:
            $ref: "#/definitions/count"
        "400":
          description: Bad request.
          schema:
            $ref: "#/definitions/ErrorResp"
      summary: DATA(name) - Delete items
      tags:
        - Data
    get:
      description: Returns the data from the specified collection.
      operationId: GetCollectionData
      parameters:
        - description: Token obtained through user authentication.
          in: header
          name: ClearBlade-UserToken
          required: true
          type: string
        - description: System Key that identifies the system that holds the collection.
          in: path
          name: systemKey
          required: true
          type: string
        - description: Name of the collection.
          in: path
          name: collectionName
          required: true
          type: string
        - description: Query object used to filter the items. See query model below for example.
          in: query
          name: query
          required: false
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: A list of the data rows from the specified collection that match the query.
          schema:
            $ref: "#/definitions/collectionSuccess"
        "400":
          description: Bad request.
          schema:
            $ref: "#/definitions/ErrorResp"
        "401":
          description: Unauthorized
          schema:
            $ref: "#/definitions/ErrorResp"
      summary: DATA(name) - Get items
      tags:
        - Data
    post:
      description: Creates new data rows in the specified collection.
      operationId: CreateCollectionData
      parameters:
        - description: Token obtained through user authentication.
          in: header
          name: ClearBlade-UserToken
          required: true
          type: string
        - description: System Key that identifies the system that holds the collection.
          in: path
          name: systemKey
          required: true
          type: string
        - description: Name of the collection.
          in: path
          name: collectionName
          required: true
          type: string
        - description: New data row(s). Can accept multiple comma-separated key-value pairs to populate columns. Can also accept a blank object to create an unpopulated row.
          in: body
          name: payload
          schema:
            $ref: "#/definitions/ColumnField"
      produces:
        - application/json
      responses:
        "200":
          description: Items successfully created.
          schema:
            $ref: "#/definitions/ColumnField"
        "400":
          description: Bad request.
          schema:
            $ref: "#/definitions/ErrorResp"
      summary: DATA(name) - Create items
      tags:
        - Data
    put:
      description: Updates preexisting data rows in the specified collection.
      operationId: UpdateCollectionData
      parameters:
        - description: Token obtained through user authentication.
          in: header
          name: ClearBlade-UserToken
          required: true
          type: string
        - description: System Key that identifies the system that holds the collection.
          in: path
          name: systemKey
          required: true
          type: string
        - description: Name of the collection.
          in: path
          name: collectionName
          required: true
          type: string
        - description: Query to limit scope of update, and new data values.
          in: body
          name: payload
          required: true
          schema:
            $ref: "#/definitions/DataPut"
      produces:
        - application/json
      responses:
        "200":
          description: Items successfully updated.
          schema:
            $ref: "#/definitions/count"
        "400":
          description: Bad request.
          schema:
            $ref: "#/definitions/ErrorResp"
      summary: DATA(name) - Update items
      tags:
        - Data
  "/api/v/1/data/{collectionID}":
    delete:
      description: Deletes data rows in the specified collection.
      operationId: DeleteCollectionDataAlt
      parameters:
        - description: Token obtained through user authentication.
          in: header
          name: ClearBlade-UserToken
          required: true
          type: string
        - description: ID of the collection.
          in: path
          name: collectionID
          required: true
          type: string
        - description: Query to limit scope of deletion.
          in: query
          name: query
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: Rows successfully deleted.
          schema:
            $ref: "#/definitions/count"
        "400":
          description: Bad request.
          schema:
            $ref: "#/definitions/ErrorResp"
      summary: DATA(id) - Delete items
      tags:
        - Data
    get:
      description: Returns the data from the specified collection.
      operationId: GetCollectionDataAlt
      parameters:
        - description: Token obtained through user authentication.
          in: header
          name: ClearBlade-UserToken
          required: true
          type: string
        - description: ID of the collection.
          in: path
          name: collectionID
          required: true
          type: string
        - description: Query object used to filter the items. See query model below for example.
          in: query
          name: query
          required: false
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: A list of the data rows from the specified collection that match the query.
          schema:
            $ref: "#/definitions/collectionSuccess"
        "400":
          description: Bad request.
          schema:
            $ref: "#/definitions/ErrorResp"
      summary: DATA(id) - Get items
      tags:
        - Data
    post:
      description: Creates new data rows in the specified collection.
      operationId: CreateCollectionDataAlt
      parameters:
        - description: Token obtained through user authentication.
          in: header
          name: ClearBlade-UserToken
          required: true
          type: string
        - description: ID of the collection.
          in: path
          name: collectionID
          required: true
          type: string
        - description: New data row(s). Can accept multiple comma-separated key-value pairs to populate columns. Can also accept a blank object to create an unpopulated row.
          in: body
          name: payload
          required: true
          schema:
            $ref: "#/definitions/ColumnField"
      produces:
        - application/json
      responses:
        "200":
          description: Items successfully created.
          schema:
            $ref: "#/definitions/ColumnField"
        "400":
          description: Bad request.
          schema:
            $ref: "#/definitions/ErrorResp"
      summary: DATA(id) - Create items
      tags:
        - Data
    put:
      description: Updates preexisting data rows in the specified collection.
      operationId: UpdateCollectionDataAlt
      parameters:
        - description: Token obtained through user authentication.
          in: header
          name: ClearBlade-UserToken
          required: true
          type: string
        - description: ID of the collection.
          in: path
          name: collectionID
          required: true
          type: string
        - description: Query to limit scope of update, and new data values.
          in: body
          name: payload
          required: true
          schema:
            $ref: "#/definitions/DataPut"
      produces:
        - application/json
      responses:
        "200":
          description: Items successfully updated.
          schema:
            $ref: "#/definitions/count"
        "400":
          description: Bad request.
          schema:
            $ref: "#/definitions/ErrorResp"
      summary: DATA(id) - Update items
      tags:
        - Data
  "/api/v/1/data/{collectionID}/columns":
    get:
      description: Returns the columns and their data type for the specified collection.
      operationId: GetColumns
      parameters:
        - description: Token obtained through user authentication.
          in: header
          name: ClearBlade-UserToken
          required: true
          type: string
        - description: ID of the collection.
          in: path
          name: collectionID
          required: true
          type: string
        - description: System Key that identifies the system that holds the collection.
          in: header
          name: ClearBlade-SystemKey
          required: true
          type: string
        - description: header parameter for ensuring authenticity
          in: header
          name: ClearBlade-SystemSecret
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: No response was specified
          schema:
            $ref: "#/definitions/columnSuccess"
        "400":
          description: Invalid status value
          schema:
            $ref: "#/definitions/ErrorResp"
      summary: DATA(id) - Get columns
      tags:
        - Data
  "/api/v/1/message/{systemKey}":
    delete:
      description: Deletes the messaging history for a single topic.
      operationId: DeleteMessageHistory
      parameters:
        - description: Token obtained through user authentication.
          in: header
          name: ClearBlade-UserToken
          required: true
          type: string
        - description: System Key that identifies the system the messages belong to.
          in: path
          name: systemKey
          required: true
          type: string
        - description: Messaging topic to delete the history for.
          in: query
          name: topic
          required: true
          type: string
        - description: Number of messages to delete. 0 deletes all messages.
          in: query
          name: count
          required: true
          type: string
        - description: Point in time to start deleting. (epoch timestamp)
          in: query
          name: last
          required: false
          type: string
        - description: Start time for deleting within a timeframe. (epoch timestamp)
          in: query
          name: start
          required: false
          type: string
        - description: End time for deleting within a timeframe. (epoch timestamp)
          in: query
          name: stop
          required: false
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: Message history was successfully deleted.
      summary: MESSAGING - Delete history
      tags:
        - Messaging
    get:
      description: Returns the message history for a single topic. Does not honor wildcards.
      operationId: GetMessageHistory
      parameters:
        - description: Token obtained through user authentication.
          in: header
          name: ClearBlade-UserToken
          required: true
          type: string
        - description: System Key that identifies the system the messages belong to.
          in: path
          name: systemKey
          required: true
          type: string
        - description: Messaging topic to retrieve the history for.
          in: query
          name: topic
          required: true
          type: string
        - description: Number of messages to retrieve. 0 retrieves all messages.
          in: query
          name: count
          required: true
          type: string
        - description: Point in time to start search. (epoch timestamp)
          in: query
          name: last
          required: false
          type: string
        - description: Start time for searching within a timeframe. (epoch timestamp)
          in: query
          name: start
          required: false
          type: string
        - description: End time for searching within a timeframe. (epoch timestamp)
          in: query
          name: stop
          required: false
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: List of messages published to the specified topic.
      summary: MESSAGING - Get history
      tags:
        - Messaging
  "/api/v/1/message/{systemKey}/publish":
    post:
      description: Publishes a message to a topic, given the user has permission to publish on that topic.
      operationId: PublishMessage
      parameters:
        - description: Token obtained through user authentication.
          in: header
          name: ClearBlade-UserToken
          required: true
          type: string
        - description: System Key that identifies the system the messages belong to.
          in: path
          name: systemKey
          required: true
          type: string
        - description: Message to publish.
          in: body
          name: body
          required: true
          schema:
            $ref: "#/definitions/messagePublish"
      produces:
        - application/json
      responses:
        "200":
          description: No response was specified
      summary: MESSAGING - Publish message
      tags:
        - Messaging
  /api/v/1/user:
    get:
      description: Returns all user info that the current user is authorized to see.
      operationId: GetUsers
      parameters:
        - description: Token obtained through user authentication.
          in: header
          name: ClearBlade-UserToken
          required: true
          type: string
        - description: Query object used to filter the user list. See the query model below for an example.
          in: query
          name: query
          required: false
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: A list of users.
          schema:
            $ref: "#/definitions/getUsersSuccess"
        "400":
          description: Invalid UserToken. Either the user is not authenticated or the token is malformed.
          schema:
            $ref: "#/definitions/ErrorResp"
        "403":
          description: Forbidden.
          schema:
            $ref: "#/definitions/ErrorResp"
      summary: USERS - Get all users
      tags:
        - User
  /api/v/1/user/anon:
    post:
      description: Logs an anonymous user into the specified system and returns an UserToken.
      operationId: AuthAnon
      parameters:
        - description: System Key that identifies the system you're logging the user into.
          in: header
          name: ClearBlade-SystemKey
          required: true
          type: string
        - description: System Secret that ensures authenticity.
          in: header
          name: ClearBlade-SystemSecret
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: Anonymous authenticated.
          schema:
            $ref: "#/definitions/authAnon"
        "400":
          description: Bad Request.
          schema:
            $ref: "#/definitions/ErrorResp"
        "401":
          description: Unauthorized.
          schema:
            $ref: "#/definitions/ErrorResp"
        "500":
          description: Server error.
          schema:
            $ref: "#/definitions/ErrorResp"
      summary: USERS - Authenticate anonymous user
      tags:
        - User
  /api/v/1/user/auth:
    post:
      description: |
        ## Description
        Logs user into system and returns an UserToken.
        ## Endpoint Body Values
        Here are the body values for the two scenarios
        ### Basic Auth
        Required Keys
          - username
          - password

        Example 
        ```json
        {
          "username":"cbman@clearblade.com",
          "password":"cl34rbl4d3"
        }
        ```  

        ### Refreshing Token
        Required Keys 
          - grant_type (only one valid value - "refresh_token")
          - refresh_token
          - access_token

        Example 
        ```json
        {
          "grant_type":"refresh_token",
          "refresh_token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOiJmMjkwZTJlYjBiZDRmNjhiZDRkM2RlZjNkMWM0MDEiLCJzaWQiOiIzOWFkM2U5OC1hMmU0LTQxYzQtOGMzNi03ZjQxNDFhYzYxN2IiLCJ1dCI6MiwidHQiOjMsImV4cCI6MTU5MDI3ODExMSwiaWF0IjoxNTg5NDE0MTExfQ.iY6uJu2QgNP0uHoGdmEZm9wsztB1SUrCHrisxoXoxolol",
          "access_token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOiJmMjkwZTJlYjBiZDRmNjhiZDRkM2RlZjNkMWM0MDEiLCJzaWQiOiI3NmY4ODg4MS04YmU5LTRiM2UtOWJkNi1jOTJjZGQ4OTNlMmEiLCJ1dCI6MiwidHQiOjEsImV4cCI6MTU4OTg0NjExMSwiaWF0IjoxNTg5NDE0MTExfQ.xboryHuVn2zz-gSZ_JcD7-j_eBmJU1SMHkiDl9j8bak"
        }
        ```  
      operationId: AuthUser
      parameters:
        - description: System Key that identifies the system you're logging the user into.
          in: header
          name: ClearBlade-SystemKey
          required: true
          type: string
        - description: System Secret that ensures authenticity.
          in: header
          name: ClearBlade-SystemSecret
          required: true
          type: string
        - description: User credentials.
          in: body
          name: body
          required: true
          schema:
            $ref: "#/definitions/authdata"
      produces:
        - application/json
      responses:
        "200":
          description: User authenticated.
          schema:
            $ref: "#/definitions/authUser"
        "400":
          description: Bad Request.
          schema:
            $ref: "#/definitions/ErrorResp"
        "401":
          description: Unauthorized.
        "500":
          description: Internal Server error.
      summary: USERS - Authenticate user
      tags:
        - User
  /api/v/1/user/checkauth:
    post:
      description: Checks if current user's UserToken is valid.
      operationId: UserCheckAuth
      parameters:
        - description: System Key that identifies the system the user might be logged into.
          in: header
          name: ClearBlade-SystemKey
          required: true
          type: string
        - description: User Token obtained through previous authentication.
          in: header
          name: ClearBlade-UserToken
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: User is authenticated with the specified system.
          schema:
            $ref: "#/definitions/userCheck"
        "400":
          description: User in not authenticated with the specified system.
        "401":
          description: Unauthorized.
        "500":
          description: Server error.
      summary: USERS - Check user auth
      tags:
        - User
  /api/v/1/user/info:
    delete:
      description: This endpoints provides user the ability to delete another user if the user has Delete User operation permissions in Roles settings.
      operationId: DeleteUserAsUser
      parameters:
        - description: Token obtained through user authentication.
          in: header
          name: ClearBlade-UserToken
          required: true
          type: string
        - in: header
          name: ClearBlade-SystemKey
          required: true
          type: string
        - in: header
          name: ClearBlade-SystemSecret
          required: true
          type: string
        - in: body
          name: body
          required: true
          schema:
            $ref: "#/definitions/deleteuserdata"
      produces:
        - application/json
      responses:
        "200":
          description: Successfully Deleted User. No response returned.
        "400":
          description: Bad request.
          schema:
            $ref: "#/definitions/ErrorResp"
      summary: Allows an user with adequate permissions to delete another user
      tags:
        - User
    get:
      description: Returns all user information about the current user.
      operationId: GetUserInfo
      parameters:
        - description: Token obtained through user authentication.
          in: header
          name: ClearBlade-UserToken
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: Current user information.
          schema:
            $ref: "#/definitions/getUsers"
        "400":
          description: Bad Request.
          schema:
            $ref: "#/definitions/ErrorResp"
        "401":
          description: Unauthorized.
          schema:
            $ref: "#/definitions/ErrorResp"
        "500":
          description: Server error.
          schema:
            $ref: "#/definitions/ErrorResp"
      summary: USERS - Get user info
      tags:
        - User
    put:
      description: Updates some or all of the current user's information.
      operationId: UpdateUserInfo
      parameters:
        - description: Token obtained through user authentication.
          in: header
          name: ClearBlade-UserToken
          required: true
          type: string
        - description: Updated user information.
          in: body
          name: body
          required: true
          schema:
            $ref: "#/definitions/userdata"
      produces:
        - application/json
      responses:
        "200":
          description: User has been updated.
        "400":
          description: Bad Request.
          schema:
            $ref: "#/definitions/ErrorResp"
        "401":
          description: Unauthorized.
          schema:
            $ref: "#/definitions/ErrorResp"
        "500":
          description: Server error.
          schema:
            $ref: "#/definitions/ErrorResp"
      summary: USERS - Update user info
      tags:
        - User
  /api/v/1/user/logout:
    post:
      description: Logs the current user out of the specified system and invalidates their UserToken.
      operationId: UserLogout
      parameters:
        - description: Token obtained through user authentication.
          in: header
          name: ClearBlade-UserToken
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: Successfully logged out
        "400":
          description: Bad Request.
          schema:
            $ref: "#/definitions/ErrorResp"
        "401":
          description: Unauthorized.
          schema:
            $ref: "#/definitions/ErrorResp"
        "500":
          description: Server error.
          schema:
            $ref: "#/definitions/ErrorResp"
      summary: USERS - Log out user
      tags:
        - User
  /api/v/1/user/pass:
    put:
      description: Changes an user's password.
      operationId: UpdateUserPass
      parameters:
        - description: Token obtained through user authentication.
          in: header
          name: ClearBlade-UserToken
          required: true
          type: string
        - description: Password change information.
          in: body
          name: body
          required: true
          schema:
            $ref: "#/definitions/passdata"
      produces:
        - application/json
      responses:
        "200":
          description: User's password was successfully changed. Returns `Success` as a response.
        "400":
          description: Bad Request.
          schema:
            $ref: "#/definitions/ErrorResp"
        "401":
          description: Unauthorized.
          schema:
            $ref: "#/definitions/ErrorResp"
        "500":
          description: Server error.
          schema:
            $ref: "#/definitions/ErrorResp"
      summary: USERS - Change user password
      tags:
        - User
  /api/v/1/user/reg:
    post:
      description: Registers a new user in the specified system and returns an UserToken for them.
      operationId: RegUser
      parameters:
        - description: System Key that identifies the system you're adding the user to.
          in: header
          name: ClearBlade-SystemKey
          required: true
          type: string
        - description: System Secret that ensures authenticity.
          in: header
          name: ClearBlade-SystemSecret
          required: true
          type: string
        - description: Token obtained through user authentication.
          in: header
          name: ClearBlade-UserToken
          required: true
          type: string
        - description: User registration information.
          in: body
          name: body
          required: true
          schema:
            $ref: "#/definitions/userregdata"
      produces:
        - application/json
      responses:
        "200":
          description: User registered.
          schema:
            $ref: "#/definitions/regUser"
        "400":
          description: Bad Request.
          schema:
            $ref: "#/definitions/ErrorResp"
        "401":
          description: Unauthorized.
        "500":
          description: Internal Server error.
      summary: USERS - Register new user
      tags:
        - User
  "/api/v/2/devices/{SystemKey}":
    delete:
      description: Deletes all devices matching the filters specified by a query.
      operationId: DeleteDevices
      parameters:
        - description: System Key that identifies the system the device is a part of.
          in: path
          name: SystemKey
          required: true
          type: string
        - description: Token obtained through user authentication.
          in: header
          name: ClearBlade-UserToken
          required: true
          type: string
        - description: Tags to filter devices by. See the query model below for an example.
          in: query
          name: query
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: Successfully deleted devices.
        "400":
          description: Bad request.
          schema:
            $ref: "#/definitions/ErrorResp"
      summary: DEVICES - Delete devices using a query
      tags:
        - Device
    get:
      description: Returns all device info that the current user is authorized to see.
      operationId: GetDevices
      parameters:
        - description: System Key that identifies the system the device is a part of.
          in: path
          name: SystemKey
          required: true
          type: string
        - description: Token obtained through user authentication.
          in: header
          name: ClearBlade-UserToken
          required: true
          type: string
        - description: Tags to filter devices by. See the query model below for an example.
          in: query
          name: query
          required: false
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: A list of devices.
          schema:
            $ref: "#/definitions/deviceUpdate"
        "400":
          description: Bad request.
          schema:
            $ref: "#/definitions/ErrorResp"
      summary: DEVICES - Get all devices
      tags:
        - Device
    put:
      description: Updates all devices matching the filters specified by a query.
      operationId: UpdateDevices
      parameters:
        - description: System Key that identifies the system the device is a part of.
          in: path
          name: SystemKey
          required: true
          type: string
        - description: Token obtained through user authentication.
          in: header
          name: ClearBlade-UserToken
          required: true
          type: string
        - description: Query to limit scope of update, and new data values.
          in: body
          name: payload
          required: true
          schema:
            $ref: "#/definitions/PutQuery"
      produces:
        - application/json
      responses:
        "200":
          description: A JSON object representing the SQL result set containing the list of affected devices.
          schema:
            $ref: "#/definitions/QueryResultSet"
        "400":
          description: Bad request.
          schema:
            $ref: "#/definitions/ErrorResp"
      summary: DEVICES - Update devices using a query
      tags:
        - Device
  "/api/v/2/devices/{SystemKey}/auth":
    post:
      description: |
        ## Description
        Logs device into system and returns an Device Access Token.
        ## Endpoint Body Values
        Here are the body values for the two scenarios
        ### Basic Auth
        Required Keys
          - deviceName
          - activeKey

        Example 
        ```json
        {
          "deviceName":"BLEdevice",
          "activeKey":"378123BLE"
        }
        ```  

        ### Refreshing Token
        Required Keys 
          - grant_type (only one valid value - "refresh_token")
          - refresh_token
          - access_token

        Example 
        ```json
        {
          "grant_type":"refresh_token",
          "refresh_token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOiJmMjkwZTJlYjBiZDRmNjhiZDRkM2RlZjNkMWM0MDEiLCJzaWQiOiIzOWFkM2U5OC1hMmU0LTQxYzQtOGMzNi03ZjQxNDFhYzYxN2IiLCJ1dCI6MiwidHQiOjMsImV4cCI6MTU5MDI3ODExMSwiaWF0IjoxNTg5NDE0MTExfQ.iY6uJu2QgNP0uHoGdmEZm9wsztB1SUrCHrisxoXoxolol",
          "access_token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOiJmMjkwZTJlYjBiZDRmNjhiZDRkM2RlZjNkMWM0MDEiLCJzaWQiOiI3NmY4ODg4MS04YmU5LTRiM2UtOWJkNi1jOTJjZGQ4OTNlMmEiLCJ1dCI6MiwidHQiOjEsImV4cCI6MTU4OTg0NjExMSwiaWF0IjoxNTg5NDE0MTExfQ.xboryHuVn2zz-gSZ_JcD7-j_eBmJU1SMHkiDl9j8bak"
        }
        ```
      operationId: AuthDevice
      parameters:
        - description: System Key that identifies the system the device is a part of.
          in: path
          name: SystemKey
          required: true
          type: string
        - description: Device credentials.
          in: body
          name: body
          required: true
          schema:
            $ref: "#/definitions/deviceAuthdata"
      produces:
        - application/json
      responses:
        "200":
          description: Device authenticated.
          schema:
            $ref: "#/definitions/deviceAuth"
        "400":
          description: Bad Request.
          schema:
            $ref: "#/definitions/ErrorResp"
        "401":
          description: Unauthorized.
          schema:
            $ref: "#/definitions/ErrorResp"
        "500":
          description: Server error.
          schema:
            $ref: "#/definitions/ErrorResp"
      summary: DEVICES - Authenticate device
      tags:
        - Device
  "/api/v/2/devices/{systemKey}/{name}":
    post:
      description: Adds a device in the system
      operationId: AddDevice
      parameters:
        - description: Token obtained through user authentication.
          in: header
          name: ClearBlade-UserToken
          required: true
          type: string
        - description: System key that identifies the system the device is a part of.
          in: path
          name: systemKey
          required: true
          type: string
        - description: Name of device.
          in: path
          name: name
          required: true
          type: string
        - description: Add device info.
          in: body
          name: body
          required: true
          schema:
            $ref: "#/definitions/deviceAdd"
      produces:
        - application/json
      responses:
        "200":
          description: Device added successfully
          schema:
            $ref: "#/definitions/deviceUpdate"
        "400":
          description: Bad Request.
          schema:
            $ref: "#/definitions/ErrorResp"
        "401":
          description: Unauthorized.
        "500":
          description: Server error.
      summary: DEVICES - Adds a device
      tags:
        - Device
    put:
      description: Updates a device's state or custom attributes.
      operationId: UpdateDeviceInfo
      parameters:
        - description: Token obtained through user authentication.
          in: header
          name: ClearBlade-UserToken
          required: true
          type: string
        - description: System key that identifies the system the device is a part of.
          in: path
          name: systemKey
          required: true
          type: string
        - description: Name of device.
          in: path
          name: name
          required: true
          type: string
        - description: Updated device info.
          in: body
          name: body
          required: true
          schema:
            $ref: "#/definitions/deviceUserUpdate"
      produces:
        - application/json
      responses:
        "200":
          description: Device updated.
          schema:
            $ref: "#/definitions/deviceUpdate"
        "400":
          description: Bad Request.
          schema:
            $ref: "#/definitions/ErrorResp"
        "401":
          description: Unauthorized.
        "500":
          description: Server error.
      summary: DEVICES - Update info
      tags:
        - Device
  "/api/v/2/edges/{systemKey}":
    get:
      description: Returns all edge info that the current user is authorized to see.
      operationId: GetAllEdges
      parameters:
        - description: Token obtained through user authentication.
          in: header
          name: ClearBlade-UserToken
          required: true
          type: string
        - description: System Key that identifies the system that holds the edge.
          in: path
          name: systemKey
          required: true
          type: string
        - description: System Key that identifies the system you want the info about.
          in: query
          name: id
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: A list of the edges from the specified system.
        "400":
          description: Bad request.
      summary: EDGE - Fetch all edges
      tags:
        - Edge
  "/api/v/3/allcollections/{systemKey}":
    get:
      description: Returns all the collections in the specified system.
      operationId: GetCollections
      parameters:
        - description: Token obtained through user authentication.
          in: header
          name: ClearBlade-UserToken
          required: true
          type: string
        - description: System key that identifies the system the device is a part of.
          in: path
          name: systemKey
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: A list of collections in the specified system.
          schema:
            $ref: "#/definitions/allCollectionsSuccess"
      summary: DATA - Get collections
      tags:
        - Data
  "/api/v/3/code/codemeta/{systemKey}":
    get:
      description: Returns list of code services and its settings info .
      operationId: ReturnServiceSettings
      parameters:
        - description: Dev Token obtained through authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: System key that identifies the system the device is a part of.
          in: path
          name: systemKey
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: A list of code services and settings info.
          schema:
            $ref: "#/definitions/codeMeta"
        "400":
          description: Bad request.
        "401":
          description: Unauthorized.
        "500":
          description: Server error.
      summary: CODE - Returns code services and settings
      tags:
        - Code
  "/api/v/3/code/{systemKey}/timer/{name}":
    delete:
      description: Deletes the specified trigger handler.
      operationId: DeleteTimerByName
      parameters:
        - description: Token obtained through user authentication.
          in: header
          name: ClearBlade-UserToken
          required: true
          type: string
        - description: System Key that identifies the system the handler is in.
          in: path
          name: systemKey
          required: true
          type: string
        - description: Name of the timer you're deleting.
          in: path
          name: name
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: Deletes timer from system.
        "400":
          description: Bad request.
          schema:
            $ref: "#/definitions/ErrorResp"
      summary: HANDLERS - Delete trigger handler
      tags:
        - Handlers
    get:
      description: Returns the specified timer handler information.
      operationId: GetTimerByName
      parameters:
        - description: Token obtained through user authentication.
          in: header
          name: ClearBlade-UserToken
          required: true
          type: string
        - description: System Key that identifies the system the handler is in.
          in: path
          name: systemKey
          required: true
          type: string
        - description: Name of the timer handler you want.
          in: path
          name: name
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: Returns list of timers with their information.
          schema:
            $ref: "#/definitions/timerList"
        "400":
          description: Bad request.
          schema:
            $ref: "#/definitions/ErrorResp"
      summary: HANDLERS - Get timer handler
      tags:
        - Handlers
    post:
      description: Creates new timer handler.
      operationId: CreateNewTimer
      parameters:
        - description: Token obtained through user authentication.
          in: header
          name: ClearBlade-UserToken
          required: true
          type: string
        - description: System Key that identifies the system the handler is in.
          in: path
          name: systemKey
          required: true
          type: string
        - description: Name of the timer handler you're creating.
          in: path
          name: name
          required: true
          type: string
        - description: New timer information.
          in: body
          name: body
          required: true
          schema:
            $ref: "#/definitions/timerdata"
      produces:
        - application/json
      responses:
        "200":
          description: Creates a new timer in the system.
          schema:
            $ref: "#/definitions/timerList"
        "400":
          description: Bad request.
          schema:
            $ref: "#/definitions/ErrorResp"
        "401":
          description: Unauthorized. User cannot access resource.
          schema:
            $ref: "#/definitions/ErrorResp"
      summary: HANDLERS - Create timer handler
      tags:
        - Handlers
    put:
      description: Updates the specified timer handler.
      operationId: UpdateTimerByName
      parameters:
        - description: Token obtained through user authentication.
          in: header
          name: ClearBlade-UserToken
          required: true
          type: string
        - description: System Key that identifies the system the handler is in.
          in: path
          name: systemKey
          required: true
          type: string
        - description: Name of the timer handler you're updating.
          in: path
          name: name
          required: true
          type: string
        - description: Updated timer handler information.
          in: body
          name: body
          required: true
          schema:
            $ref: "#/definitions/timerdata"
      produces:
        - application/json
      responses:
        "200":
          description: Updates specified timer.
          schema:
            $ref: "#/definitions/timerList"
        "400":
          description: Bad request.
        "401":
          description: Unauthorized. User cannot access resource.
          schema:
            $ref: "#/definitions/ErrorResp"
      summary: HANDLERS - Update timer handler
      tags:
        - Handlers
  "/api/v/3/code/{systemKey}/timers":
    get:
      description: Returns a list of timer handlers.
      operationId: GetAllTimers
      parameters:
        - description: Token obtained through user authentication.
          in: header
          name: ClearBlade-UserToken
          required: true
          type: string
        - description: System Key that identifies the system the handler is in.
          in: path
          name: systemKey
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: No response was specified.
          schema:
            $ref: "#/definitions/timerArray"
        "400":
          description: Bad request.
          schema:
            $ref: "#/definitions/ErrorResp"
      summary: HANDLERS - Get timer handlers
      tags:
        - Handlers
  "/api/v/3/code/{systemKey}/trigger/{name}":
    delete:
      description: Deletes the specified trigger handler.
      operationId: DeleteTriggerByName
      parameters:
        - description: Token obtained through user authentication.
          in: header
          name: ClearBlade-UserToken
          required: true
          type: string
        - description: System Key that identifies the system the handler is in.
          in: path
          name: systemKey
          required: true
          type: string
        - description: Name of the trigger handler you're deleting.
          in: path
          name: name
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: No response was specified.
        "400":
          description: Bad request.
      summary: HANDLERS - Delete trigger handler
      tags:
        - Handlers
    get:
      description: Returns the specified trigger handler information.
      operationId: GetTriggerByName
      parameters:
        - description: Token obtained through user authentication.
          in: header
          name: ClearBlade-UserToken
          required: true
          type: string
        - description: System Key that identifies the system the handler is in.
          in: path
          name: systemKey
          required: true
          type: string
        - description: Name of the trigger handler you want.
          in: path
          name: name
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: Information about the trigger handler requested.
          schema:
            $ref: "#/definitions/triggerArray"
        "400":
          description: Bad request.
          schema:
            $ref: "#/definitions/ErrorResp"
      summary: HANDLERS - Get trigger handler
      tags:
        - Handlers
    post:
      description: Creates a new trigger handler.
      operationId: CreateNewTrigger
      parameters:
        - description: Token obtained through user authentication.
          in: header
          name: ClearBlade-UserToken
          required: true
          type: string
        - description: System Key that identifies the system the handler is in.
          in: path
          name: systemKey
          required: true
          type: string
        - description: Name of the trigger handler you're creating.
          in: path
          name: name
          required: true
          type: string
        - description: New trigger information.
          in: body
          name: body
          required: true
          schema:
            $ref: "#/definitions/triggerdata"
      produces:
        - application/json
      responses:
        "200":
          description: No response was specified.
          schema:
            $ref: "#/definitions/triggerArray"
        "400":
          description: Bad request.
          schema:
            $ref: "#/definitions/ErrorResp"
      summary: HANDLERS - Create trigger handler
      tags:
        - Handlers
    put:
      description: Updates the specified trigger handler.
      operationId: UpdateTriggerByName
      parameters:
        - description: Token obtained through user authentication.
          in: header
          name: ClearBlade-UserToken
          required: true
          type: string
        - description: System Key that identifies the system the handler is in.
          in: path
          name: systemKey
          required: true
          type: string
        - description: Name of the trigger handler you're updating.
          in: path
          name: name
          required: true
          type: string
        - description: Updated trigger handler information.
          in: body
          name: body
          required: true
          schema:
            $ref: "#/definitions/triggerdata"
      produces:
        - application/json
      responses:
        "200":
          description: No response was specified.
          schema:
            $ref: "#/definitions/triggerArray"
        "400":
          description: Bad request.
          schema:
            $ref: "#/definitions/ErrorResp"
      summary: HANDLERS - Update trigger handler
      tags:
        - Handlers
  "/api/v/3/code/{systemKey}/triggers":
    get:
      description: Returns list of trigger handlers.
      operationId: GetAllTrigger
      parameters:
        - description: Token obtained through user authentication.
          in: header
          name: ClearBlade-UserToken
          required: true
          type: string
        - description: System Key that identifies the system the handlers are in.
          in: path
          name: systemKey
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: A list of trigger handlers.
          schema:
            $ref: "#/definitions/triggerArray"
        "400":
          description: Bad request.
          schema:
            $ref: "#/definitions/ErrorResp"
      summary: HANDLERS - Get trigger handlers
      tags:
        - Handlers
  /api/v/3/collectionmanagement:
    delete:
      description: Deletes an existing collection in the specified system.
      operationId: DeleteCollection
      parameters:
        - description: Token obtained through user authentication.
          in: header
          name: ClearBlade-UserToken
          required: true
          type: string
        - description: System Key that identifies the system you're adding the user to.
          in: header
          name: ClearBlade-SystemKey
          required: true
          type: string
        - description: ID that identifies the collection to be deleted.
          in: query
          name: id
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: Collection was successfully deleted. There is no response
      summary: DATA - Delete collection
      tags:
        - Data
    post:
      description: Creates a new collection or database connection in the specified system.
      operationId: CreateCollection
      parameters:
        - description: Token obtained through user authentication.
          in: header
          name: ClearBlade-UserToken
          required: true
          type: string
        - description: System Key that identifies the system you're adding the user to.
          in: header
          name: ClearBlade-SystemKey
          required: true
          type: string
        - description: Configuration info for new collection.
          in: body
          name: Collection info
          required: true
          schema:
            $ref: "#/definitions/newcollection"
      produces:
        - application/json
      responses:
        "200":
          description: Collection was successfully created.
          schema:
            $ref: "#/definitions/newcollection"
        "400":
          description: Invalid status value
          schema:
            $ref: "#/definitions/ErrorResp"
      summary: DATA - Create collection
      tags:
        - Data
    put:
      description: Creates or deletes a column within an existing collection, or updates an existing database connection in the specified system.
      operationId: UpdateCollection
      parameters:
        - description: Token obtained through user authentication.
          in: header
          name: ClearBlade-UserToken
          required: true
          type: string
        - description: System Key that identifies the system you're adding the user to.
          in: header
          name: ClearBlade-SystemKey
          required: true
          type: string
        - description: Updated collection information.
          in: body
          name: body
          required: false
          schema:
            $ref: "#/definitions/updateCollection"
      produces:
        - application/json
      responses:
        "200":
          description: Collection was successfully updated. There is no response
      summary: DATA - Update collection
      tags:
        - Data
  "/api/v/3/devices/{systemKey}/columns":
    get:
      description: Returns the columns and their data type for the device table in a system.
      operationId: GetDeviceTableSchema
      parameters:
        - description: Token obtained through user authentication.
          in: header
          name: ClearBlade-UserToken
          required: true
          type: string
        - description: System Key that identifies the system that holds the devices.
          in: path
          name: systemKey
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: Returns list of columns and data types for devices table in a system
          schema:
            $ref: "#/definitions/columnSuccess"
        "400":
          description: Bad request.
          schema:
            $ref: "#/definitions/ErrorResp"
      summary: EDGE - Get device columns
      tags:
        - Device
  "/api/v/3/devices/{systemKey}/count":
    get:
      description: Returns the total number of devices in a system.
      operationId: GetDeviceCount
      parameters:
        - description: Token obtained through user authentication.
          in: header
          name: ClearBlade-UserToken
          required: true
          type: string
        - description: System Key that identifies the system that holds the devices.
          in: path
          name: systemKey
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: Returns object containing count of devices in a system
          schema:
            $ref: "#/definitions/count"
        "400":
          description: Bad request.
          schema:
            $ref: "#/definitions/ErrorResp"
      summary: DEVICES - Get count
      tags:
        - Device
  "/api/v/3/edges/{systemKey}/columns":
    get:
      description: Returns the columns and their data type for the edge table in a system.
      operationId: GetEdgeTableSchema
      parameters:
        - description: Token obtained through user authentication.
          in: header
          name: ClearBlade-UserToken
          required: true
          type: string
        - description: System Key that identifies the system that holds the edges.
          in: path
          name: systemKey
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: Returns list of columns and their data types of edges table in a system.
        "400":
          description: Bad request.
      summary: EDGE - Get columns
      tags:
        - Edge
  "/api/v/3/edges/{systemKey}/count":
    get:
      description: Returns the total number of edges in a system.
      operationId: GetEdgeCount
      parameters:
        - description: Token obtained through user authentication.
          in: header
          name: ClearBlade-UserToken
          required: true
          type: string
        - description: System Key that identifies the system that holds the edges.
          in: path
          name: systemKey
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: Returns object containing count of edges in a system
        "400":
          description: Bad request.
      summary: EDGE - Get count
      tags:
        - Edge
  "/api/v/3/edges/{systemKey}/{name}":
    delete:
      description: Deletes the specified edge from its system.
      operationId: DeleteEdgeByName
      parameters:
        - description: Developer Token obtained through admin authentication.
          in: header
          name: ClearBlade-UserToken
          required: true
          type: string
        - description: System key that identifies the system the edge currently belongs to.
          in: path
          name: systemKey
          required: true
          type: string
        - description: Name of the edge you're deleting.
          in: path
          name: name
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: No response was specified.
        "400":
          description: Bad request.
      summary: Edge - Delete edge
      tags:
        - Edge
    get:
      description: Returns the data from the specified edge.
      operationId: GetEdgeDataByName
      parameters:
        - description: Token obtained through user authentication.
          in: header
          name: ClearBlade-UserToken
          required: true
          type: string
        - description: System Key that identifies the system that holds the collection.
          in: path
          name: systemKey
          required: true
          type: string
        - description: Name of the edge.
          in: path
          name: name
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: Information about the specified edge.
        "400":
          description: Bad request.
      summary: Edge(name) - Get edge info
      tags:
        - Edge
    post:
      description: Creates a new edge in the specified system.
      operationId: CreateNewEdge
      parameters:
        - description: Developer Token obtained through admin authentication.
          in: header
          name: ClearBlade-UserToken
          required: true
          type: string
        - description: System key that identifies the system the new edge will belong to.
          in: path
          name: systemKey
          required: true
          type: string
        - description: Name of the edge you're creating.
          in: path
          name: name
          required: true
          type: string
        - description: New edge information.
          in: body
          name: body
          required: true
          schema:
            $ref: "#/definitions/edgeNew"
      produces:
        - application/json
      responses:
        "200":
          description: No response was specified.
        "400":
          description: Bad request.
      summary: EDGE - Create edge
      tags:
        - Edge
    put:
      description: Updates the specified edge's information.
      operationId: UpdateEdgeByName
      parameters:
        - description: Developer Token obtained through admin authentication.
          in: header
          name: ClearBlade-UserToken
          required: true
          type: string
        - description: System key that identifies the system the edge you're updating belongs to.
          in: path
          name: systemKey
          required: true
          type: string
        - description: Name of the edge you're updating.
          in: path
          name: name
          required: true
          type: string
        - description: Updated edge information.
          in: body
          name: Edge
          required: true
          schema:
            $ref: "#/definitions/edgeUpdate"
      produces:
        - application/json
      responses:
        "200":
          description: No response was specified.
        "400":
          description: Bad request.
      summary: EDGE - Update edge
      tags:
        - Edge
  "/api/v/3/{systemKey}/deployments":
    get:
      description: |
        ## Description:
        Gets all deployment names and descriptions for a system

        ### Query:
        ```json
        {"PAGESIZE":int,"PAGENUM":int,"FILTERS":[[{"EQ":[{"valueType":"value"}]}]],"SORT":[{"DESC":"value"}]}
        ```

        ### Example:

        ```json
         {"PAGESIZE":0,"PAGENUM":0,"SORT":[{"DESC":"name"}]}
      operationId: GetAllDeployments
      parameters:
        - description: User Token obtained through user authentication.
          in: header
          name: ClearBlade-UserToken
          required: true
          type: string
        - description: Tags to filter deployments by. See the query model above for an example.
          in: query
          name: query
          required: false
          type: string
        - description: System Key that identifies the system that holds the deployment.
          in: path
          name: systemKey
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: Deployments retrieved successfully
          schema:
            $ref: "#/definitions/deploymentSuccess"
        "500":
          description: Server error.
      summary: DEPLOYMENTS - Gets all deployment names and descriptions for a system
      tags:
        - Deployments
    post:
      description: Creates one deployment for system
      operationId: CreateDeployment
      parameters:
        - description: User Token obtained through user authentication.
          in: header
          name: ClearBlade-UserToken
          required: true
          type: string
        - description: System Key that identifies the system that holds the deployment.
          in: path
          name: systemKey
          required: true
          type: string
        - description: Information regarding deployment
          in: body
          name: body
          required: true
          schema:
            $ref: "#/definitions/createDeployment"
      produces:
        - application/json
      responses:
        "200":
          description: Deployment created successfully
        "500":
          description: Server error.
      summary: DEPLOYMENTS - Creates a deployment
      tags:
        - Deployments
  "/api/v/3/{systemKey}/deployments/{deploymentName}":
    delete:
      description: Deletes a deployment based on the name
      operationId: DeleteDeployment
      parameters:
        - description: User Token obtained through user authentication.
          in: header
          name: ClearBlade-UserToken
          required: true
          type: string
        - description: System Key that identifies the system that holds the deployment.
          in: path
          name: systemKey
          required: true
          type: string
        - description: Name of the deployment to delete
          in: path
          name: deploymentName
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: Deployment successfully deleted.
        "500":
          description: Server error.
      summary: DEPLOYMENT - Delete a deployment
      tags:
        - Deployments
    get:
      operationId: GetADeployment
      parameters:
        - description: User Token obtained through user authentication.
          in: header
          name: clearblade-usertoken
          required: true
          type: string
        - description: System Key that identifies the system that holds the deployment.
          in: path
          name: systemKey
          required: true
          type: string
        - description: Name of the deployment to retrieve
          in: path
          name: deploymentName
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: Retrieved deployment successfully
        "500":
          description: Server error.
      summary: DEPLOYMENTS - Gets a deloyment for a system
      tags:
        - Deployments
    put:
      description: Updates a deployment.
      operationId: UpdateDeployment
      parameters:
        - description: User Token obtained through user authentication.
          in: header
          name: ClearBlade-UserToken
          required: true
          type: string
        - description: System Key that identifies the system that holds the deployment.
          in: path
          name: systemKey
          required: true
          type: string
        - description: Name of the deployment to update
          in: path
          name: deploymentName
          required: true
          type: string
        - description: Updated deployment information.
          in: body
          name: body
          required: true
          schema:
            $ref: "#/definitions/updateDeployment"
      produces:
        - application/json
      responses:
        "200":
          description: Deployment successfully updated.
        "500":
          description: Server error.
      summary: DEPLOYMENT - Update deployment
      tags:
        - Deployments
  "/api/v/4/bucket_sets/{systemKey}":
    get:
      description: Returns a list of metadata for buckets in system
      operationId: GetBucketsData
      parameters:
        - description: Developer Token obtained through admin authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: System Key that identifies the system.
          in: path
          name: systemKey
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: Returns all buckets metadata
          schema:
            $ref: "#/definitions/allBuckets"
      summary: FILES  - Returns a list of metadata for buckets in system
      tags:
        - Files
  "/api/v/4/bucket_sets/{systemKey}/{deploymentName}":
    get:
      description: Returns metadata for specified bucket
      operationId: GetSingleBucketData
      parameters:
        - description: Developer Token obtained through admin authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: System Key that identifies the system.
          in: path
          name: systemKey
          required: true
          type: string
        - description: Name of the deployment to retrieve
          in: path
          name: deploymentName
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: Returns a bucket's metadata
          schema:
            $ref: "#/definitions/buckets"
      summary: FILES  - Returns metadata for specified bucket
      tags:
        - Files
  "/api/v/4/bucket_sets/{systemKey}/{deploymentName}/file/copy":
    post:
      description: Copies a file to a new location within buckets
      operationId: CopyBucketFile
      parameters:
        - description: Developer Token obtained through admin authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: If either `from_box` or `to_box` is empty, then the corresponding path is considered a full path to the local file system. Both `from_box` and `to_box` cannot be simultaneously empty.
          in: body
          name: Body
          schema:
            $ref: "#/definitions/copyFile"
        - description: System Key that identifies the system.
          in: path
          name: systemKey
          required: true
          type: string
        - description: Name of the deployment to retrieve
          in: path
          name: deploymentName
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: File is copied. Returns empty.
      summary: FILES  - Copies a file to a new location within buckets
      tags:
        - Files
  "/api/v/4/bucket_sets/{systemKey}/{deploymentName}/file/create":
    post:
      description: Creates a new file in bucket
      operationId: CreateBucketFile
      parameters:
        - description: Developer Token obtained through admin authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - in: body
          name: Body
          schema:
            $ref: "#/definitions/createBox"
        - description: System Key that identifies the system.
          in: path
          name: systemKey
          required: true
          type: string
        - description: Name of the deployment to retrieve
          in: path
          name: deploymentName
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: Returns metadata from the new box file
          schema:
            $ref: "#/definitions/box_data"
      summary: FILES  - Creates a new file in a bucket
      tags:
        - Files
  "/api/v/4/bucket_sets/{systemKey}/{deploymentName}/file/delete":
    post:
      description: Deletes a file from the bucket.
      operationId: DeleteBucketFile
      parameters:
        - description: Developer Token obtained through admin authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: If `box` is empty, then `path` is treated as a full path in the local file system.
          in: body
          name: Body
          schema:
            $ref: "#/definitions/deleteFile"
        - description: System Key that identifies the system.
          in: path
          name: systemKey
          required: true
          type: string
        - description: Name of the deployment to retrieve
          in: path
          name: deploymentName
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: File is deleted. Returns empty.
      summary: FILES  - Deletes a file from the bucket.
      tags:
        - Files
  "/api/v/4/bucket_sets/{systemKey}/{deploymentName}/file/meta":
    get:
      description: |
        ## Description:
        Returns metadata of a specific file in a specific box. 
        boxName defaults to "inbox"

        ### Query Structure:
        ```json
        box={boxName}
        path={relativePath}
        ```   
        ### boxName Options

        * inbox
        * outbox
        * sandbox

        If `box==""`, then all files from all three boxes (inbox, outbox, sandbox)
        will be returned.

        ### Example:

        ```json
        box=inbox
        path=/relative/path/to/file
        ```
      operationId: GetBoxFilesMeta
      parameters:
        - description: Developer Token obtained through admin authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: one of inbox, outbox or sandbox, defaults to 'inbox' if empty.
          in: query
          name: box
          required: false
          type: string
        - description: Query object used to filter the items. See query model at in the description for example.
          in: query
          name: path
          required: false
          type: string
        - description: System Key that identifies the system.
          in: path
          name: systemKey
          required: true
          type: string
        - description: Name of the deployment to retrieve
          in: path
          name: deploymentName
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: Returns metadata from a box file
          schema:
            $ref: "#/definitions/box_data"
      summary: FILES  - Get a file's metadata in a box
      tags:
        - Files
  "/api/v/4/bucket_sets/{systemKey}/{deploymentName}/file/move":
    post:
      description: Moves a file to a new location within buckets.
      operationId: MoveBucketFile
      parameters:
        - description: Developer Token obtained through admin authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: If either `from_box` or `to_box` is empty, then the corresponding path is considered a full path to the local file system. Both `from_box` and `to_box` cannot be simultaneously empty.
          in: body
          name: Body
          schema:
            $ref: "#/definitions/copyFile"
        - description: System Key that identifies the system.
          in: path
          name: systemKey
          required: true
          type: string
        - description: Name of the deployment to retrieve
          in: path
          name: deploymentName
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: File is moved. Returns empty.
      summary: FILES  - Moves a file to a new location within buckets.
      tags:
        - Files
  "/api/v/4/bucket_sets/{systemKey}/{deploymentName}/files":
    get:
      description: |
        ## Description:
        Returns metadata of files in a specific box. 
        boxName defaults to "inbox"

        ### Query Structure:
        ```json
        box={boxName}
        ```   
        ### boxName Options

        * inbox
        * outbox
        * sandbox

        If `box==""`, then all files from all three boxes (inbox, outbox, sandbox)
        will be returned.

        ### Example:

        ```json
        box=inbox
        ```
      operationId: GetBoxFiles
      parameters:
        - description: Developer Token obtained through admin authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: Query object used to filter the items. See query model at in the description for example.
          in: query
          name: box
          required: false
          type: string
        - description: System Key that identifies the system.
          in: path
          name: systemKey
          required: true
          type: string
        - description: Name of the deployment to retrieve
          in: path
          name: deploymentName
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: Returns all metadata from box files
          schema:
            $ref: "#/definitions/box"
      summary: FILES  - Get all files metadata in a box
      tags:
        - Files
  "/api/v/4/data/{systemKey}/{collectionName}/index":
    delete:
      description: This deletes a non unique index from a column.
      operationId: DeleteNonUniqueIndex
      parameters:
        - description: Dev Token obtained through dev authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: System Key that identifies the system you're adding the user to.
          in: path
          name: systemKey
          required: true
          type: string
        - description: Name of the collection.
          in: path
          name: collectionName
          required: true
          type: string
        - description: <COLUMN TO INDEX>
          in: query
          name: columnName
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: Index was successfully deleted.
          schema:
            $ref: "#/definitions/SuccessResp"
      summary: DATA - Delete collection
      tags:
        - Data
    post:
      description: This creates a non-unique index on a column. This is useful for speeding up certain queries, but doesn't work with upsert. This call will fail if the index already exists.
      operationId: CreateNonUniqueIndex
      parameters:
        - description: Dev Token obtained through dev authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: System Key that identifies the system you're adding the user to.
          in: path
          name: systemKey
          required: true
          type: string
        - description: Name of the collection.
          in: path
          name: collectionName
          required: true
          type: string
        - description: <COLUMN TO INDEX>
          in: query
          name: columnName
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: Column is successfully indexed.
          schema:
            $ref: "#/definitions/SuccessResp"
        "400":
          description: Invalid status value
          schema:
            $ref: "#/definitions/ErrorResp"
      summary: DATA - Create collection
      tags:
        - Data
  "/api/v/4/data/{systemKey}/{collectionName}/listindexes":
    get:
      description: This returns all USER CREATED indexes/constraints for the collection.For safety, primary key indexes are not returned.
      operationId: GetIndexes
      parameters:
        - description: Dev Token obtained through authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: System key that identifies the system.
          in: path
          name: systemKey
          required: true
          type: string
        - description: Name of the collection.
          in: path
          name: collectionName
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: A list of external databases in the specified system.
          schema:
            $ref: "#/definitions/allIndexes"
        "400":
          description: Bad Request
          schema:
            $ref: "#/definitions/ErrorResp"
        "401":
          description: Unauthorized
      summary: DATA - Get list of indexes
      tags:
        - Data
  "/api/v/4/data/{systemKey}/{collectionName}/uniqueindex":
    delete:
      description: This deletes a unique index on a column.
      operationId: DeleteUniqueIndex
      parameters:
        - description: Dev Token obtained through dev authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: System Key that identifies the system you're adding the user to.
          in: path
          name: systemKey
          required: true
          type: string
        - description: Name of the collection.
          in: path
          name: collectionName
          required: true
          type: string
        - description: <COLUMN TO INDEX>
          in: query
          name: columnName
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: Unique Index was successfully deleted.
          schema:
            $ref: "#/definitions/SuccessResp"
        "400":
          description: Bad Request
          schema:
            $ref: "#/definitions/ErrorResp"
        "401":
          description: Unauthorized
      summary: DATA - Delete unique index
      tags:
        - Data
    post:
      description: This creates a unique index on a column. A user has to do this before you can use upsert with columnName as the conflictColumn. This call will fail if the index already exists.
      operationId: CreateUniqueIndex
      parameters:
        - description: Dev Token obtained through dev authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: System Key that identifies the system you're adding the user to.
          in: path
          name: systemKey
          required: true
          type: string
        - description: Name of the collection.
          in: path
          name: collectionName
          required: true
          type: string
        - description: <COLUMN TO INDEX>
          in: query
          name: columnName
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: Column is successfully indexed.
          schema:
            $ref: "#/definitions/SuccessResp"
        "400":
          description: Bad Request
          schema:
            $ref: "#/definitions/ErrorResp"
      summary: DATA - Create Unique Index
      tags:
        - Data
  "/api/v/4/data/{systemKey}/{collectionName}/upsert":
    put:
      description: This adds an insert (if the row does not exist) or an update (if the row exists)
      operationId: UpdateUpsert
      parameters:
        - description: Dev Token obtained through dev authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: System Key that identifies the system you're adding the user to.
          in: path
          name: systemKey
          required: true
          type: string
        - description: Name of the collection.
          in: path
          name: collectionName
          required: true
          type: string
        - description: A column in your table that has a unique constraint. `columnName` can be used.
          in: query
          name: conflictColumn
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: Upsert was successfully updated.
        "400":
          description: Invalid status value
          schema:
            $ref: "#/definitions/ErrorResp"
      summary: DATA - Update upsert values
      tags:
        - Data
  "/api/v/4/devices/{systemKey}/connectioncount":
    get:
      description: Returns the number of device connections.
      operationId: ConnectedDeviceCount
      parameters:
        - description: Token obtained through user authentication.
          in: header
          name: ClearBlade-UserToken
          required: true
          type: string
        - description: System Key that identifies the system that holds the devices.
          in: path
          name: systemKey
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: Returns list of connected devices
          schema:
            $ref: "#/definitions/connectedDeviceCount"
        "400":
          description: Bad request.
          schema:
            $ref: "#/definitions/ErrorResp"
      summary: DEVICES - Get total of connected devices
      tags:
        - Device
  "/api/v/4/devices/{systemKey}/connections":
    get:
      description: Returns the list of connected devices.
      operationId: GetConnectedDeviceList
      parameters:
        - description: Dev Token obtained through authentication.
          in: header
          name: ClearBlade-UserToken
          required: true
          type: string
        - description: System Key that identifies the system that holds the devices.
          in: path
          name: systemKey
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: Returns list of connected devices
          schema:
            $ref: "#/definitions/connectedDevice"
        "400":
          description: Bad request.
          schema:
            $ref: "#/definitions/ErrorResp"
      summary: DEVICES - Get connected device list
      tags:
        - Device
  "/api/v/4/devices/{systemKey}/connections/{name}":
    get:
      description: Returns the connection information of the device.
      operationId: GetConnectedDeviceInfo
      parameters:
        - description: Token obtained through user authentication.
          in: header
          name: ClearBlade-UserToken
          required: true
          type: string
        - description: System Key that identifies the system that holds the devices.
          in: path
          name: systemKey
          required: true
          type: string
        - description: Name of the connected device.
          in: path
          name: name
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: Returns list of connected devices
          schema:
            $ref: "#/definitions/connectedDeviceInfo"
        "400":
          description: Bad request.
          schema:
            $ref: "#/definitions/ErrorResp"
      summary: DEVICES - Get information for a connected device
      tags:
        - Device
  "/api/v/4/external-db/{systemKey}":
    get:
      description: Returns all the names and database types of the external database connections for that system. This is a developer only endpoint.
      operationId: GetAllExternalDB
      parameters:
        - description: Dev Token obtained through authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: System key that identifies the system.
          in: path
          name: systemKey
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: A list of external databases in the specified system.
          schema:
            $ref: "#/definitions/allDatabases"
        "400":
          description: Bad Request
          schema:
            $ref: "#/definitions/ErrorResp"
        "401":
          description: Unauthorized
      summary: DATABASES - Retrieves all external database connections
      tags:
        - Databases
    post:
      description: |
        ## Description:
        Creates an external database connections for that system. This is a developer only endpoint.

        ### List of database types supported:

        |Database Name|db_type|
        |-------------|-------|
        |MONGO|mongodb|
        |POSTGRES|postgres|
        |MYSQL|mysql|
        |MSSQL|mssql|
        |COUCHDB|couchdb|



        ### Database Credentials

        |Field|Type|Database|Description|Options|Default|
        |-----|----|-----|-------|-------|----|
        |user|string|All|The external database username|
        |password|string|All|The external database password|
        |address|string|All|The external database IP address|
        |port|string|All|The port used to connect to the external database||27017 (Mongo), 3306 (MySQL), 5432 (Postgres), 1433 (MSSQL)|
        |dbname|string|All|The name of the external database|
        |connection_type|string|Mongo|The external database DNS connection type|srv and standard|standard|
        |tls|boolean|Mongo and Postgres|Setting the tls to `true` allows for transport encryption. This field is optional|True and false|True (Mongo) False(Postgres)|
        |authMechanism|string|Mongo|Database authentication method. This field is optional|SCRAM-SHA-256, SCRAM-SHA-1, MONGODB-CR, PLAIN, GSSAPI, MONGODB-X509|SCRAM-SHA-1|
        |authSource|string|Mongo|Database authentication source. This field is optional||admin|
        |replicaSet|string|Mongo|Allows for use of Replication Methods such as `rs.reconfig()  `.This field is optional||empty string|
        |encryption|string|MSSQL|Setting the encryption to `true` allows for secure encryption|disable and true|
      operationId: CreateExternalDB
      parameters:
        - description: Dev Token obtained through authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: System Key that identifies the system.
          in: path
          name: systemKey
          required: true
          type: string
        - description: Credentials for external database connection.
          in: body
          name: body
          schema:
            $ref: "#/definitions/createDatabase"
      produces:
        - application/json
      responses:
        "200":
          description: Creates external database connection.
          schema:
            $ref: "#/definitions/SuccessResp"
        "400":
          description: Bad Request
          schema:
            $ref: "#/definitions/ErrorResp"
        "401":
          description: Unauthorized
        "500":
          description: Server error.
      summary: DATABASES - Create a external database connection
      tags:
        - Databases
  "/api/v/4/external-db/{systemKey}/{name}":
    delete:
      description: Deletes an existing external database connection in the specified system.This is a developer and user endpoint.
      operationId: DeleteExternalDB
      parameters:
        - description: User Token obtained through authentication.
          in: header
          name: ClearBlade-UserToken
          required: true
          type: string
        - description: System Key that identifies the system.
          in: path
          name: systemKey
          required: true
          type: string
        - description: Name of external database connection.
          in: path
          name: name
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: External Database connection was successfully deleted.
          schema:
            $ref: "#/definitions/SuccessResp"
        "400":
          description: Bad request.
          schema:
            $ref: "#/definitions/ErrorResp"
        "500":
          description: Server error.
      summary: DATABASES - Delete a external database connection
      tags:
        - Databases
    get:
      description: Returns the name and database type of a external database connection. This is a developer and user endpoint.
      operationId: GetExternalDB
      parameters:
        - description: User Token obtained through authentication.
          in: header
          name: ClearBlade-UserToken
          required: true
          type: string
        - description: System key that identifies the system.
          in: path
          name: systemKey
          required: true
          type: string
        - description: Name of external database connection.
          in: path
          name: name
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: Credentials for a specific external database connection. Refer to the 'credentials' table for each database in the endpoint above.
          schema:
            $ref: "#/definitions/externalDB"
        "400":
          description: Bad Request
          schema:
            $ref: "#/definitions/ErrorResp"
        "401":
          description: Unauthorized
        "500":
          description: Server error.
      summary: DATABASES - Retrieve a specific external database connection
      tags:
        - Databases
    put:
      description: Updates existing external database credentials in the specified system. This is a developer and user endpoint.
      operationId: UpdateDatabaseCredentials
      parameters:
        - description: User Token obtained through authentication.
          in: header
          name: ClearBlade-UserToken
          required: true
          type: string
        - description: System Key that identifies the system.
          in: path
          name: systemKey
          required: true
          type: string
        - description: Name of external database connection.
          in: path
          name: name
          required: true
          type: string
        - description: Updated external database credentials.
          in: body
          name: body
          schema:
            $ref: "#/definitions/credentials"
      produces:
        - application/json
      responses:
        "200":
          description: External database credentials was successfully updated.
          schema:
            $ref: "#/definitions/credentials"
        "400":
          description: Bad request.
          schema:
            $ref: "#/definitions/ErrorResp"
        "401":
          description: Unauthorized.
        "500":
          description: Internal Server Error.
      summary: DATABASES - Update external database credentials
      tags:
        - Databases
  "/api/v/4/external-db/{systemKey}/{name}/data":
    post:
      description: Perform an operation on the external database.This is a developer and user endpoint.
      operationId: PerformDBOperation
      parameters:
        - description: User Token obtained through authentication.
          in: header
          name: ClearBlade-UserToken
          required: true
          type: string
        - description: System Key that identifies the system.
          in: path
          name: systemKey
          required: true
          type: string
        - description: Name of external database connection.
          in: path
          name: name
          required: true
          type: string
        - description: List of operations to be performed. Refer to the operations that are supported on the ClearBlade Docs or Native Libraries.
          in: body
          name: body
          schema:
            $ref: "#/definitions/operationsDB"
      produces:
        - application/json
      responses:
        "200":
          description: Returns external database data objects.
          schema:
            $ref: "#/definitions/DBResp"
        "400":
          description: Bad Request
          schema:
            $ref: "#/definitions/ErrorResp"
        "401":
          description: Unauthorized
        "500":
          description: Server error.
      summary: DATABASES - Create a external database connection
      tags:
        - Databases
  "/api/v/4/message/{systemKey}/topics":
    get:
      description: |
        ## Description:
        Returns the list of topics.
        ### Query Structure:
        ```json
        {"PAGESIZE":int,"PAGENUM":int,"FILTERS":[[{"_REPLACE_WITH_OPERATOR_":[{"valueType":"value"}]}]], "SORT":[{"DESC":"value"}]}
        ```

         ### Example:

        ```json
        {"FILTERS":[[{"NEQ":[{"concurrency":0}]}]],"PAGESIZE": ,"PAGENUM":1}
        ```
      operationId: GetTopics
      parameters:
        - description: Dev Token obtained through authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: System Key that identifies the system the messages belong to.
          in: path
          name: systemKey
          required: true
          type: string
        - description: Query object used to filter the items. See query model in the description for example.
          in: query
          name: query
          required: false
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: Returns the list of topics and information.
          schema:
            $ref: "#/definitions/msgArray"
        "400":
          description: Bad request.
          schema:
            $ref: "#/definitions/ErrorResp"
      summary: MESSAGING - Gets list of topics
      tags:
        - Messaging
  "/api/v/4/message/{systemKey}/topics/count":
    get:
      description: Returns the number of topics.
      operationId: GetTopicCount
      parameters:
        - description: Dev Token obtained through authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: System Key that identifies the system the topics belong to.
          in: path
          name: systemKey
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: Returns the number of topics.
          schema:
            $ref: "#/definitions/count"
        "400":
          description: Bad request.
          schema:
            $ref: "#/definitions/ErrorResp"
      summary: MESSAGING - Gets number of topics
      tags:
        - Messaging
  /api/v/4/user/manage:
    put:
      description: Users can change the roles and passwords for other users in the system
      operationId: ChangeUserInfo
      parameters:
        - description: Token obtained through user authentication.
          in: header
          name: ClearBlade-UserToken
          required: true
          type: string
        - description: Roles to change for the user.
          in: body
          name: body
          required: true
          schema:
            $ref: "#/definitions/rolespass"
      produces:
        - application/json
      responses:
        "200":
          description: User's roles and passwords successfully changed.
        "400":
          description: Bad Request
        "500":
          description: Internal Server Error
      summary: USER - Users change roles and passwords for other users
      tags:
        - User
  "/api/v/4/webhook/execute/{systemKey}/{webhookName}":
    get:
      description: Executes the webhook of type Payload, authentication occurs over GET's query string
      operationId: PayloadWebhookQuery
      parameters:
        - description: System Key that identifies the system the messages belong to.
          in: path
          name: systemKey
          required: true
          type: string
        - description: Name that identifies the webhook
          in: path
          name: webhookName
          required: true
          type: string
        - description: User authentication and data pushed through webhook
          in: query
          name: token
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: Webhook executed.
      summary: WEBHOOKS - Executes query string payload webhook
      tags:
        - Webhooks
    post:
      description: Executes a webhook through a code service
      operationId: ExecuteWebhook
      parameters:
        - description: Token obtained through user authentication.
          in: header
          name: ClearBlade-UserToken
          required: true
          type: string
        - description: System Key that identifies the system the messages belong to.
          in: path
          name: systemKey
          required: true
          type: string
        - description: Name that identifies the webhook
          in: path
          name: webhookName
          required: true
          type: string
        - description: Message to publish.
          in: body
          name: body
          required: true
          schema:
            $ref: "#/definitions/executeWebhook"
      produces:
        - application/json
      responses:
        "200":
          description: Webhook executed
      summary: WEBHOOKS - Executing a webhook
      tags:
        - Webhooks
  "/api/v/4/{SystemKey}/adapters":
    get:
      description: Returns all device info that the current user is authorized to see.
      operationId: GetAdapters
      parameters:
        - description: System Key that identifies the system the adapter is a part of.
          in: path
          name: SystemKey
          required: true
          type: string
        - description: Dev Token obtained through authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: A list of adapters.
        "400":
          description: Bad request.
        "401":
          description: User cannot access resource
      summary: ADAPTERS - Get all adapters
      tags:
        - Adapter
    post:
      description: Adds an adapter to the system
      operationId: addAdapter
      parameters:
        - description: System Key that identifies the system the adapter is a part of.
          in: path
          name: SystemKey
          required: true
          type: string
        - description: Dev Token obtained through authentication..
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: Information to create an adapter.
          in: body
          name: body
          required: true
          schema:
            $ref: "#/definitions/addAdapter"
      produces:
        - application/json
      responses:
        "200":
          description: Dev authenticated.
        "400":
          description: Bad Request.
        "401":
          description: Unauthorized.
        "500":
          description: Server error.
      summary: ADAPTERS - Add an adapter
      tags:
        - Adapter
  "/api/v/4/{SystemKey}/adapters/{AdapterName}":
    delete:
      description: Deletes the adapter
      operationId: DeleteAdapter
      parameters:
        - description: System Key that identifies the system the device is a part of.
          in: path
          name: SystemKey
          required: true
          type: string
        - description: Developer Token obtained through authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: Identifies an adapter in the system.
          in: path
          name: AdapterName
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: No response or 'Unknown Response type' (it's successful)
        "400":
          description: Bad request.
      summary: ADAPTERS - Delete adapter
      tags:
        - Adapter
    put:
      description: Adds a command to the configuration section of the adapter.
      operationId: MapAdapterCommand
      parameters:
        - description: System Key that identifies the system the adapter is a part of.
          in: path
          name: SystemKey
          required: true
          type: string
        - description: Identifies an adapter in the system.
          in: path
          name: AdapterName
          required: true
          type: string
        - description: Dev Token obtained through authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: Updated adapter information.
          in: body
          name: body
          required: true
          schema:
            $ref: "#/definitions/MapAdapterCommand"
      produces:
        - application/json
      responses:
        "200":
          description: Command has been added.
        "400":
          description: Bad Request.
        "401":
          description: Unauthorized.
        "500":
          description: Server error.
      summary: ADAPTERS - Map Adapter command to execute a file
      tags:
        - Adapter
  "/api/v/4/{SystemKey}/adapters/{AdapterName}/control":
    put:
      description: Commands with files will send data to an edge
      operationId: AddEdgeCommand
      parameters:
        - description: System Key that identifies the system the adapter is a part of.
          in: path
          name: SystemKey
          required: true
          type: string
        - description: Identifies an adapter in the system.
          in: path
          name: AdapterName
          required: true
          type: string
        - description: Dev Token obtained through authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: Updated user information.
          in: body
          name: body
          required: true
          schema:
            $ref: "#/definitions/edgeCommand"
      produces:
        - application/json
      responses:
        "200":
          description: Edge command is working.
        "400":
          description: Bad Request.
        "401":
          description: Unauthorized.
        "500":
          description: Server error.
      summary: ADAPTERS - Send command to edge
      tags:
        - Adapter
  "/api/v/4/{SystemKey}/adapters/{AdapterName}/files":
    get:
      description: Lists configuration information for all versions of all adapter files
      operationId: AdapterConfig
      parameters:
        - description: Identifies an adapter in the system.
          in: path
          name: AdapterName
          required: true
          type: string
        - description: System Key that identifies the system the adapter is a part of.
          in: path
          name: SystemKey
          required: true
          type: string
        - description: Dev Token obtained through authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: Configuration page appears.
        "400":
          description: Bad request.
        "401":
          description: Unauthorized.
        "500":
          description: Internal Server error.
      summary: Gets list of configuration information for all adapter files
      tags:
        - Adapter
    post:
      description: Create a new file with content and configuration, or replace an existing file's content & configuration.
      operationId: updateFileInfo
      parameters:
        - description: System Key that identifies the system the adapter is a part of.
          in: path
          name: SystemKey
          required: true
          type: string
        - description: Identifies an adapter in the system.
          in: path
          name: AdapterName
          required: true
          type: string
        - description: Dev Token obtained through authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: Information about the file that was added.
          in: body
          name: body
          required: true
          schema:
            $ref: "#/definitions/AdapterFileConfig"
      produces:
        - application/json
      responses:
        "200":
          description: Dev authenticated.
        "400":
          description: Bad Request.
        "401":
          description: Unauthorized.
        "500":
          description: Server error.
      summary: ADAPTERS - Add or replace file content & configuration
      tags:
        - Adapter
  "/api/v/4/{SystemKey}/adapters/{AdapterName}/files/{fileName}":
    delete:
      description: Deletes the adapter file for a command
      operationId: DeleteFile
      parameters:
        - description: System Key that identifies the system the device is a part of.
          in: path
          name: SystemKey
          required: true
          type: string
        - description: Developer Token obtained through authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: Identifies an adapter in the system.
          in: path
          name: AdapterName
          required: true
          type: string
        - description: File Name identifies the file in the adapter.
          in: path
          name: fileName
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: No response or ‘Unknown Response type’ (it’s successful)
        "400":
          description: Bad request.
        "500":
          description: Internal Server Error
      summary: ADAPTERS - Delete adapter files
      tags:
        - Adapter
    get:
      description: Downloads file from command in adapter to computer.
      operationId: FileDownload
      parameters:
        - description: Identifies an adapter in the system.
          in: path
          name: AdapterName
          required: true
          type: string
        - description: System Key that identifies the system the adapter is a part of.
          in: path
          name: SystemKey
          required: true
          type: string
        - description: File Name identifies the file in the adapter.
          in: path
          name: fileName
          required: true
          type: string
        - description: Dev Token obtained through authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: File is downloaded unto computer.
        "400":
          description: Bad request.
      summary: ADAPTERS - Download file from adapter
      tags:
        - Adapter
    put:
      description: Update the content of the existing file
      operationId: updateExistingFileContent
      parameters:
        - description: System Key that identifies the system the adapter is a part of.
          in: path
          name: SystemKey
          required: true
          type: string
        - description: Identifies an adapter in the system.
          in: path
          name: AdapterName
          required: true
          type: string
        - description: File Name identifies the file in the adapter.
          in: path
          name: fileName
          required: true
          type: string
        - description: Dev Token obtained through authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: Information about the file that was added.
          in: body
          name: body
          required: true
          schema:
            properties:
              file:
                description: base64 encoded string as file content to overwrite the existing content
                example: IyEvYmluL2Jhc2gKZWNobyAiaGVsbG8gd29ybGQi
                type: string
            required:
              - file
      produces:
        - application/json
      responses:
        "200":
          description: Returns the config and content of the file updated.
        "400":
          description: Bad Request.
        "401":
          description: Unauthorized.
        "500":
          description: Server error.
      summary: ADAPTERS - Update Existing File's content
      tags:
        - Adapter
  "/api/v/4/{systemKey}/code/failed":
    get:
      description: Returns list of failed code services.
      operationId: GetFailedServiceQuery
      parameters:
        - description: Dev Token obtained through authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: System key that identifies the system the device is a part of.
          in: path
          name: systemKey
          required: true
          type: string
        - description: Uses query to limit scope of list of failed services. Check FailQuery Model at the bottom of this page.
          in: query
          name: query
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: A list of filters for failed services.
        "400":
          description: Bad request.
        "401":
          description: Unauthorized.
        "500":
          description: Server error.
      summary: CODE - Get all failed services using Query
      tags:
        - Code
  /codeadmin/failed:
    get:
      description: Returns list of failed code services for all systems the current developer is authorized to see.
      operationId: GetFailedServices
      parameters:
        - description: Developer Token obtained through admin authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: List of failed services.
      summary: DEVELOPER - Get all failed services
      tags:
        - Developer
  "/codeadmin/failed/{systemKey}":
    delete:
      description: Deletes the specified failed service run from the list of failed service runs. Does not delete the service.
      operationId: DeleteFailedService
      parameters:
        - description: Developer Token obtained through admin authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: System Key that identifies the system with the failed services.
          in: path
          name: systemKey
          required: true
          type: string
        - description: Unique id of failed code service run you're deleting.
          in: body
          name: id
          required: false
          schema:
            type: string
      produces:
        - application/json
      responses:
        "200":
          description: Run was successfully deleted from the list of failed runs.
      summary: DEVELOPER - Delete failed service run
      tags:
        - Developer
    get:
      description: Returns list of failed code services for the specified system.
      operationId: GetSystemFailedServices
      parameters:
        - description: Developer Token obtained through admin authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: System Key that identifies the system with the failed services.
          in: path
          name: systemKey
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: List of failed services.
      summary: DEVELOPER - Get system's failed services
      tags:
        - Developer
    post:
      description: Retries one failed service in the specified system.
      operationId: RetryFailedService
      parameters:
        - description: Developer Token obtained through admin authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: System Key that identifies the system with the failed services.
          in: path
          name: systemKey
          required: true
          type: string
        - description: Unique id of the failed code service you're retrying.
          in: body
          name: id
          required: false
          schema:
            type: string
      produces:
        - application/json
      responses:
        "200":
          description: Code service was successfully executed.
      summary: DEVELOPER - Retry failed service
      tags:
        - Developer
  "/codeadmin/v/2/history/library/{systemKey}/{libName}":
    get:
      description: Returns all previous versions of a library.
      operationId: LibraryHistory
      parameters:
        - description: Developer Token obtained through admin authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: System Key that identifies the system that holds the library.
          in: path
          name: systemKey
          required: true
          type: string
        - description: Library's name.
          in: path
          name: libName
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: History of the specified library.
        "500":
          description: Server error.
      summary: DEVELOPER - Get library history
      tags:
        - Developer
  "/codeadmin/v/2/history/library/{systemKey}/{libName}/{libVersion}":
    get:
      description: Gets an old version of a library.
      operationId: GetOldLibraryVersion
      parameters:
        - description: Developer Token obtained through admin authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: System Key that identifies the system that holds the library.
          in: path
          name: systemKey
          required: true
          type: string
        - description: Library's name.
          in: path
          name: libName
          required: true
          type: string
        - description: Library's version.
          in: path
          name: libVersion
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: The old version of the specified library.
        "500":
          description: Server error.
      summary: DEVELOPER - Get old library version
      tags:
        - Developer
  "/codeadmin/v/2/library/{systemKey}":
    get:
      description: Returns all available libraries in the specified system along with their meta information.
      operationId: GetLibraries
      parameters:
        - description: Developer Token obtained through admin authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: System Key that identifies the system that holds the libraries.
          in: path
          name: systemKey
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: A list of available libraries and some info about them.
        "500":
          description: Server error.
      summary: DEVELOPER - Get all libraries
      tags:
        - Developer
  "/codeadmin/v/2/library/{systemKey}/{libName}":
    delete:
      description: Deletes a local library from the specified system.
      operationId: DeleteLibrary
      parameters:
        - description: Developer Token obtained through admin authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: System Key that identifies the system that holds the library.
          in: path
          name: systemKey
          required: true
          type: string
        - description: Library's name.
          in: path
          name: libName
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: Library was successfully deleted.
        "500":
          description: Server error.
      summary: DEVELOPER - Delete library
      tags:
        - Developer
    get:
      description: Returns the specified library and its meta information.
      operationId: GetLibrary
      parameters:
        - description: Developer Token obtained through admin authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: System Key that identifies the system that holds the library.
          in: path
          name: systemKey
          required: true
          type: string
        - description: Library's name.
          in: path
          name: libName
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: The specified library and its metadata.
        "500":
          description: Server error.
      summary: DEVELOPER - Get library
      tags:
        - Developer
    post:
      description: Creates a local library in the specified system.
      operationId: CreateLibrary
      parameters:
        - description: Developer Token obtained through admin authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: System Key that identifies the system that holds the library.
          in: path
          name: systemKey
          required: true
          type: string
        - description: Library's name.
          in: path
          name: libName
          required: true
          type: string
        - description: New library information and code.
          in: body
          name: body
          required: true
          schema:
            $ref: "#/definitions/libdata"
      produces:
        - application/json
      responses:
        "200":
          description: Library successfully created.
        "500":
          description: Server error.
      summary: DEVELOPER - Create library
      tags:
        - Developer
    put:
      description: Updates local library.
      operationId: UpdateLibrary
      parameters:
        - description: Developer Token obtained through admin authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: System Key that identifies the system that holds the library.
          in: path
          name: systemKey
          required: true
          type: string
        - description: Library's name.
          in: path
          name: libName
          required: true
          type: string
        - description: Updated library information and code.
          in: body
          name: body
          required: true
          schema:
            $ref: "#/definitions/updatedata"
      produces:
        - application/json
      responses:
        "200":
          description: Library successfully updated.
        "500":
          description: Server error.
      summary: DEVELOPER - Update library
      tags:
        - Developer
  "/codeadmin/v/2/logs/{systemKey}/{serviceName}":
    get:
      description: Returns log list for the code service
      operationId: GetLogs
      parameters:
        - description: Developer Token obtained through admin authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: System Key that identifies the system with the failed services.
          in: path
          name: systemKey
          required: true
          type: string
        - description: Code service's name.
          in: path
          name: serviceName
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: Returns Log history.
        "500":
          description: Server error.
      summary: DEVELOPER - Get services logs
      tags:
        - Developer
  "/codeadmin/v/2/{systemKey}/{serviceName}":
    delete:
      description: Deletes a local library from the specified system.
      operationId: DeleteService
      parameters:
        - description: Developer Token obtained through admin authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: System Key that identifies the system that holds the library.
          in: path
          name: systemKey
          required: true
          type: string
        - description: Code service's name.
          in: path
          name: serviceName
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: Library was successfully deleted.
        "500":
          description: Server error.
      summary: DEVELOPER - Delete code service
      tags:
        - Developer
    post:
      description: Adds code service to the system.
      operationId: AddService
      parameters:
        - description: Developer Token obtained through admin authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: System Key that identifies the system that holds the library.
          in: path
          name: systemKey
          required: true
          type: string
        - description: Code service's name.
          in: path
          name: serviceName
          required: true
          type: string
        - description: Code service information.
          in: body
          name: body
          required: true
          schema:
            $ref: "#/definitions/addservice"
      produces:
        - application/json
      responses:
        "200":
          description: Code service successfully added.
        "500":
          description: Server error.
      summary: DEVELOPER - Add code service
      tags:
        - Developer
    put:
      description: Updates the information and data in the code service.
      operationId: UpdateService
      parameters:
        - description: Developer Token obtained through admin authentication.
          in: header
          name: ClearBlade-DevToken
          required: true
          type: string
        - description: System key that identifies the system the code service belongs to.
          in: path
          name: systemKey
          required: true
          type: string
        - description: Code service's name.
          in: path
          name: serviceName
          required: true
          type: string
        - description: list of resources to add or remove to the template for an edge.
          in: body
          name: payload
          required: false
          schema:
            $ref: "#/definitions/serviceUpdate"
      produces:
        - application/json
      responses:
        "200":
          description: No response was specified
        "400":
          description: Bad request.
        "500":
          description: Internal Server Error
      summary: DEVELOPER - Update code service
      tags:
        - Developer
definitions:
  2FAinfo:
    description: 2FA method information
    properties:
      phone:
        example: "+15120000000"
        type: string
      two_factor_enabled:
        example: true
        type: boolean
      two_factor_method:
        example: sms
        type: string
  AdapterFileConfig:
    description: Adapter file content and config, to associate this file with a command, use MapAdapterCommand endpoint
    properties:
      adapter_name:
        description: The adapter the file is a part of.
        type: string
      file:
        description: The base64 encoded file content.
        example: IyEvYmluL2Jhc2gKbWtkaXIgU2hvd1RpbWVBZGFwdGVyCgptdiBzdGFydC5zaCBTaG93VGltZUFkYXB0ZXIKbXYgc3RvcC5zaCBTaG93VGltZUFkYXB0ZXIKbXYgc3RhdHVzLnNoIFNob3dUaW1lQWRhcHRlcgptdiBkZXBsb3kuc2ggU2hvd1RpbWVBZGFwdGVyCm12IHVuZGVwbG95LnNoIFNob3dUaW1lQWRhcHRlcgptdiBzaG93VGltZSBTaG93VGltZUFkYXB0ZXIKCmVjaG8gIlNob3dUaW1lQWRhcHRlciBEZXBsb3llZCI=
        type: string
      name:
        description: The name of the file, spaces ` ` or `-` are not allowed
        type: string
      path_name:
        description: the file path where the adapter file is stored on the client side. For example, on the file system where edge is running.
        example: start.sh
        type: string
    required:
      - name
  Assets:
    description: Assets for the deployment
    properties:
      asset_class:
        description: The names of the services, users, devices, triggers, timers, adapters, portals, plugins or collection that are being updated in the deployment
        example: adapters
        type: string
      asset_id:
        description: name of a particular asset or empty string for all assets
        example: adapter_name
        type: string
      sync_to_edge:
        description: specifies whether asset should be synced to all edges
        example: true
        type: boolean
      sync_to_platform:
        description: specifies whether asset should be synced to platform
        example: true
        type: boolean
    type: object
  CacheArrayResp:
    description: list of caches
    items:
      $ref: "#/definitions/getCacheResp"
    type: array
  Change:
    description: Owner changes
    properties:
      add:
        example: owner@clearblade.com
        type: string
      remove:
        example: owner@clearblade.com
        type: string
  Collection:
    description: A data set that contains items
    properties:
      category:
        type: string
      id:
        format: int64
        type: integer
      name:
        type: string
      photoUrls:
        items:
          type: string
        type: array
      tags:
        items:
          type: string
        type: array
    required:
      - name
      - id
  ColumnField:
    items:
      $ref: "#/definitions/ItemID"
    type: array
  DBResp:
    properties:
      Data:
        example:
          - <array of data objects>
        type: array
      Total:
        example: 1
        type: integer
  DataArray:
    items:
      $ref: "#/definitions/DataArray2"
    type: array
  DataArray2:
    items:
      $ref: "#/definitions/DataObject"
    type: array
  DataObject:
    properties:
      EQ:
        $ref: "#/definitions/DataObject2"
    type: object
  DataObject2:
    items:
      $ref: "#/definitions/DataObjectItem"
    type: array
  DataObjectItem:
    properties:
      item_id:
        example: 6e0227d8-8a98-454a-951d-a109f813a397
        type: string
    type: object
  DataPut:
    properties:
      $set:
        properties:
          columnName:
            example: newValue
        type: object
      query:
        $ref: "#/definitions/DataQuery"
  DataQuery:
    properties:
      FILTERS:
        $ref: "#/definitions/DataArray"
        type: array
  Error:
    description: Bad Request error information
    properties:
      category:
        example: User Permissions
        type: string
      code:
        example: 400
        type: integer
      detail:
        example: Invalid token
        type: string
      id:
        example: f5471393-b45e-42dc-8a13-034284d291f5
        type: string
      level:
        example: 1
        type: integer
      line:
        example: /go/src/clearblade/router/newRouter.go:336
        type: string
      lowLevelError:
        example: {}
        type: object
      message:
        example: Bad request
        type: string
    required:
      - id
      - code
      - level
      - category
      - message
      - detail
      - line
  ErrorResp:
    description: Error responses
    properties:
      error:
        $ref: "#/definitions/Error"
        example: true
      statusCode:
        description: Error code
        example: 400
        type: integer
    required:
      - error
      - statusCode
    type: object
  FilterQuery:
    properties:
      PAGENUM:
        example: 1
        type: integer
      PAGESIZE:
        default: 100
        type: integer
      SORT:
        items:
          $ref: "#/definitions/SortQuery"
        minLength: 0
        type: array
    type: object
  Filters:
    items:
      $ref: "#/definitions/Operator"
    type: array
  Item:
    properties:
      id:
        format: int64
        type: integer
      name:
        type: string
  ItemID:
    properties:
      item_id:
        example: 6e0227d8-8a98-454a-951d-a109f813a397
        type: string
    type: object
  KVPs:
    properties:
      topic:
        example: temperature/sensorA
        type: string
  MapAdapterCommand:
    description: The information to be used for adding a command to an adapter.
    properties:
      architecture:
        description: The platform the adapter will be running on.
        example: darwin-amd64
        type: string
      deploy_command:
        description: The file name that will be running for the deploy command.
        example: ./deploy.sh
        type: string
      logs_command:
        description: ""
        example: ./logs.sh
        type: string
      os:
        description: The os this adapter is going to run on.
        example: linux
        type: string
      run_deploy_on_deploy:
        description: ""
        example: true
        type: boolean
      run_start_on_deploy:
        description: ""
        example: true
        type: boolean
      run_stop_on_deploy:
        description: ""
        example: true
        type: boolean
      start_command:
        description: A command or shell script that will be executed to start the adapter on a ClearBlade Edge. If a start-up command is not specified , the adapter would need to be manually started by connecting to the gateway device (via ssh) and issuing an appropriate start
        example: ./start.sh
        type: string
      status_command:
        description: A command or shell script that will be run to determine the status of the adapter on a specific ClearBlade Edge. A shell script that echoes the status of an adapter should be supplied
        example: ./status.sh
        type: string
      stop_command:
        description: A command or shell script that will be run to stop the adapter on a ClearBlade Edge.  If the Stop Command is not specified, the adapter would need to be manually stopped by connecting to the gateway device (via ssh) and issuing an appropriate stop command.
        example: ./stop.sh
        type: string
      undeploy_command:
        description: A command or shell script that will be run to uninstall the adapter from a ClearBlade Edge. If the Undeploy Command is not specified the default behavior of the ClearBlade platform is to remove the adapter files from the directory where Edge is running.
        example: ./undeploy.sh
        type: string
  Operator:
    description: Choose only one of the below properties.
    properties:
      EQ:
        items:
          $ref: "#/definitions/OperatorValue"
        type: array
      GT:
        items:
          $ref: "#/definitions/OperatorValue"
        type: array
      GTE:
        items:
          $ref: "#/definitions/OperatorValue"
        type: array
      LT:
        items:
          $ref: "#/definitions/OperatorValue"
        type: array
      LTE:
        items:
          $ref: "#/definitions/OperatorValue"
        type: array
      NEQ:
        items:
          $ref: "#/definitions/OperatorValue"
        type: array
      RE:
        items:
          $ref: "#/definitions/OperatorValue"
        type: array
    type: object
  OperatorValue:
    description: An object describing a column/value relationship to be used in a query's operators.
    properties:
      "[columnName]":
        description: "[itemValue]"
        type: string
    type: object
  PutQuery:
    properties:
      $set:
        properties:
          "[columnName]":
            example: "[newValue]"
        type: object
      query:
        $ref: "#/definitions/Filters"
    type: object
  Query:
    properties:
      FILTERS:
        $ref: "#/definitions/Filters"
      PAGENUM:
        example: 1
        type: integer
      PAGESIZE:
        default: 100
        type: integer
      SORT:
        items:
          $ref: "#/definitions/SortObject"
        minLength: 0
        type: array
    type: object
  QueryResultSet:
    description: An object representing a SQL query result set.
    properties:
      DATA:
        description: An array containing each row returned by a query
        items:
          type: object
        type: array
      TOTAL:
        description: The number of rows affected by a query
        type: integer
    type: object
  SMSSettings:
    description: 2FA SMS communication settings
    properties:
      from:
        example: "+15120000000"
        type: string
      password:
        example: test
        type: string
      service_name:
        description: Only Twilio is supported.
        example: Twilio
        type: string
      two_factor_message:
        example: "Please use the code to log in: $CODE"
        type: string
      url:
        example: https://api.twilio.com
        type: string
      username:
        example: AC25b4eb989b9db8
        type: string
      validation_message:
        example: "Please validate your email here: $LINK"
        type: string
  SMSTest:
    description: 2FA SMS communication test
    properties:
      recipient:
        example: "+15120000000"
        type: string
  SecuritySettings:
    description: Security Settings for 2FA
    properties:
      developer_token_ttl:
        example: 86400
        type: integer
      two_factor_auth:
        $ref: "#/definitions/enabled"
  SortObject:
    description: Choose only one of the below properties.
    properties:
      ASC:
        description: Sort by ascending values in this column
        example: columnName
        type: string
      DESC:
        description: Sort by descending values in this column
        example: columnName
        type: string
    type: object
  SortQuery:
    description: Sorts based on query.
    properties:
      DESC:
        description: Sort by descending values
        example: datetime
        type: string
    type: object
  SortUser:
    description: Sort by user ID.
    properties:
      ASC:
        description: Sort by ascending values
        example: user_id
        type: string
    type: object
  SuccessResp:
    description: Success responses
    properties:
      success:
        description: Describes if the action was successfully performed or not.
        example: true
        type: boolean
    required:
      - success
  addAdapter:
    description: The information to be used for adding an adapter.
    properties:
      architecture:
        description: The platform the adapter will be running on.
        example: darwin-amd64
        type: string
      deploy_command:
        description: The file name that will be running for the deploy command.
        example: ""
        type: string
      logs_command:
        description: A command or shell script that will be used to retrieve any logs printed out by the adapter while it is running.
        example: ""
        type: string
      name:
        description: Name of the adapter.
        example: example-adapter
        type: string
      os:
        description: The os this adapter is going to run on.
        example: linux
        type: string
      start_command:
        description: A command or shell script that will be executed to start the adapter on a ClearBlade Edge. If a start-up command is not specified , the adapter would need to be manually started by connecting to the gateway device (via ssh) and issuing an appropriate start
        example: ""
        type: string
      status_command:
        description: A command or shell script that will be run to determine the status of the adapter on a specific ClearBlade Edge. A shell script that echoes the status of an adapter should be supplied
        example: ""
        type: string
      stop_command:
        description: A command or shell script that will be run to stop the adapter on a ClearBlade Edge.  If the Stop Command is not specified, the adapter would need to be manually stopped by connecting to the gateway device (via ssh) and issuing an appropriate stop command.
        example: ""
        type: string
      undeploy_command:
        description: A command or shell script that will be run to uninstall the adapter from a ClearBlade Edge. If the Undeploy Command is not specified the default behavior of the ClearBlade platform is to remove the adapter files from the directory where Edge is running.
        example: ""
        type: string
    required:
      - name
  addCache:
    description: the information given when adding a cache
    properties:
      description:
        description: Description of new shared cache
        type: string
      name:
        example: sharedCache
        type: string
      ttl:
        example: 30
        maxLength: 3600
        minLength: 30
        type: integer
    required:
      - ttl
  addColumnInfo:
    properties:
      id:
        description: This is the collection ID
        example: c0f8e2c50bbeeafb87f5efa2eee301
        type: string
      name:
        example: Sensor_Location
        type: string
      type:
        example: string
        type: string
    required:
      - id
      - name
      - type
  addUserColumn:
    description: User column information.
    properties:
      column_name:
        example: phone_number
        type: string
      type:
        example: string
        type: string
    required:
      - column_name
      - type
  addservice:
    properties:
      code:
        example: function serviceName(req,resp){resp.success(“success”);}
        type: string
      dependencies:
        example: log
        type: string
      name:
        example: serviceName
        type: string
      parameters:
        example:
          - "{}"
        type: string
      run_user:
        example: ""
        type: string
      systemID:
        example: c0f8e2c50bc6cc90b7a19abbbb8d01
        type: string
    required:
      - code
      - name
      - systemID
      - parameters
  allBuckets:
    items:
      $ref: "#/definitions/buckets"
    type: array
  allCollections:
    properties:
      appID:
        description: This is the system key
        example: c0f8e2c50bbeeafb87f5efa2eee301
        type: string
      collectionID:
        example: 92ceabdd0be690a3d3fdd9dbd3e901
        type: string
      name:
        example: Employee_List
        type: string
    type: object
  allCollectionsSuccess:
    items:
      $ref: "#/definitions/allCollections"
    type: array
  allDatabases:
    items:
      $ref: "#/definitions/database"
    type: array
  allIndexes:
    properties:
      Data:
        items:
          $ref: "#/definitions/indexArray"
        type: array
      Total:
        description: Total number of indexes in collection
        example: 2
        type: integer
  allowKey:
    properties:
      allow_key_auth:
        example: true
        type: boolean
  analyticItems:
    properties:
      developers:
        example:
          - example@clearblade.com
        type: array
      disabled:
        example: false
        type: boolean
      diskUsage:
        example: 2
        type: integer
      lastUpdated:
        example: 1580407664
        type: integer
      name:
        example: System-Name
        type: string
      numAPIReqsMonth:
        example: 2
        type: integer
      numAPIReqsTotal:
        example: 2
        type: integer
      numAPIReqsYear:
        example: 2
        type: integer
      numDeployments:
        example: 2
        type: integer
      numDevices:
        example: 2
        type: integer
      numDevs:
        example: 2
        type: integer
      numEdges:
        example: 2
        type: integer
      numLibraries:
        example: 2
        type: integer
      numPub:
        example: 2
        type: integer
      numPubMonth:
        example: 2
        type: integer
      numPubYear:
        example: 2
        type: integer
      numRecMonth:
        example: 2
        type: integer
      numRecTotal:
        example: 2
        type: integer
      numRecYear:
        example: 2
        type: integer
      numRoles:
        example: 2
        type: integer
      numServices:
        example: 2
        type: integer
      numUsers:
        example: 2
        type: integer
      owner:
        example: example@clearblade.com
        type: string
      system_key:
        example: ccafb4cf0bd0dcbcadaccaf9ebba01
        type: string
  auditInfo:
    items:
      $ref: "#/definitions/auditItems"
    type: array
  auditItems:
    properties:
      action_type:
        example: Update
        type: string
      asset_class:
        example: devices
        type: string
      asset_id:
        example: ClearBlade-iPhone
        type: string
      changes:
        example: '{"last_location_update":"2020-01-29T20:18:18.429,"last_seen_location":"none","x_pos":874.2206168192284,"y_pos":739.82265853589}'
        type: string
      email:
        example: example@clearblade.com
        type: string
      id:
        example: 10440595
        type: integer
      response_time:
        description: In milleseconds
        example: 4038669
        type: integer
      system_key:
        example: ccafb4cf0bd0dcbcadaccaf9ebba01
        type: string
      time:
        example: 2020-01-29T20:18:18.475214Z
        type: string
      user_type:
        example: DEV
        type: string
  authAnon:
    properties:
      user_token:
        example: jt-w5IiOOnhuSp8hJbanB2Tluj_ShXphjAta0_6_mAcUPSbatjFRYr1m5Ojl4skSOZ3txbbkFWArnUnfNA==
        type: string
  authUser:
    properties:
      expires_at:
        description: The format is UNIX timestamp. If value is -1, then no refresh token is returned
        example: 1589313683
        type: integer
      refresh_token:
        example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOiJhNGE0YTNlYjBiZDg5ZmU4YmV4cCI6MTU4OTc0NTY4MywiaWF0IjoxNTg4ODgxNjgzfQ.K2Ji0HldYtUO0RgednnOq117cnZy-ij-C1k1a8qVMsw
        type: string
      user_id:
        example: ce81b8dd0bf6fea6cec6d3c19774
        type: string
      user_token:
        example: jt-w5IiOOnhuSp8hJbanB2Tluj_ShXphjAta0_6_mAcUPSbatjFRYr1m5Ojl4skSOZ3txbbkFWArnUnfNA==
        type: string
  authdata:
    description: The credentials to be used for authentication and refreshing developer tokens
    properties:
      email:
        example: cbman@clearblade.com
        type: string
      password:
        example: cl34rbl4d3
        type: string
  box:
    properties:
      example/full/path/to/file.txt:
        $ref: "#/definitions/box_data"
    type: object
  box_data:
    properties:
      base_name:
        description: Base Name
        example: sample.txt
        type: string
      bucket_name:
        description: Box Name
        example: inbox
        type: string
      last_modified:
        description: Date of update
        example: 2017-07-03T19:52:41.693Z
        type: string
      path_name:
        description: Full file path
        example: example/full/path/to/file.txt
        type: string
      permissions:
        description: File permissions
        example: -rw-r--r--
        type: string
      relative_name:
        description: relative name
        example: test/file.txt
        type: string
      size:
        description: File size in bytes
        example: 60
        type: integer
  buckets:
    properties:
      deployment_name:
        description: Deployment Name
        example: ExampleDeployment
        type: string
      edge_config:
        description: Edge Config file
        example:
          - root: </root/directory>
        type: array
      edge_storage:
        description: Edge storage type - local or google
        example: local
        type: string
      platform_config:
        description: Platform Config file
        example:
          - root: </root/directory>
        type: array
      platform_storage:
        description: Platform storage type - local or google
        example: local
        type: string
      system_key:
        example: 98a6cbe60bceafcc5d8b4a33b
        type: string
  changeRoleSettings:
    description: Changes settings in individual roles
    properties:
      changes:
        $ref: "#/definitions/roleSettings"
      id:
        example: Administrator
        type: string
    required:
      - changes
      - id
  changeRolesObject:
    description: Contains at least one of the keys, add or delete which consists of an array of roles
    properties:
      add:
        example:
          - Administrator
        type: array
      delete:
        example:
          - Authenticated
        type: array
  changeroles:
    description: Changes roles
    properties:
      roles:
        $ref: "#/definitions/changeRolesObject"
    required:
      - roles
  changes:
    description: Changes roles and password
    properties:
      password:
        example: test
        type: string
      roles:
        $ref: "#/definitions/changeRolesObject"
  changesInfo:
    description: Item identification
    properties:
      itemInfo:
        $ref: "#/definitions/itemInfo"
      permissions:
        $ref: "#/definitions/permissions"
    required:
      - itemInfo
      - permissions
  codeMeta:
    properties:
      code:
        items:
          $ref: "#/definitions/codeSettings"
        type: array
  codeSettings:
    properties:
      auto_balance:
        description: When set to `true` automatically start this service on each of the available nodes with the number of instances in the concurrency limit
        example: false
        type: boolean
      auto_balance_euid:
        example: ""
        type: string
      auto_restart:
        example: false
        type: boolean
      concurrency:
        example: 0
        type: integer
      euid:
        example: b0a6cbe60b8edf93fdca978aed8e01
        type: string
      execution_timeout:
        example: 60
        type: integer
      logging_enabled:
        type: boolean
      name:
        example: serviceName
        type: string
      namespace:
        example: ""
        type: string
      system_key:
        example: 98a6cbe60bceafcc5d8b4a33b
        type: string
      uuid:
        example: ea339dce-3e5e-45b2-b1a6-fe030a03b0fd
        type: string
      version:
        example: 3
        type: integer
      version_id:
        example: 1767d09d-e6c6-4841-a26a-9935a1e5fd96
        type: string
  collectionSuccess:
    description: Collection success response body
    properties:
      CURRENTPAGE:
        example: 2
        type: integer
      DATA:
        items:
          $ref: "#/definitions/dataArray"
        type: array
      NEXTPAGEURL:
        example: /api/v/1/data/a8eeb8db0b8aebf2d7f186d89348?query=%7B%22FILTERS%22%3A%5B%5D%2C%22PAGENUM%22%3A2%2C%22PAGESIZE%22%3A100%2C%22SELECTCOLUMNS%22%3Anull%2C%22SORT%22%3A%5B%5D%7D
        type: string
      PREVPAGEURL:
        example: 1
        type: integer
      TOTAL:
        example: 2
        type: integer
    required:
      - CURRENTPAGE
      - NEXTPAGEURL
      - PREVPAGEURL
      - TOTAL
    type: object
  columnObject:
    properties:
      ColumnName:
        example: item_id
        type: string
      ColumnType:
        example: int
        type: string
      PK:
        example: "false"
        type: boolean
    type: object
  columnSuccess:
    items:
      $ref: "#/definitions/columnObject"
    type: array
  connectedDevice:
    properties:
      device_name:
        items:
          $ref: "#/definitions/connectedDeviceSettings"
        type: array
  connectedDeviceCount:
    properties:
      total_device_connections:
        example: 5
        type: integer
      total_devices:
        example: 3
        type: integer
      unique_device_connections:
        example: 2
        type: integer
  connectedDeviceInfo:
    properties:
      allow_certificate_auth:
        type: boolean
      allow_key_auth:
        type: boolean
      certificate:
        example: null
        type: string
      connections:
        items:
          $ref: "#/definitions/connectedDeviceSettings"
        type: array
      created_date:
        example: 1576095410
        type: integer
      description:
        example: A connected device.
        type: string
      device_key:
        example: "e4ba8adf0beeea9dcc909dafaeab01 :: deviceName"
        type: string
      enabled:
        type: boolean
      has_keys:
        type: boolean
      last_active_date:
        example: 1576095410
        type: integer
      name:
        example: ExampleDevice
        type: string
      state:
        example: active
        type: string
      system_key:
        example: e4ba8adf0beeea9dcc909dafaeab01
        type: string
      type:
        example: sensor
        type: string
  connectedDeviceSettings:
    properties:
      client_id:
        example: DhkVG42mlBQ7DkZSvb5d
        type: string
      time_connected:
        example: 2019-12-13T17:53:09.5778599Z
        type: string
  copyFile:
    properties:
      from_box:
        description: Box Name where file is being copied/moved
        example: inbox
        type: string
      from_path:
        description: Relative File Path Name where file is being copied/moved
        example: /relative/file/path
        type: string
      to_box:
        description: Box Name of where file is being copied/moved to
        example: inbox
        type: string
      to_path:
        description: Relative File Path Name where file is being copied/moved to
        example: /relative/file/path
        type: string
  count:
    example:
      count: 1
    type: object
  createBox:
    properties:
      box:
        description: Box Name
        example: inbox
        type: string
      contents:
        description: base64 encoded file contents
        example: IyEvYmluL2Jhc2gKbWtkaXIgU2hvd1RpbWVBZGFwdGVyCgptdiBzdGFydC5zaCBTaG93VGltZUFkYXB0ZXIKbXYgc3RvcC5zaCBTaG93VGltZUFkYXB0ZXIKbXYgc3RhdHVzLnNoIFNob3dUaW1lQWRhcHRlcgptdiBkZXBsb3kuc2ggU2hvd1RpbWVBZGFwdGVyCm12IHVuZGVwbG95LnNoIFNob3dUaW1lQWRhcHRlcgptdiBzaG93VGltZSBTaG93VGltZUFkYXB0ZXIKCmVjaG8gIlNob3dUaW1lQWRhcHRlciBEZXBsb3llZCI=
        type: string
      path:
        description: Relative File Path
        example: /relative/file/path
        type: string
  createDatabase:
    description: Credentials for all databases can be found in the endpoint description
    properties:
      credentials:
        $ref: "#/definitions/credentials"
        type: object
      dbtype:
        example: mysql
        type: string
      name:
        example: mysql_example
        type: string
    type: object
  createDeployment:
    description: The information used to create a deployment
    properties:
      assets:
        items:
          $ref: "#/definitions/Assets"
        type: array
      edges:
        description: Names of edges to be included in the deployment
        example:
          - edge1
          - edge2
          - edge3
        type: array
      name:
        type: string
    required:
      - name
  credentials:
    properties:
      address:
        example: MYSQL_ADDRESS
        type: string
      dbname:
        example: MYSQL_DATABASE_NAME
        type: string
      password:
        example: MSQL_PASSWORD
        type: string
      port:
        example: "3306"
        type: string
      user:
        example: MYSQL_USER
        type: string
  dataArray:
    example:
      row1: row1_data
      row2: row2_data
    type: object
  database:
    description: Database name and type
    properties:
      dbtype:
        example: MongoDB
        type: string
      name:
        example: sample_db
        type: string
    type: object
  deleteFile:
    properties:
      box:
        description: Box Name of file being deleted
        example: inbox
        type: string
      path:
        description: Relative File Path Name of file being deleted
        example: /relative/file/path
        type: string
  deleteuserdata:
    properties:
      user_id:
        example: c6b4cf0b8ca5b7c3fad793cb12
        type: string
  deployment:
    properties:
      description:
        example: This an example deployment
        type: string
      name:
        example: deployment_name
        type: string
  deploymentSuccess:
    items:
      $ref: "#/definitions/deployment"
    type: array
  devemail:
    description: email key of developer
    properties:
      email:
        example: rob@clearblade.com
        type: string
    required:
      - email
  deviceAdd:
    properties:
      active_key:
        example: "1574445864"
        type: string
      allow_certificate_auth:
        type: boolean
      allow_key_auth:
        type: boolean
      certificate:
        type: string
      description:
        example: This is a sensor
        type: string
      name:
        example: device_name
        type: string
      state:
        example: On
        type: string
      type:
        example: Sensor
        type: string
  deviceAdminNew:
    description: New device information
    properties:
      active_key:
        type: string
      allow_certificate_auth:
        type: boolean
      allow_key_auth:
        type: boolean
      certificate:
        type: string
      custom:
        type: string
      description:
        type: string
      enabled:
        type: boolean
      keys:
        type: string
      name:
        type: string
      state:
        type: string
      type:
        type: string
    required:
      - name
      - type
      - state
      - enabled
      - allow_key_auth
      - allow_certificate_auth
  deviceAdminUpdate:
    description: Updated device information
    properties:
      active_key:
        type: string
      allow_certificate_auth:
        type: boolean
      allow_key_auth:
        type: boolean
      certificate:
        type: string
      custom:
        type: string
      description:
        type: string
      enabled:
        type: boolean
      keys:
        type: string
      state:
        type: string
      type:
        type: string
  deviceAuth:
    properties:
      deviceName:
        example: BLEdevice
        type: string
      deviceToken:
        example: 1dBfevzh0-lLVbZwx9DbyTLPyw-8F0RDq3qeUGqwinr8x3-bKMXLpfyliRSXsre5KxMn76CuChFQANoEEg==
        type: string
      expiresAt:
        description: The format is UNIX timestamp. If value is -1, then no refresh token is returned
        example: 1589313683
        type: integer
      refreshToken:
        example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOiJhNGE0YTNlYjBiZDg5ZmU4YmV4cCI6MTU4OTc0NTY4MywiaWF0IjoxNTg4ODgxNjgzfQ.K2Ji0HldYtUO0RgednnOq117cnZy-ij-C1k1a8qVMsw
        type: string
  deviceAuthdata:
    properties:
      activeKey:
        example: 378BLE
        type: string
      deviceName:
        example: BLEdevice
        type: string
    required:
      - deviceName
      - activeKey
  deviceKey:
    description: List of rotating keys.
    properties:
      active_key:
        example: "��W&\x1a�Kw��"
        type: string
      keys:
        items:
          $ref: "#/definitions/rotatingDeviceKeys"
        type: array
  deviceSession:
    items:
      $ref: "#/definitions/deviceSessionInfo"
    type: array
  deviceSessionInfo:
    properties:
      device_key:
        example: DEVICENAME00000
        type: string
      issued:
        example: 1587659826
        type: integer
  deviceUpdate:
    properties:
      allow_certificate_auth:
        example: true
        type: boolean
      allow_key_auth:
        example: true
        type: boolean
      certificate:
        example: ""
        type: string
      created_date:
        example: 1574445666
        type: integer
      description:
        example: This device is a sensor
        type: string
      device_key:
        example: "c0f8e2c50bbeeafb87f5efa2eee301 :: device_name"
        type: string
      enabled:
        example: true
        type: boolean
      last_active_date:
        example: 1574445864
        type: integer
      name:
        example: device_name
        type: string
      state:
        example: On
        type: string
      system_key:
        example: c0f8e2c50bbeeafb87f5efa2eee301
        type: string
      type:
        example: sensor
        type: string
  deviceUserUpdate:
    description: Updated device information
    properties:
      custom_attribute:
        example: custom_setting
        type: string
      state:
        example: On
        type: string
  devpass:
    description: Contains oldPass and newPass keys
    properties:
      new_password:
        example: bieberluver
        type: string
      old_password:
        example: bieberboy
        type: string
    required:
      - old_password
      - new_password
  devregdata:
    description: The information to be used for user registration. Custom fields may be added.
    properties:
      email:
        description: Developer's email.
        example: martin@clearblade.com
        type: string
      fname:
        description: Developer's first name.
        example: Martin
        type: string
      lname:
        description: Developer's last name.
        example: theMachine
        type: string
      org:
        description: Developer's organization.
        example: ClearBlade
        type: string
      password:
        description: Developer's password.
        example: bieberboy
        type: string
    required:
      - email
      - password
      - fname
      - lname
      - org
  devregresp:
    properties:
      dev_token:
        example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOiJhNGE0YhjY2NhNS0xNjRhLTQ5ODgtYjU2MS1jYWVmNTcyNGU0NjAiLCJ1dCI6MSwidHQiOjEsImV4cCI6MTU4OTMxMzY4MywiaWF0IjoxNTg4ODgxNjgzfQ.0FK58r0wcJSQIDuDCAselAdmN-uj_CXHqJqk2mF9WB4
        type: string
      expires_at:
        description: The format is UNIX timestamp. If value is -1, then no refresh token is returned
        example: 1589313683
        type: integer
      is_two_factor:
        example: false
        type: boolean
      refresh_token:
        example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOiJhNGE0YTNlYjBiZDg5ZmU4YmV4cCI6MTU4OTc0NTY4MywiaWF0IjoxNTg4ODgxNjgzfQ.K2Ji0HldYtUO0RgednnOq117cnZy-ij-C1k1a8qVMsw
        type: string
      user_id:
        example: a4a4a3eb0bd89fe8bbeb99f8d2be01
        type: string
  disableData:
    description: The information to be used for disabling a developer
    properties:
      admin:
        type: boolean
      disabled:
        type: boolean
      email:
        type: string
    required:
      - email
      - admin
      - disabled
  edgeCommand:
    description: The information for the command running on a specific edge.
    properties:
      command:
        description: The command the edge is currently using.
        example: status
        type: string
      edges:
        description: Name of edge(s) being used.
        example:
          - edgeName
        type: string
    required:
      - command
      - edges
  edgeNew:
    description: New edge
    properties:
      description:
        type: string
      local_addr:
        type: string
      local_port:
        type: string
      location:
        type: string
      mac_address:
        type: string
      public_addr:
        type: string
      public_port:
        type: string
      system_key:
        type: string
      system_secret:
        type: string
      token:
        type: string
    required:
      - system_key
      - system_secret
      - token
  edgeTemplateModule:
    properties:
      module:
        enum:
          - trigger
          - service
          - library
        type: string
  edgeTemplateUpdate:
    properties:
      def_module:
        $ref: "#/definitions/edgeTemplateModule"
      def_name:
        type: string
    required:
      - def_name
  edgeUpdate:
    description: Update edge
    properties:
      description:
        type: string
      local_addr:
        type: string
      local_port:
        type: string
      location:
        type: string
      mac_address:
        type: string
      public_addr:
        type: string
      public_port:
        type: string
      system_key:
        type: string
      system_secret:
        type: string
      token:
        type: string
    required:
      - system_key
      - system_secret
  emailSettings:
    description: 2FA email communication settings
    properties:
      encryption_type:
        example: STARTTLS
        type: string
      from:
        example: example@gmail.com
        type: string
      host:
        example: smtp.gmail.com
        type: string
      password:
        example: test
        type: string
      port:
        example: "587"
        type: string
      protocol:
        example: SMTP
        type: string
      two_factor_message:
        example: "Please use the code to log in: $CODE"
        type: string
      two_factor_subject:
        example: Login code
        type: string
      username:
        example: example@gmail.com
        type: string
      validation_message:
        example: "Please validate your email here: $LINK"
        type: string
      validation_subject:
        example: Email validation
        type: string
  emailTest:
    description: 2FA email communication test
    properties:
      recipient:
        example: example@companyname.com
        type: string
  enabled:
    properties:
      enabled:
        example: true
        type: boolean
  eventDefinition:
    properties:
      def_keys:
        example:
          - topic
        type: array
      def_module:
        example: Messaging
        type: string
      def_name:
        example: Subscribe
        type: string
      visibility:
        example: true
        type: boolean
  executeWebhook:
    description: Data passing through webhooks
    properties:
      data:
        example: Third party server data
        type: string
    required:
      - data
  externalDB:
    properties:
      credentials:
        $ref: "#/definitions/credentials"
        type: object
      dbtype:
        example: mysql
        type: string
      id:
        example: 5
        type: integer
      name:
        example: mysql_example
        type: string
      system_key:
        example: bc91ede40bb993a7babaa801
        type: string
  getCacheResp:
    description: The list of Shared Cache returned
    properties:
      description:
        example: Here goes an example description.
        type: string
      id:
        description: Unique ID of cache
        example: 54eb0787-50df-4099-b368-c68ea97f1ce2
        type: string
      name:
        example: test_cache
        type: string
      system_key:
        example: b4d49dd00basfdb3deb4ccbefeb0df01
        type: string
      ttl:
        example: 30
        maxLength: 3600
        minLength: 30
        type: integer
    required:
      - id
      - name
      - system_key
      - ttl
    type: object
  getUsers:
    properties:
      creation_date:
        example: 2019-09-11T18:41:15Z
        type: string
      email:
        example: cbman@clearblade.com
        type: string
      user_id:
        example: ce81b8dd0bf6fea6cec6d3c19774
        type: string
  getUsersData:
    items:
      $ref: "#/definitions/getUsers"
    type: array
  getUsersSuccess:
    properties:
      Data:
        $ref: "#/definitions/getUsersData"
      Total:
        example: 1
        type: integer
  getWebhook:
    description: Webhook properties
    properties:
      auth_method:
        example: http_basic_auth
        type: string
      description:
        example: Webhook to get data
        type: string
      id:
        example: f2ca33c4-8bd0-45aa-af4a-da3467b451bc
        type: string
      name:
        example: webhook_example
        type: string
      service_name:
        example: service_example
        type: string
      system_key:
        example: ccafb4cf0bd0dcbcadaccaf9ebba01
        type: string
      system_secret:
        example: CCAFB4CF0BBABDDCE3F2F1E6C3E601
        type: string
    required:
      - auth_method
      - id
      - name
      - service_name
      - system_key
      - system_secret
    type: object
  indexArray:
    description: Type choices are unique index and nonunique index
    properties:
      name:
        description: Column Name
        example: ExampleColumn
        type: string
      type:
        description: Index Type
        example: Unique Index
        type: string
  itemInfo:
    description: Item identification
    properties:
      id:
        example: 8edaedc50bcaf9cd88bce5c6e57a
        type: string
      name:
        example: sampleAsset
        type: string
    required:
      - id
      - name
  libdata:
    properties:
      code:
        example: function getter(uri){var r=Requests();r.get({'uri':uri},function(err,resp){log(JSON.stringify(resp));});}
        type: string
      dependencies:
        example: http,log
        type: string
      visibility:
        example: system
        type: string
    required:
      - code
      - dependencies
      - visibility
  messagePublish:
    description: The topic, message body and the qos (0,1 or 2) required to publish a message
    properties:
      body:
        example: '{"temperature":43}'
        type: string
      qos:
        example: 0
        type: number
      topic:
        example: /sensor/111111
        type: string
    required:
      - topic
  msgArray:
    items:
      $ref: "#/definitions/msgTopic"
    type: array
  msgTopic:
    properties:
      ip:
        example: ""
        type: string
      payload:
        description: The message body of the topic
        example: Message Body.
        type: string
      payloadsize:
        description: Message character count
        example: 50
        type: integer
      pk:
        example: 12a38ef9-6d01-4aed-8117-e4464f14ffbc
        type: string
      qos:
        description: Quality of Service (0,1,2)
        example: 0
        type: integer
      time:
        description: The format is UNIX timestamp.
        example: 1589313683
        type: integer
      topicid:
        example: Topic Name
        type: string
      userid:
        example: e291cdc70bf6a4fa3e288c3af01
        type: string
  newcollection:
    description: The information necessary to create a new collection
    properties:
      appID:
        description: This is the system key
        example: c0f8e2c50bbeeaf87f5efa2eee301
        type: string
      collectionID:
        example: c0f8e2c50bbeeafb87f5efa2eee301
        type: string
      name:
        example: newCollection
        type: string
    required:
      - appID
      - name
  newsystem:
    description: Info to create a new system
    properties:
      description:
        example: Here is my new system.
        type: string
      name:
        example: ExampleSystem
        type: string
    required:
      - name
      - description
  operations:
    example: db.collectionName.find()
    type: string
  operationsDB:
    properties:
      operation:
        items:
          $ref: "#/definitions/operations"
  passdata:
    properties:
      new_password:
        example: P@ssw0rd
        type: string
      old_password:
        example: cl34rbl4d3
        type: string
    required:
      - old_password
      - new_password
  permissions:
    description: "Read - 1, Create - 2 , Update - 4 , Delete - 8. Ex: R+C+D = 1+2+8 = 10"
    properties:
      permissions:
        example: 8
        type: integer
    type: object
  platformInfo:
    properties:
      about:
        example: ClearBlade Platform
        type: object
      buildId:
        example: a66297bca:485
        type: string
      version:
        example: 9.0.0
        type: string
  portalArray:
    items:
      $ref: "#/definitions/portalSettings"
    type: array
  portalSettings:
    properties:
      config:
        type: object
      description:
        example: Portal Description.
        type: string
      last_updated:
        example: 03 Aug 20 02:33 UTC
        type: string
      name:
        example: ExamplePortal
        type: string
      namespace:
        example: ""
        type: string
      system_key:
        example: 98a6cbe60bceafcc5d8b4a33b
        type: string
      type:
        example: custom_v2
        type: string
  regUser:
    properties:
      creation_date:
        example: 2019-09-11T18:41:15Z
        type: string
      email:
        example: cbman@clearblade.com
        type: string
      expires_at:
        description: The format is UNIX timestamp. If value is -1, then no refresh token is returned
        example: 1589313683
        type: integer
      options:
        example: ""
        type: string
      refresh_token:
        example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOiJhNGE0YTNlYjBiZDg5ZmU4YmV4cCI6MTU4OTc0NTY4MywiaWF0IjoxNTg4ODgxNjgzfQ.K2Ji0HldYtUO0RgednnOq117cnZy-ij-C1k1a8qVMsw
        type: string
      user_id:
        example: ce81b8dd0bf6fea6cec6d3c19774
        type: string
      user_token:
        example: jt-w5IiOOnhuSp8hJbanB2Tluj_ShXphjAta0_6_mAcUPSbatjFRYr1m5Ojl4skSOZ3txbbkFWArnUnfNA==
        type: string
  regensystem:
    description: Contains id of system to generate new keys for
    properties:
      id:
        example: "[systemID]"
        type: string
    required:
      - id
  resetPassword:
    properties:
      email:
        example: example@clearblade.com
        type: string
      new_password:
        example: password
        type: string
  retrySync:
    properties:
      asset_class:
        description: Asset Type
        example: services
        type: string
      asset_id:
        example: c0f8e2c50bbeeafb87f5efa2eee301
        type: string
      edge:
        description: Edge Name
        example: ExampleEdge
        type: string
      is_collection:
        type: boolean
      sync_event:
        example: 0 (Insert)/1 (Update)/2 (Delete)/5 (Upsert)
        type: integer
  roleSettings:
    description: Assets with permission changes
    properties:
      allcollections:
        $ref: "#/definitions/changesInfo"
      allservices:
        $ref: "#/definitions/permissions"
      collections:
        $ref: "#/definitions/changesInfo"
      deployments:
        $ref: "#/definitions/permissions"
      description:
        type: string
      devices:
        $ref: "#/definitions/permissions"
      edges:
        $ref: "#/definitions/changesInfo"
      msgHistory:
        $ref: "#/definitions/permissions"
      portals:
        $ref: "#/definitions/changesInfo"
      roles:
        $ref: "#/definitions/permissions"
      services:
        $ref: "#/definitions/changesInfo"
      topics:
        $ref: "#/definitions/changesInfo"
      triggers:
        $ref: "#/definitions/permissions"
      users:
        $ref: "#/definitions/permissions"
  roles:
    description: Contains the roles to add or delete for the user
    properties:
      changes:
        $ref: "#/definitions/changeroles"
      user:
        example: b4d8aaab0bf48e98dacbd78e9e50
        type: string
    required:
      - user
      - changes
  rolesinfo:
    description: Information of the roles
    properties:
      collections:
        example: []
        type: array
      description:
        example: ""
        type: string
      name:
        example: Administrator
        type: string
      services:
        example: []
        type: array
      topics:
        example: []
        type: array
    required:
      - name
  rolespass:
    description: Contains the roles to add or delete for the user
    properties:
      changes:
        $ref: "#/definitions/changes"
      user:
        example: b4d8aaab0bf48e98dacbd78e9e50
        type: string
    required:
      - user
      - changes
  rotatingDeviceKeys:
    example: "��W&\x1a�Kw��"
    type: string
  serviceUpdate:
    properties:
      auto_balance:
        description: If concurrency > 0 then auto_balance can be set to true if needed
        type: boolean
      auto_restart:
        description: If execution_timeout = -1 => Stream Service then auto_restart can be set to true if needed
        type: boolean
      code:
        example: function serviceName(req,resp){resp.success(“success”);}
        type: string
      concurrency:
        example: 0
        type: integer
      current_version:
        example: 4
        type: integer
      dependencies:
        example: log
        type: string
      execution_timeout:
        example: 60
        type: integer
      logging_enabled:
        type: boolean
      name:
        example: serviceName
        type: string
      parameters:
        example: []
        type: array
      run_user:
        description: Uses user_id.
        example: e8b7f0cb0bdccdb7a8a7c78cdfcb01
        type: string
      timers:
        example: []
        type: array
      triggers:
        example: []
        type: array
    required:
      - auto_balance
      - auto_restart
      - code
      - concurrency
      - current_version
      - logging_enabled
      - name
  systemInfo:
    items:
      $ref: "#/definitions/analyticItems"
    type: array
  systemSettings:
    description: System info
    properties:
      Dev:
        description: Developer Id for the owner of the system
        example: 92f8dbbb0bccb3fff4be5cdb601
        type: string
      appId:
        description: system key
        example: a6e0f8e20bbefcec789de6b8f4cf01
        type: string
      appSecret:
        description: system secret
        example: A6E0F8E20BDEB0C2838EF2B6D09801
        type: string
      auth_service:
        description: Configure the system to have all authentication requests go through a specific Code Service.
        example: ""
        type: string
      description:
        example: Here is my new system.
        type: string
      name:
        example: ExampleSystem
        type: string
      reg_service:
        description: Configure the system to have all registration requests go through a specific Code Service.
        example: ""
        type: string
      registration:
        example: ""
        type: string
      token_ttl:
        description: ttl for developer tokens in seconds. Min - 86400   (1 day), Max- 2592000 (30 days), Default - 432000 Infinite - -1
        example: "432000"
        type: string
      token_ttl_anon:
        description: ttl for anonymous tokens in seconds. Min - 3600   (1 hour), Max- 7776000 (90 days), Default - 432000 (5 days) Infinite - -1
        example: "432000"
        type: integer
      token_ttl_device:
        description: ttl for device tokens in seconds. Min - 3600   (1 hour), Max- 7776000 (90 days), Default - 432000 (5 days) Infinite - -1
        example: "432000"
        type: string
      token_ttl_user:
        description: ttl for user tokens in seconds. Min - 3600   (1 hour), Max- 7776000 (90 days), Default - 432000 (5 days) Infinite - -1
        example: "432000"
        type: string
  timerArray:
    items:
      $ref: "#/definitions/timerList"
    type: array
  timerList:
    properties:
      description:
        example: This timer is 60 seconds
        type: string
      frequency:
        description: Frequency (in seconds) between two consecutive invocations of a timer handler
        example: 60
        type: integer
      name:
        example: Timer_Example
        type: string
      namespace:
        example: ""
        type: string
      repeats:
        description: The number of times a timer handler is invoked. To invoke the handler indefinitely set 'repeats = -1'
        example: -1
        type: integer
      service_name:
        example: TimerHandler
        type: string
      start_time:
        example: 2017-07-03T19:52:41.693Z
        type: string
      system_key:
        example: ccafb4cf0bd0dcbcadaccaf9ebba01
        type: string
      system_secret:
        example: CCAFB4CF0BBABDDCE3F2F1E6C3E601
        type: string
      timer_key:
        example: "c0f8e2c50bbeeafb87f5efa2eee301 :: timer_name"
        type: string
      user_id:
        example: c6b4cf0b8ca5b7c3fad793cb12
        type: string
      user_token:
        example: jt-w5IiOOnhuSp8hJbanB2Tluj_ShXphjAta0_6_mAcUPSbatjFRYr1m5Ojl4skSOZ3txbbkFWArnUnfNA==
        type: string
  timerSuccess:
    description: Success response for timer
    properties:
      description:
        example: My 10 second timer
        type: string
      frequency:
        example: 10
        type: integer
      name:
        example: tenSecondTimer
        type: string
      namespace:
        example: tenSecond
        type: string
      repeats:
        example: 20
        type: integer
      service_name:
        example: getTemps
        type: string
      start_time:
        example: 2017-07-03T19:52:41.693Z
        type: string
      system_key:
        example: 828dead00b84d78ed580c5faa7a101
        type: string
      system_secret:
        example: 828DEAD00BD6F9E9AF8FD2F3D817
        type: string
      timer_key:
        example: 828dead00b84d78ed580c5faa7a101::tenSecondTimer
        type: string
      user_id:
        example: 92f8dbbb0bccb3fff4b2e0e5cdb601
        type: string
      user_token:
        example: jt-w5IiOOnhuSp8hJbanB2Tluj_ShXphjAta0_6_mAcUPSbatjFRYr1m5Ojl4skSOZ3txbbkFWArnUnfNA==
        type: string
  timerdata:
    properties:
      description:
        description: Information about the timer
        example: My 10 second timer
        type: string
      disabled:
        description: Enable or disable timer
        example: true
        type: boolean
      frequency:
        description: Frequency (in seconds) between two consecutive invocations of a timer handler
        example: 10
        type: integer
      name:
        description: Timer label
        example: tenSecondTimer
        type: string
      repeats:
        description: The number of times a timer handler is invoked. To invoke the handler indefinitely set 'repeats = -1'
        example: 20
        type: integer
      service_name:
        description: The handler service invoked by the timer
        example: getTemps
        type: string
    required:
      - frequency
      - name
      - repeats
      - service_name
      - disabled
  triggerArray:
    items:
      $ref: "#/definitions/triggerList"
    type: array
  triggerList:
    properties:
      event_definition:
        $ref: "#/definitions/eventDefinition"
      key_value_pairs:
        example:
          topic: /CB/sensors/#
        type: object
      name:
        example: Message_Trigger
        type: string
      namespace:
        example: ""
        type: string
      service_name:
        example: TriggerHandler
        type: string
      system_key:
        example: ccafb4cf0bd0dcbcadaccaf9ebba01
        type: string
      system_secret:
        example: CCAFB4CF0BBABDDCE3F2F1E6C3E601
        type: string
  triggerdata:
    properties:
      def_module:
        example: Messaging
        type: string
      def_name:
        example: Publish
        type: string
      disabled:
        description: Enable or disable trigger
        example: true
        type: boolean
      key_value_pairs:
        $ref: "#/definitions/KVPs"
      service_name:
        example: updateTemps
        type: string
    required:
      - def_module
      - def_name
      - service_name
      - key_value_pairs
      - disabled
  updateCache:
    description: the information updated in a cache
    properties:
      description:
        type: string
      ttl:
        example: 30
        maxLength: 3600
        minLength: 30
        type: integer
    required:
      - ttl
  updateCollection:
    description: The information necessary to create a new column in a collection. There is also a deleteColumn option using the same info as addColumn
    properties:
      addColumn:
        $ref: "#/definitions/addColumnInfo"
      id:
        description: This is the collection ID
        example: c0f8e2c50bbeeafb87f5efa2eee301
        type: string
    required:
      - id
  updateDeployment:
    description: the information used to update a deployment
    properties:
      assets:
        description: Assets to be added and removed from deployment
        properties:
          add:
            items:
              $ref: "#/definitions/Assets"
            type: array
          remove:
            items:
              $ref: "#/definitions/Assets"
            type: array
        type: object
      edges:
        description: Edges to be added and removed from deployment
        properties:
          adds:
            description: Names of edges to be added to the deployment
            example:
              - edge1
              - edge2
              - edge3
            items:
              type: string
            type: array
          removes:
            description: Names of edges to be removed from the deployment
            example:
              - edge5
              - edge6
              - edge7
            items:
              type: string
            type: array
        type: object
    required:
      - assets
      - edges
  updateOwner:
    description: New system owner email
    properties:
      change:
        items:
          $ref: "#/definitions/Change"
      owner:
        example: owner@clearblade.com
        type: string
    required:
      - owner
      - change
  updatedata:
    properties:
      code:
        example: function rand(){log('rolling die'); return 3;}
        type: string
      dependencies:
        example: log
        type: string
      description:
        example: Random number generator
        type: string
    required:
      - description
      - dependencies
      - code
  userCheck:
    properties:
      is_authenticated:
        example: true
        type: boolean
  userSession:
    items:
      $ref: "#/definitions/userSessionInfo"
    type: array
  userSessionInfo:
    properties:
      issued:
        example: 1587659826
        type: integer
      user_id:
        example: 9aeeace602d2a6aaead2f62a
        type: string
  userdata:
    properties:
      column_name:
        example: column_value
        type: string
  userinfo:
    description: User information
    properties:
      admin:
        example: true
        type: boolean
      creation_date:
        example: 1551475825
        type: integer
      email:
        example: example@clearblade.com
        type: string
      email_validated:
        example: true
        type: boolean
      fname:
        example: FirstName
        type: string
      last_login:
        example: 1551475825
        type: integer
      lname:
        example: LastName
        type: string
      org:
        example: CompanyName
        type: string
      phone:
        example: "+15120000000"
        type: string
      phone_validated:
        example: true
        type: boolean
      two_factor_enabled:
        example: true
        type: boolean
      two_factor_enabled_instance":
        example: true
        type: boolean
      two_factor_method:
        example: email
        type: string
      userid:
        example: e291cdc70be288c3af01
        type: string
  userlogin:
    description: user login information
    properties:
      email:
        example: helpme@clearblade.com
        type: string
      password:
        example: c13rb1ad3ru13z
        type: string
    required:
      - email
      - password
  userregdata:
    description: The information to be used for user registration. Custom fields may be added.
    properties:
      email:
        description: User's email.
        example: cbman@clearblade.com
        type: string
      password:
        description: User's password.
        example: cl34rbl4d3
        type: string
    required:
      - email
      - password
  users:
    properties:
      PAGENUM:
        example: 1
        type: integer
      PAGESIZE:
        default: 100
        type: integer
      SORT:
        items:
          $ref: "#/definitions/SortUser"
        minLength: 0
        type: array
    type: object
  validation:
    properties:
      type:
        example: email
        type: string
  webhookCreate:
    description: Webhook creation properties
    properties:
      auth_method:
        example: http_basic_auth
        type: string
      description:
        example: Create a webhook
        type: string
      name:
        example: webhook_example
        type: string
      service_name:
        example: service_example
        type: string
    required:
      - auth_method
      - name
      - service_name
    type: object
  webhookResp:
    description: list of webhooks and properties
    items:
      $ref: "#/definitions/getWebhook"
    type: array
  webhookUpdate:
    description: Webhook update properties
    properties:
      auth_method:
        example: http_basic_auth
        type: string
      description:
        example: Create a webhook
        type: string
    required:
      - auth_method
    type: object
