...
Open api |
---|
openapi: 3.0.0 info: version: '3.0' title: ClearBlade APIs description: APIs to interact with a ClearBlade Platform. Each API's Try it out feature sends requests to https://platform.clearblade.com. contact: email: support@clearblade.com host: platform.clearblade.com basePath: / schemes: - https tags: - name: 2FA description: Two-factor authentication interactions - name: Adapter description: Adapter configuration and management - name: Admin description: Admin developer operations - name: Audit description: Developer audit trail interactions - name: Code description: Code service interactions - name: Data description: Data collection interactions - name: Databases description: External database connection interactions - name: Deployments description: Deployment CRUD operations - name: Developer description: Developer operations - name: Device description: Device authentication and management - name: Edge description: Edge interactions - name: Files description: File management interactions - name: Handlers description: Trigger and timer interactions - name: Hypertable description: Hypertable operations - name: Messaging description: MQTT messaging and push notifications - name: mTLS description: mTLS operations - name: Session description: User and device session interactions - name: Shared cache description: Shared cache interactions - name: User description: User authentication and management - name: Webhooks description: Webhook interactions paths: /admin/revoked_certs: get: summary: tags: - mTLS operationId: getRevokedCerts parameters: - in: query name: query schema: type: string description: Query to filter revoked certificates responses: '200': description: A list of revoked certificates content: application/json: schema: type: array items: type: object properties: id: type: string description: The certificate ID example: <id1> certificate_hash: type: string description: Base64 encoded SHA256 hash of the certificate's ASN.1 DER format example: <certificate1_hash> timestamp: type: string description: The timestamp when the certificate was issued. example: <timestamp1> post: summary: tags: - mTLS operationId: revokeCert requestBody: required: true content: application/json: schema: type: object properties: certificate_hash: type: string description: Base64 encoded SHA256 hash of the certificate's ASN.1 DER format example: Base64 encoded SHA256 hash of the certificate's ASN.1 DER format responses: '200': description: Returns nil on success delete: summary: tags: - mTLS operationId: deleteRevokedCerts parameters: - in: query name: query schema: type: string description: Query to filter revoked certificates to delete responses: '200': description: Returns nil on success /admin/settings/mtls: get: summary: tags: - mTLS responses: '200': description: The latest mTLS settings content: application/json: schema: type: object properties: root_ca: type: string description: Certificate in PEM format crl: type: string description: Certificate revocation list in PEM format put: summary: tags: - mTLS requestBody: required: true content: application/json: schema: type: object properties: root_ca: type: string description: Certificate in PEM format. Required. crl: type: string description: Certificate revocation list in PEM format. Optional. responses: '200': description: mTLS settings updated successfully delete: summary: tags: - mTLS responses: '200': description: mTLS settings deleted successfully /api/v/4/collection/{systemKey}/{collectionName}/hypertable: post: summary: tags: - Hypertable description: This method requires the hypertable properties in the body. parameters: - in: header description: Token obtained through user authentication. User token or dev token are required fields name: ClearBlade-UserToken required: false type: string - in: header description: Token obtained through dev authentication. Dev token or user token are required fields name: ClearBlade-DevToken required: false type: string requestBody: required: true content: application/json: schema: type: object properties: time_column: type: string example: "create_date" chunk_time_interval: type: object properties: interval_string: type: string example: "7 days" migrate_data: type: boolean example: false data_retention_policy: type: object properties: interval_string: type: string example: "1 month" responses: '200': description: The collection was successfully converted to a hypertable. '400': description: The request body is missing or invalid. '500': description: An error occurred while converting the collection to a hypertable. put: summary: tags: - Hypertable description: This method can update one or both of the chunk_time_interval and data_retention_policy properties. If updating both, the PUT body needs both in the object or just one if updating one property. parameters: - in: header description: Token obtained through user authentication. User token or dev token are required fields name: ClearBlade-UserToken required: false type: string - in: header description: Token obtained through dev authentication. Dev token or user token are required fields name: ClearBlade-DevToken required: false type: string requestBody: required: true content: application/json: schema: type: object properties: chunk_time_interval: type: object properties: interval_string: type: string data_retention_policy: type: object properties: interval_string: type: string responses: '200': description: The hypertable properties were successfully updated. '400': description: The request body is missing or invalid. '500': description: An error occurred while updating the hypertable properties. delete: summary: tags: - Hypertable description: This method requires the older_than parameter and optionally the newer_than parameter in the DELETE body. parameters: - in: header description: Token obtained through user authentication. User token or dev token are required fields name: ClearBlade-UserToken required: false type: string - in: header description: Token obtained through dev authentication. Dev token or user token are required fields name: ClearBlade-DevToken required: false type: string requestBody: required: true content: application/json: schema: type: object properties: older_than: type: object properties: interval_string: type: string newer_than: type: object properties: interval_string: type: string responses: '200': description: The chunks of data were successfully dropped from the hypertable. '400': description: The request body is missing or invalid. '500': description: An error occurred while dropping chunks of data from the hypertable. /api/v/1/user: get: operationId: GetUsers summary: description: Returns all user info the current user is authorized to see tags: - User parameters: - in: header description: Token obtained through user authentication name: ClearBlade-UserToken required: true type: string - in: query description: Query object used to filter the user list. See the [REST API query schema](https://docs.clearblade.com/iotenterprise/rest-api-query-schema) for an example. name: query required: false type: string produces: - application/json responses: '200': description: A list of users schema: $ref: '#/definitions/getUsersSuccess' '400': description: Invalid user token. The user is not authenticated or the token is malformed. schema: $ref: '#/definitions/ErrorResp' '403': description: Forbidden schema: $ref: '#/definitions/ErrorResp' '/api/v/4/user/manage': put: operationId: ChangeUserInfo summary: description: Users change other users' roles and passwords tags: - User produces: - application/json parameters: - in: header description: Token obtained through user authentication name: ClearBlade-UserToken required: true type: string - in: body description: Roles to change for the user name: body required: true schema: $ref: '#/definitions/rolespass' responses: '200': description: User's roles and passwords successfully changed '400': description: Bad request '500': description: Internal server error '/api/v/4/{SystemKey}/adapters': get: operationId: GetAdapters summary: description: Returns all device info the current user is authorized to see tags: - Adapter produces: - application/json parameters: - in: path description: System key that identifies the system the adapter is a part of name: SystemKey required: true type: string - in: header description: Dev token obtained through authentication. Dev token or user token are required fields name: ClearBlade-DevToken required: false type: string - in: header description: User token obtained through authentication. User token or dev token are required fields name: ClearBlade-UserToken required: false type: string responses: '200': description: Adapter list '400': description: Bad request '401': description: User cannot access resource post: operationId: addAdapter summary: description: Adds an adapter to the system tags: - Adapter produces: - application/json parameters: - in: path description: System key that identifies the system the adapter is a part of name: SystemKey required: true type: string - in: header description: Dev token obtained through authentication. Dev token or user token are required fields name: ClearBlade-DevToken required: false type: string - in: header description: User token obtained through authentication. User token or dev token are required fields name: ClearBlade-UserToken required: false type: string - in: body description: Information to create an adapter name: body required: true schema: $ref: '#/definitions/addAdapter' responses: '200': description: Dev authenticated '400': description: Bad request '401': description: Unauthorized '500': description: Server error '/api/v/4/{SystemKey}/adapters/{AdapterName}/files': get: operationId: AdapterConfig summary: description: Lists configuration information for all adapter file versions tags: - Adapter produces: - application/json parameters: - in: path description: Identifies an adapter in the system name: AdapterName required: true type: string - in: path description: System key that identifies the system the adapter is a part of name: SystemKey required: true type: string - in: header description: Dev token obtained through authentication name: ClearBlade-DevToken required: true type: string responses: '200': description: Configuration page appears '400': description: Bad request '401': description: Unauthorized '500': description: Internal server error post: operationId: updateFileInfo summary: description: Create a new file with content and configuration or replace an existing file's content and configuration tags: - Adapter produces: - application/json parameters: - in: path description: System key that identifies the system the adapter is a part of name: SystemKey required: true type: string - in: path description: Identifies an adapter in the system name: AdapterName required: true type: string - in: header description: Dev token obtained through authentication name: ClearBlade-DevToken required: true type: string - in: body description: Information about the file that was added name: body required: true schema: $ref: '#/definitions/AdapterFileConfig' responses: '200': description: Dev authenticated '400': description: Bad request '401': description: Unauthorized '500': description: Server error '/api/v/4/{SystemKey}/adapters/{AdapterName}': put: operationId: MapAdapterCommand summary: description: Adds a command to the adapter's configuration section tags: - Adapter produces: - application/json parameters: - in: path description: System key that identifies the system the adapter is a part of name: SystemKey required: true type: string - in: path description: Identifies a system adapter name: AdapterName required: true type: string - in: header description: Dev token obtained through authentication. Dev token or user token are required fields name: ClearBlade-DevToken required: false type: string - in: body - in: header description: User token obtained through authentication. User token or dev token are required fields name: ClearBlade-UserToken required: false type: string - in: body description: Updated adapter information name: body required: true schema: $ref: '#/definitions/MapAdapterCommand' responses: '200': description: Command has been added '400': description: Bad request '401': description: Unauthorized '500': description: Server error delete: operationId: DeleteAdapter summary: description: Deletes the adapter tags: - Adapter produces: - application/json parameters: - in: path description: System key that identifies the system the device is a part of name: SystemKey required: true type: string - in: header description: Developer token obtained through authentication. Dev token or user token are required fields name: ClearBlade-DevToken required: false type: string - in: header description: User token obtained through authentication. User token or dev token are required fields name: ClearBlade-UserToken required: false type: string - in: path description: Identifies an adapter in the system name: AdapterName required: true type: string responses: '200': description: No response or unknown response type '400': description: Bad request '/api/v/4/{SystemKey}/adapters/{AdapterName}/files/{fileName}': get: operationId: FileDownload summary: description: Downloads file from the adapter's command to the computer. tags: - Adapter produces: - application/json parameters: - in: path description: Identifies an adapter in the system name: AdapterName required: true type: string - in: path description: System key that identifies the system the adapter is a part of name: SystemKey required: true type: string - in: path description: Identifies the adapter's file name: fileName required: true type: string - in: header description: Dev token obtained through authentication name: ClearBlade-DevToken required: true type: string responses: '200': description: The file is downloaded onto the computer. '400': description: Bad request delete: operationId: DeleteFile summary: description: Deletes a command's adapter files tags: - Adapter produces: - application/json parameters: - in: path description: System key that identifies the system the device is a part of name: SystemKey required: true type: string - in: header description: Developer token obtained through authentication name: ClearBlade-DevToken required: true type: string - in: path description: Identifies an adapter in the system name: AdapterName required: true type: string - in: path description: Identifies the adapter's file name: fileName required: true type: string responses: '200': description: No response or unknown response type '400': description: Bad request '500': description: Internal server error put: operationId: updateExistingFileContent summary: description: Update the existing file's content tags: - Adapter produces: - application/json parameters: - in: path description: System key that identifies the system the adapter is a part of name: SystemKey required: true type: string - in: path description: Identifies an adapter in the system name: AdapterName required: true type: string - in: path description: Identifies the adapter's file name: fileName required: true type: string - in: header description: Dev token obtained through authentication name: ClearBlade-DevToken required: true type: string - in: body description: Information about the file that was added name: body required: true schema: properties: file: type: string description: base64 encoded string file content to overwrite the existing content example: "IyEvYmluL2Jhc2gKZWNobyAiaGVsbG8gd29ybGQi" required: - file responses: '200': description: Returns the updated file's config and content '400': description: Bad request '401': description: Unauthorized '500': description: Server error '/api/v/4/{SystemKey}/adapters/{AdapterName}/control': put: operationId: AddEdgeCommand summary: description: Commands with files will send data to an edge. tags: - Adapter produces: - application/json parameters: - in: path description: System key that identifies the system the adapter is a part of name: SystemKey required: true type: string - in: path description: Identifies an adapter in the system name: AdapterName required: true type: string - in: header description: Dev token obtained through authentication name: ClearBlade-DevToken required: true type: string - in: body description: Updated user information name: body required: true schema: $ref: '#/definitions/edgeCommand' responses: '200': description: The edge command is working. '400': description: Bad request '401': description: Unauthorized '500': description: Server error /api/v/1/user/reg: post: operationId: RegUser summary: description: Registers a new user in the specified system and returns a user token for them tags: - User produces: - application/json parameters: - in: header description: System key that identifies the system you're adding the user to name: ClearBlade-SystemKey required: true type: string - in: header description: System secret that ensures authenticity name: ClearBlade-SystemSecret required: true type: string - in: header description: Token obtained through user authentication name: ClearBlade-UserToken required: true type: string - in: body description: User registration information name: body required: true schema: $ref: '#/definitions/userregdata' 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 /api/v/1/user/auth: post: operationId: AuthUser summary: description: | ## Description Logs the user into the system and returns a user token ## Endpoint body values Here are the body values for the two scenarios. ### Basic auth Required keys - usernameemail - password Example ```json { "usernameemail":"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" } ``` tags: - User produces: - application/json parameters: - in: header description: System key that identifies the system you're logging the user into name: ClearBlade-SystemKey required: true type: string - in: header description: System secret that ensures authenticity name: ClearBlade-SystemSecret required: true type: string - in: body description: User credentials name: body required: true schema: $ref: '#/definitions/authdata' 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 /api/v/1/user/anon: post: operationId: AuthAnon summary: description: Logs an anonymous user into the specified system and returns a user token tags: - User produces: - application/json parameters: - in: header description: System key that identifies the system you're logging the user into name: ClearBlade-SystemKey required: true type: string - in: header description: System secret that ensures authenticity name: ClearBlade-SystemSecret required: true type: string 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' /api/v/1/user/checkauth: post: operationId: UserCheckAuth summary: description: Checks if the current user's token is valid tags: - User produces: - application/json parameters: - in: header description: System key that identifies the system the user might be logged into name: ClearBlade-SystemKey required: true type: string - in: header description: User token obtained through previous authentication name: ClearBlade-UserToken required: true type: string responses: '200': description: User is authenticated with the specified system schema: $ref: '#/definitions/userCheck' '400': description: User is not authenticated with the specified system '401': description: Unauthorized '500': description: Server error /api/v/1/user/logout: post: operationId: UserLogout summary: description: Logs the current user out of the specified system and invalidates their user token tags: - User produces: - application/json parameters: - in: header description: Token obtained through user authentication name: ClearBlade-UserToken required: true type: string 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' /api/v/1/user/info: get: operationId: GetUserInfo summary: description: Returns the current user's information tags: - User produces: - application/json parameters: - in: header description: Token obtained through user authentication name: ClearBlade-UserToken required: true type: string 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' put: operationId: UpdateUserInfo summary: description: Updates the current user's information tags: - User produces: - application/json parameters: - in: header description: Token obtained through user authentication name: ClearBlade-UserToken required: true type: string - in: body description: Updated user information name: body required: true schema: $ref: '#/definitions/userdata' 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' delete: operationId: DeleteUserAsUser tags: - User produces: - application/json parameters: - in: header description: Token obtained through user authentication 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' summary: description: This endpoint allows the user to delete another user if they have Delete User operation permissions in Roles settings. responses: '200': description: Successfully deleted user. No response returned. '400': description: Bad request schema: $ref: '#/definitions/ErrorResp' /api/v/1/user/pass: put: operationId: UpdateUserPass summary: description: Changes a user's password tags: - User produces: - application/json parameters: - in: header description: Token obtained through user authentication name: ClearBlade-UserToken required: true type: string - in: body description: Password change information name: body required: true schema: $ref: '#/definitions/passdata' 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' '/api/v/2/devices/{systemKey}/{name}': put: operationId: UpdateDeviceInfo summary: description: Updates a device's state or custom attributes tags: - Device produces: - application/json parameters: - in: header description: Token obtained through user authentication. User token or dev token are required fields name: ClearBlade-UserToken required: false type: string - in: header description: Token obtained through dev authentication. Dev token or user token are required fields name: ClearBlade-DevToken required: false type: string - in: path description: System key that identifies the system the device is a part of name: systemKey required: true type: string - in: path description: Device name name: name required: true type: string - in: body description: Updated device info name: body required: true schema: $ref: '#/definitions/deviceUserUpdate' responses: '200': description: Device updated schema: $ref: '#/definitions/deviceUpdate' '400': description: Bad request schema: $ref: '#/definitions/ErrorResp' '401': description: Unauthorized '500': description: Server error post: operationId: AddDevice summary: description: Adds a device to the system tags: - Device produces: - application/json parameters: - in: header description: Token obtained through user authentication. User token or dev token are required fields name: ClearBlade-UserToken required: false type: string - in: header description: Token obtained through dev authentication. Dev token or user token are required fields name: ClearBlade-DevToken required: false type: string - in: path description: System key that identifies the system the device is a part of name: systemKey required: true type: string - in: path description: Device name name: name required: true type: string - in: body description: Add device info name: body required: true schema: $ref: '#/definitions/deviceAdd' 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 '/api/v/2/devices/{SystemKey}/auth': post: operationId: AuthDevice summary: description: | ## Description Logs device into the system and returns a 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" } ``` tags: - Device produces: - application/json parameters: - in: path description: System key that identifies the system the device is a part of name: SystemKey required: true type: string - in: body description: Device credentials name: body required: true schema: $ref: '#/definitions/deviceAuthdata' 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' '/api/v/2/devices/{SystemKey}': get: operationId: GetDevices summary: description: Returns all device info the current user is authorized to see tags: - Device produces: - application/json parameters: - in: path description: System key that identifies the system the device is a part of name: SystemKey required: true type: string - in: header description: Token obtained through user authentication. User token or dev token are required fields name: ClearBlade-UserToken required: false type: string - in: header description: Token obtained through dev authentication. Dev token or user token are required fields name: ClearBlade-DevToken required: false type: string - in: query description: Tags to filter devices by. See the [REST API query schema](https://docs.clearblade.com/iotenterprise/rest-api-query-schema) for an example. name: query required: false type: string responses: '200': description: A device list schema: $ref: '#/definitions/deviceUpdate' '400': description: Bad request schema: $ref: '#/definitions/ErrorResp' put: operationId: UpdateDevices summary: description: Updates all devices matching the filters specified by a query tags: - Device produces: - application/json parameters: - in: path description: System key that identifies the system the device is a part of name: SystemKey required: true type: string - in: header description: Token obtained through user authentication. User token or dev token are required fields name: ClearBlade-UserToken required: false type: string - in: header description: Token obtained through dev authentication. Dev token or user token are required fields name: ClearBlade-DevToken required: false type: string - in: body description: Limits the update scope's new data values name: payload required: true schema: $ref: '#/definitions/PutQuery' responses: '200': description: A JSON object representing the SQL result set containing the affected device list schema: $ref: '#/definitions/QueryResultSet' '400': description: Bad request schema: $ref: '#/definitions/ErrorResp' delete: operationId: DeleteDevices summary: description: Deletes all devices matching the filters specified by a query tags: - Device produces: - application/json parameters: - in: path description: System key that identifies the system the device is a part of name: SystemKey required: true type: string - in: header description: Token obtained through user authentication. User token or dev token are required fields name: ClearBlade-UserToken required: false type: string - in: header description: Token obtained through dev authentication. Dev token or user token are required fields name: ClearBlade-DevToken required: false type: string - in: query description: Tags to filter devices by. See the [REST API query schema](https://docs.clearblade.com/iotenterprise/rest-api-query-schema) for an example. name: query required: true type: string responses: '200': description: Successfully deleted devices '400': description: Bad request schema: $ref: '#/definitions/ErrorResp' '/api/v/3/devices/{systemKey}/count': get: operationId: GetDeviceCount summary: description: Returns a system's total number of devices tags: - Device produces: - application/json parameters: - in: header description: Token obtained through user authentication. User token or dev token are required fields name: ClearBlade-UserToken required: false type: string - in: header description: Token obtained through dev authentication. Dev token or user token are required fields name: ClearBlade-DevToken required: false type: string - in: path description: System key that identifies the system that holds the devices name: systemKey required: true type: string responses: '200': description: Returns an object containing a system's count of devices schema: $ref: '#/definitions/count' '400': description: Bad request schema: $ref: '#/definitions/ErrorResp' '/api/v/3/devices/{systemKey}/columns': get: operationId: GetDeviceTableSchema summary: description: Returns the columns and their data type for a system's device table tags: - Device produces: - application/json parameters: - in: header description: Token obtained through user authentication. User token or dev token are required fields name: ClearBlade-UserToken required: false type: string - in: header description: Token obtained through dev authentication. Dev token or user token are required fields name: ClearBlade-DevToken required: false type: string - in: path description: System key that identifies the system that holds the devices name: systemKey required: true type: string responses: '200': description: Returns a list of columns and data types for a system's device tables schema: $ref: '#/definitions/columnSuccess' '400': description: Bad request schema: $ref: '#/definitions/ErrorResp' '/api/v/4/devices/{systemKey}/connections': get: operationId: GetConnectedDeviceList summary: description: Returns the list of connected devices tags: - Device produces: - application/json parameters: - in: header description: User token obtained through authentication. User token or dev token are required fields name: ClearBlade-UserToken required: false type: string - in: header description: Dev token obtained through authentication. Dev token or user token are required fields name: ClearBlade-DevToken required: false type: string - in: path description: System key that identifies the system that holds the devices name: systemKey required: true type: string responses: '200': description: Returns a list of connected devices schema: $ref: '#/definitions/connectedDevice' '400': description: Bad request schema: $ref: '#/definitions/ErrorResp' '/api/v/4/devices/{systemKey}/connections/{name}': get: operationId: GetConnectedDeviceInfo summary: description: Returns the device's connection information tags: - Device produces: - application/json parameters: - in: header description: Token obtained through user authentication. User token or dev token are required fields name: ClearBlade-UserToken required: false type: string - in: header description: Token obtained through dev authentication. Dev token or user token are required fields name: ClearBlade-DevToken required: false type: string - in: path description: System key that identifies the system that holds the devices name: systemKey required: true type: string - in: path description: The connected device's name name: name required: true type: string responses: '200': description: Returns a list of connected devices schema: $ref: '#/definitions/connectedDeviceInfo' '400': description: Bad request schema: $ref: '#/definitions/ErrorResp' '/api/v/4/devices/{systemKey}/connectioncount': get: operationId: ConnectedDeviceCount summary: description: Returns the number of device connections tags: - Device produces: - application/json parameters: - in: header description: Token obtained through user authentication. User token or dev token are required fields name: ClearBlade-UserToken required: false type: string - in: header description: Token obtained through dev authentication. Dev token or user token are required fields name: ClearBlade-DevToken required: false type: string - in: path description: System key that identifies the system that holds the devices name: systemKey required: true type: string responses: '200': description: Returns a list of connected devices schema: $ref: '#/definitions/connectedDeviceCount' '400': description: Bad request schema: $ref: '#/definitions/ErrorResp' '/api/v/1/collection/{systemKey}/{collectionName}': get: operationId: GetCollectionData summary: description: Returns the specified collection's data tags: - Data produces: - application/json parameters: - in: header description: Token obtained through user authentication. User token or dev token are required fields name: ClearBlade-UserToken required: false type: string - in: header description: Token obtained through dev authentication. Dev token or user token are required fields name: ClearBlade-DevToken required: false type: string - in: path description: System key that identifies the system that holds the collection name: systemKey required: true type: string - in: path description: The collection's name name: collectionName required: true type: string - in: query description: Query object used to filter the items. See the [REST API query schema](https://docs.clearblade.com/iotenterprise/rest-api-query-schema) for an example. name: query required: false type: string 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' put: operationId: UpdateCollectionData summary: description: Updates preexisting data rows in the specified collection tags: - Data produces: - application/json parameters: - in: header description: Token obtained through user authentication. User token or dev token are required fields name: ClearBlade-UserToken required: false type: string - in: header description: Token obtained through dev authentication. Dev token or user token are required fields name: ClearBlade-DevToken required: false type: string - in: path description: System key that identifies the system that holds the collection name: systemKey required: true type: string - in: path description: The collection's name name: collectionName required: true type: string - in: body description: Limits the update's scope and new data values name: payload required: true schema: $ref: '#/definitions/DataPut' responses: '200': description: Items successfully updated schema: $ref: '#/definitions/count' '400': description: Bad request schema: $ref: '#/definitions/ErrorResp' post: operationId: CreateCollectionData summary: description: Creates new data rows in the specified collection tags: - Data produces: - application/json parameters: - in: header description: Token obtained through user authentication. User token or dev token are required fields name: ClearBlade-UserToken required: false type: string - in: header description: Token obtained through dev authentication. Dev token or user token are required fields name: ClearBlade-DevToken required: false type: string - in: path description: System key that identifies the system that holds the collection name: systemKey required: true type: string - in: path description: The collection's name name: collectionName required: true type: string - in: body 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. name: payload schema: $ref: '#/definitions/ColumnField' responses: '200': description: Items successfully created schema: $ref: '#/definitions/ColumnField' '400': description: Bad request schema: $ref: '#/definitions/ErrorResp' delete: operationId: DeleteCollectionData summary: description: Deletes data rows in the specified collection tags: - Data produces: - application/json parameters: - in: header description: Token obtained through user authentication. User token or dev token are required fields name: ClearBlade-UserToken required: false type: string - in: header description: Token obtained through dev authentication. Dev token or user token are required fields name: ClearBlade-DevToken required: false type: string - in: path description: System key that identifies the system that holds the collection name: systemKey required: true type: string - in: path description: The collection's name name: collectionName required: true type: string - in: query description: Limits the deletion scope name: query required: true type: string responses: '200': description: Rows successfully deleted schema: $ref: '#/definitions/count' '400': description: Bad request schema: $ref: '#/definitions/ErrorResp' '/api/v/1/data/{collectionID}': get: operationId: GetCollectionDataAlt summary: description: Returns the specified collection's data tags: - Data produces: - application/json parameters: - in: header description: Token obtained through user authentication. User token or dev token are required fields name: ClearBlade-UserToken required: false type: string - in: header description: Token obtained through dev authentication. Dev token or user token are required fields name: ClearBlade-DevToken required: false type: string - in: path description: The collection ID name: collectionID required: true type: string - in: query description: Query object used to filter the items. See the [REST API query schema](https://docs.clearblade.com/iotenterprise/rest-api-query-schema) for an example. name: query required: false type: string 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' put: operationId: UpdateCollectionDataAlt summary: description: Updates preexisting data rows in the specified collection tags: - Data produces: - application/json parameters: - in: header description: Token obtained through user authentication. User token or dev token are required fields name: ClearBlade-UserToken required: false type: string - in: header description: Token obtained through dev authentication. Dev token or user token are required fields name: ClearBlade-DevToken required: false type: string - in: path description: The collection ID name: collectionID required: true type: string - in: body description: Limits the update's scope and new data values name: payload required: true schema: $ref: '#/definitions/DataPut' responses: '200': description: Items successfully updated schema: $ref: '#/definitions/count' '400': description: Bad request schema: $ref: '#/definitions/ErrorResp' post: operationId: CreateCollectionDataAlt summary: description: Creates new data rows in the specified collection tags: - Data produces: - application/json parameters: - in: header description: Token obtained through user authentication. User token or dev token are required fields name: ClearBlade-UserToken required: false type: string - in: header description: Token obtained through dev authentication. Dev token or user token are required fields name: ClearBlade-DevToken required: false type: string - in: path description: The collection ID name: collectionID required: true type: string - in: body 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. name: payload required: true schema: $ref: '#/definitions/ColumnField' responses: '200': description: Items successfully created schema: $ref: '#/definitions/ColumnField' '400': description: Bad request schema: $ref: '#/definitions/ErrorResp' delete: operationId: DeleteCollectionDataAlt summary: description: Deletes data rows in the specified collection tags: - Data produces: - application/json parameters: - in: header description: Token obtained through user authentication. User token or dev token are required fields name: ClearBlade-UserToken required: false type: string - in: header description: Token obtained through dev authentication. Dev token or user token are required fields name: ClearBlade-DevToken required: false type: string - in: path description: The collection ID name: collectionID required: true type: string - in: query description: Limits the deletion scope name: query required: true type: string responses: '200': description: Rows successfully deleted schema: $ref: '#/definitions/count' '400': description: Bad request schema: $ref: '#/definitions/ErrorResp' '/api/v/1/data/{collectionID}/columns': get: operationId: GetColumns summary: description: Returns the columns and their data type for the specified collection tags: - Data produces: - application/json parameters: - in: header description: Token obtained through user authentication. User token or dev token are required fields name: ClearBlade-UserToken required: false type: string - in: header description: Token obtained through dev authentication. Dev token or user token are required fields name: ClearBlade-DevToken required: false type: string - in: path description: The collection ID name: collectionID required: true type: string - in: header description: System key that identifies the system that holds the collection name: ClearBlade-SystemKey required: true type: string - in: header description: Header parameter to ensure authenticity name: ClearBlade-SystemSecret required: true type: string responses: '200': description: No response was specified schema: $ref: '#/definitions/columnSuccess' '400': description: Invalid status value schema: $ref: '#/definitions/ErrorResp' /api/v/3/collectionmanagement: post: operationId: CreateCollection summary: description: Creates a new collection or database connection in the specified system tags: - Data produces: - application/json parameters: - in: header description: Token obtained through user authentication. User token or dev token are required fields name: ClearBlade-UserToken required: false type: string - in: header description: Token obtained through dev authentication. Dev token or user token are required fields name: ClearBlade-DevToken required: false type: string - in: header description: System key that identifies the system you're adding the user to name: ClearBlade-SystemKey required: true type: string - in: body description: The new collection's configuration info name: Collection info required: true schema: $ref: '#/definitions/newcollection' responses: '200': description: The collection was successfully created schema: $ref: '#/definitions/newcollection' '400': description: Invalid status value schema: $ref: '#/definitions/ErrorResp' put: operationId: UpdateCollection summary: description: Creates or deletes a column within an existing collection or updates an existing database connection in the specified system tags: - Data produces: - application/json parameters: - in: header description: Token obtained through user authentication. User token or dev token are required fields name: ClearBlade-UserToken required: false type: string - in: header description: Token obtained through dev authentication. Dev token or user token are required fields name: ClearBlade-DevToken required: false type: string - in: header description: System key that identifies the system you're adding the user to name: ClearBlade-SystemKey required: true type: string - in: body description: Updated collection information name: body required: false schema: $ref: '#/definitions/updateCollection' responses: '200': description: The collection was successfully updated. There is no response. delete: operationId: DeleteCollection summary: description: Deletes an existing collection in the specified system. tags: - Data produces: - application/json parameters: - in: header description: Token obtained through user authentication. User token or dev token are required fields name: ClearBlade-UserToken required: false type: string - in: header description: Token obtained through dev authentication. Dev token or user token are required fields name: ClearBlade-DevToken required: false type: string - in: header description: System key that identifies the system you're adding the user to name: ClearBlade-SystemKey required: true type: string - in: query description: ID that identifies the collection to be deleted name: id required: true type: string responses: '200': description: The collection was successfully deleted. There is no response. '/api/v/3/allcollections/{systemKey}': get: operationId: GetCollections summary: description: Returns the specified system's collections tags: - Data produces: - application/json parameters: - in: header description: Token obtained through user authentication. User token or dev token are required fields name: ClearBlade-UserToken required: false type: string - in: header description: Token obtained through dev authentication. Dev token or user token are required fields name: ClearBlade-DevToken required: false type: string - in: path description: System key that identifies the system the device is a part of name: systemKey required: true type: string responses: '200': description: A list of collections in the specified system schema: $ref: '#/definitions/allCollectionsSuccess' '/api/v/4/data/{systemKey}/{collectionName}/upsert': put: operationId: UpdateUpsert summary: description: This adds an insert (if the row does not exist) or an update (if the row exists). tags: - Data produces: - application/json parameters: - in: header description: Dev token obtained through dev authentication name: ClearBlade-DevToken required: true type: string - in: path description: System key that identifies the system you're adding the user to name: systemKey required: true type: string - in: path description: The collection's name name: collectionName required: true type: string - in: query description: A column in your table with a unique constraint. `columnName` can be used. name: conflictColumn required: true type: string responses: '200': description: Upsert was successfully updated '400': description: Invalid status value schema: $ref: '#/definitions/ErrorResp' '/api/v/4/data/{systemKey}/{collectionName}/index': post: operationId: CreateNonUniqueIndex summary: description: This creates a non-unique index on a column. This speeds up certain queries, but it doesn't work with upsert. This call will fail if the index already exists. tags: - Data produces: - application/json parameters: - in: header description: Dev token obtained through dev authentication name: ClearBlade-DevToken required: true type: string - in: path description: System key that identifies the system you're adding the user to name: systemKey required: true type: string - in: path description: The collection's name name: collectionName required: true type: string - in: query description: <COLUMN TO INDEX> name: columnName required: true type: string responses: '200': description: The column is successfully indexed. schema: $ref: '#/definitions/SuccessResp' '400': description: Invalid status value schema: $ref: '#/definitions/ErrorResp' delete: operationId: DeleteNonUniqueIndex summary: description: This deletes a non-unique index from a column. tags: - Data produces: - application/json parameters: - in: header description: Dev token obtained through dev authentication name: ClearBlade-DevToken required: true type: string - in: path description: System key that identifies the system you're adding the user to name: systemKey required: true type: string - in: path description: The collection's name name: collectionName required: true type: string - in: query description: <COLUMN TO INDEX> name: columnName required: true type: string responses: '200': description: The index was successfully deleted. schema: $ref: '#/definitions/SuccessResp' '/api/v/4/data/{systemKey}/{collectionName}/uniqueindex': post: operationId: CreateUniqueIndex summary: 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. tags: - Data produces: - application/json parameters: - in: header description: Dev token obtained through dev authentication name: ClearBlade-DevToken required: true type: string - in: path description: System key that identifies the system you're adding the user to name: systemKey required: true type: string - in: path description: The collection's name name: collectionName required: true type: string - in: query description: <COLUMN TO INDEX> name: columnName required: true type: string responses: '200': description: The column is successfully indexed. schema: $ref: '#/definitions/SuccessResp' '400': description: Bad request schema: $ref: '#/definitions/ErrorResp' delete: operationId: DeleteUniqueIndex summary: description: This deletes a unique index on a column. tags: - Data produces: - application/json parameters: - in: header description: Dev token obtained through dev authentication name: ClearBlade-DevToken required: true type: string - in: path description: System key that identifies the system you're adding the user to name: systemKey required: true type: string - in: path description: The collection's name name: collectionName required: true type: string - in: query description: <COLUMN TO INDEX> name: columnName required: true type: string responses: '200': description: The unique index was successfully deleted. schema: $ref: '#/definitions/SuccessResp' '400': description: Bad request schema: $ref: '#/definitions/ErrorResp' '401': description: Unauthorized '/api/v/4/data/{systemKey}/{collectionName}/listindexes': get: operationId: GetIndexes summary: description: This returns the collection's user-created indexes/constraints. For safety, primary key indexes are not returned. tags: - Data produces: - application/json parameters: - in: header description: Dev token obtained through authentication name: ClearBlade-DevToken required: true type: string - in: path description: System key that identifies the system name: systemKey required: true type: string - in: path description: The collection's name name: collectionName required: true type: string 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 '/admin/database/status': get: operationId: GetDatabaseStatus summary: description: Returns all the names and internal and external database statuses tags: - Databases 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": {} ``` | '/api/v/4/external-db/{systemKey}': get: operationId: GetAllExternalDB summary: description: Returns all the names and database types of the external database connections for that system. This is a developer-only endpoint. tags: - Databases produces: - application/json parameters: - in: header description: Dev token obtained through authentication. Dev token or user token are required fields name: ClearBlade-DevToken required: false type: string - in: header description: User token obtained through authentication. User token or dev token are required fields name: ClearBlade-UserToken required: false type: string - in: path description: System key that identifies the system name: systemKey required: true type: string 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 post: operationId: CreateExternalDB summary: description: | ## Description: Creates an external database connection 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 external database name| |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 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 using the 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| tags: - Databases produces: - application/json parameters: - in: header description: Dev token obtained through authentication. Dev token or user token are required fields name: ClearBlade-DevToken required: false type: string - in: header description: User token obtained through authentication. User token or dev token are required fields name: ClearBlade-UserToken required: false type: string - in: path description: System key that identifies the system name: systemKey required: true type: string - in: body description: External database connection credentials name: body schema: $ref: '#/definitions/createDatabase' 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 '/api/v/4/external-db/{systemKey}/{name}': get: operationId: GetExternalDB summary: description: Returns an external database connection's name and database type. This is a developer and user endpoint. tags: - Databases produces: - application/json parameters: - in: header description: User token obtained through authentication. User token or dev token are required fields name: ClearBlade-UserToken required: false type: string - in: header description: Dev token obtained through authentication. Dev token or user token are required fields name: ClearBlade-DevToken required: false type: string - in: path description: System key that identifies the system name: systemKey required: true type: string - in: path description: External database connection's name name: name required: true type: string responses: '200': description: A specific external database connection's credentials. 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 put: operationId: UpdateDatabaseCredentials summary: description: Updates the specified system's external database credentials. This is a developer and user endpoint. tags: - Databases produces: - application/json parameters: - in: header description: User token obtained through authentication. User token or dev token are required fields name: ClearBlade-UserToken required: false type: string - in: header description: Dev token obtained through authentication. Dev token or user token are required fields name: ClearBlade-DevToken required: false type: string - in: path description: System key that identifies the system name: systemKey required: true type: string - in: path description: External database connection name name: name required: true type: string - in: body description: Updated external database credentials name: body schema: $ref: '#/definitions/credentials' responses: '200': description: External database credentials were successfully updated schema: $ref: '#/definitions/credentials' '400': description: Bad request schema: $ref: '#/definitions/ErrorResp' '401': description: Unauthorized '500': description: Internal server error delete: operationId: DeleteExternalDB summary: description: Deletes an existing external database connection in the specified system. This is a developer and user endpoint. tags: - Databases produces: - application/json parameters: - in: header description: User token obtained through authentication. User token or dev token are required fields name: ClearBlade-UserToken required: false type: string - in: header description: Dev token obtained through authentication. Dev token or user token are required fields name: ClearBlade-DevToken required: false type: string - in: path description: System key that identifies the system name: systemKey required: true type: string - in: path description: External database connection name name: name required: true type: string responses: '200': description: The external database connection was successfully deleted. schema: $ref: '#/definitions/SuccessResp' '400': description: Bad request schema: $ref: '#/definitions/ErrorResp' '500': description: Server error '/api/v/4/external-db/{systemKey}/{name}/data': post: operationId: PerformDBOperation summary: description: Perform an external database operation. This is a developer and user endpoint. tags: - Databases produces: - application/json parameters: - in: header description: User token obtained through authentication. User token or dev token are required fields name: ClearBlade-UserToken required: false type: string - in: header description: Dev token obtained through authentication. Dev token or user token are required fields name: ClearBlade-DevToken required: false type: string - in: path description: System key that identifies the system name: systemKey required: true type: string - in: path description: External database connection name name: name required: true type: string - in: body description: List of operations to be performed. Refer to the operations to retrieve service information. Supported on the ClearBlade Docs or Native Libraries. name: body schema: $ref: '#/definitions/operationsDB' 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 '/api/v/1/code/{systemKey}/{serviceName}': get: operationId: GetService summary: description: Returns a code service's setting information and data tags: - Code produces: - application/json parameters: - in: header description: Dev token obtained through authentication name: ClearBlade-DevToken required: true type: string - in: path description: System key that identifies the system the device is a part of name: systemKey required: true type: string - in: path description: Code service's name name: serviceName required: true type: string responses: '200': description: Returns a code service's setting information and data '500': description: Server error post: operationId: ExecuteService summary: description: Executes a code service tags: - Code produces: - application/json parameters: - in: header description: Token obtained through user authentication name: ClearBlade-UserToken required: true type: string - in: path description: System key that identifies the system that holds the code service name: systemKey required: true type: string - in: path description: Code service's name name: serviceName required: true type: string - in: body description: Code service's parameters name: parameters required: false schema: type: object responses: '200': description: Code service successfully executed '500': description: Server error '/api/v/4/{systemKey}/code/failed': get: operationId: GetFailedServiceQuery summary: description: Returns list of failed code services tags: - Code produces: - application/json parameters: - in: header description: Dev token obtained through authentication. Dev token or user token are required fields name: ClearBlade-DevToken required: false type: string - in: header description: User token obtained through authentication. User token or dev token are required fields name: ClearBlade-UserToken required: false type: string - in: path description: System key that identifies the system the device is a part of name: systemKey required: true type: string - in: query description: Uses query to limit the scope of the list of failed services. Check the FailQuery model at the bottom of this page. name: query type: string responses: '200': description: A list of filters for failed services '400': description: Bad request '401': description: Unauthorized '500': description: Server error '/api/v/3/code/codemeta/{systemKey}': get: operationId: ReturnServiceSettings summary: description: Returns a list of code services and their settings info tags: - Code produces: - application/json parameters: - in: header description: Dev token obtained through authentication. Dev token or user token are required fields name: ClearBlade-DevToken required: false type: string - in: header description: User token obtained through authentication. User token or dev token are required fields name: ClearBlade-UserToken required: false type: string - in: path description: System key that identifies the system the device is a part of name: systemKey required: true type: string 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 '/admin/v/4/webhook/{systemKey}': get: operationId: GetWebhooks summary: description: Returns the system's webhooks tags: - Webhooks produces: - application/json parameters: - in: header description: Dev token obtained through authentication name: ClearBlade-DevToken required: true type: string - in: path description: System key that identifies the system the messages belong to name: systemKey required: true type: string responses: '200': description: A webhook list is returned schema: $ref: '#/definitions/webhookResp' '400': description: Bad request schema: $ref: '#/definitions/ErrorResp' '401': description: Unauthorized '/admin/v/4/webhook/{systemKey}/{name}': post: operationId: CreateWebhook summary: 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` tags: - Webhooks produces: - application/json parameters: - in: header description: Dev token obtained through authentication name: ClearBlade-DevToken required: true type: string - in: path description: System key that identifies the system the messages belong to name: systemKey required: true type: string - in: path description: The webhook name name: name required: true type: string - in: body description: Properties to create webhooks name: body required: true schema: $ref: '#/definitions/webhookCreate' 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' put: operationId: UpdateWebhook summary: 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` tags: - Webhooks produces: - application/json parameters: - in: header description: Dev token obtained through authentication name: ClearBlade-DevToken required: true type: string - in: path description: System key that identifies the system the messages belong to name: systemKey required: true type: string - in: path description: The webhook name name: name required: true type: string - in: body description: Updated collection information name: body required: false schema: $ref: '#/definitions/webhookUpdate' responses: '200': description: The 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' delete: operationId: DeleteWebhook summary: description: Deletes an existing webhook in the specified system tags: - Webhooks produces: - application/json parameters: - in: header description: Dev token obtained through authentication name: ClearBlade-DevToken required: true type: string - in: path description: System key that identifies the system the messages belong to name: systemKey required: true type: string - in: path description: The webhook name name: name required: true type: string responses: '200': description: Webhook was successfully deleted schema: $ref: '#/definitions/SuccessResp' '/api/v/4/webhook/execute/{systemKey}/{webhookName}': get: operationId: PayloadWebhookQuery summary: description: Executes the type payload webhook. Authentication occurs over GET's query string. tags: - Webhooks produces: - application/json parameters: - in: path description: System key that identifies the system the messages belong to name: systemKey required: true type: string - in: path description: The webhook name name: webhookName required: true type: string - in: query description: User authentication and data pushed through webhook name: token required: true type: string responses: '200': description: Webhook executed post: operationId: ExecuteWebhook summary: description: Executes a webhook through a code service tags: - Webhooks produces: - application/json parameters: - in: header description: Token obtained through user authentication name: ClearBlade-UserToken required: true type: string - in: path description: System key that identifies the system the messages belong to name: systemKey required: true type: string - in: path description: The webhook name name: webhookName required: true type: string - in: body description: Message to publish name: body required: true schema: $ref: '#/definitions/executeWebhook' responses: '200': description: Webhook executed '/api/v/1/message/{systemKey}': get: operationId: GetMessageHistory summary: description: Returns the message history for a single topic. Does not honor wildcards. tags: - Messaging produces: - application/json parameters: - in: header description: Token obtained through user authentication. User token or dev token are required fields name: ClearBlade-UserToken required: false type: string - in: header description: Token obtained through dev authentication. Dev token or user token are required fields name: ClearBlade-DevToken required: false type: string - in: path description: System key that identifies the system the messages belong to name: systemKey required: true type: string - in: query description: Messaging topic to retrieve the history for name: topic required: true type: string - in: query description: Number of messages to retrieve. 0 retrieves all messages. name: count required: true type: string - in: query description: Point in time to start the search (epoch timestamp) name: last required: false type: string - in: query description: Start time for searching within a timeframe (epoch timestamp) name: start required: false type: string - in: query description: End time for searching within a timeframe (epoch timestamp) name: stop required: false type: string responses: '200': description: List of messages published to the specified topic delete: operationId: DeleteMessageHistory summary: description: Deletes a single topic's messaging history tags: - Messaging produces: - application/json parameters: - in: header description: Token obtained through user authentication. User token or dev token are required fields name: ClearBlade-UserToken required: false type: string - in: header description: Token obtained through dev authentication. Dev token or user token are required fields name: ClearBlade-DevToken required: false type: string - in: path description: System key that identifies the system the messages belong to name: systemKey required: true type: string - in: query description: Messaging topic to delete the history for name: topic required: true type: string - in: query description: Number of messages to delete. 0 deletes all messages. name: count required: true type: string - in: query description: Point in time to start deleting (epoch timestamp) name: last required: false type: string - in: query description: Start time for deleting within a timeframe (epoch timestamp) name: start required: false type: string - in: query description: End time for deleting within a timeframe (epoch timestamp) name: stop required: false type: string responses: '200': description: Message history was successfully deleted '/api/v/1/message/{systemKey}/publish': post: operationId: PublishMessage summary: description: Publishes a message to a topic, given the user has permission to publish on that topic tags: - Messaging produces: - application/json parameters: - in: header description: Token obtained through user authentication. User token or dev token are required fields name: ClearBlade-UserToken required: false type: string - in: header description: Token obtained through dev authentication. Dev token or user token are required fields name: ClearBlade-DevToken required: false type: string - in: path description: System key that identifies the system the messages belong to name: systemKey required: true type: string - in: body description: Message to publish name: body required: true schema: $ref: '#/definitions/messagePublish' responses: '200': description: No response was specified '/api/v/4/message/{systemKey}/topics': get: operationId: GetTopics summary: 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} ``` tags: - Messaging produces: - application/json parameters: - in: header description: Dev token obtained through authentication. Dev token or user token are required fields name: ClearBlade-DevToken required: false type: string - in: header description: User token obtained through authentication. User token or dev token are required fields name: ClearBlade-UserToken required: false type: string - in: path description: System key that identifies the system the messages belong to type: string name: systemKey required: true - in: query description: Query object used to filter the items. See the [REST API query schema](https://docs.clearblade.com/iotenterprise/rest-api-query-schema) for an example. name: query required: false type: string responses: '200': description: Returns the list of topics and information schema: $ref: '#/definitions/msgArray' '400': description: Bad request schema: $ref: '#/definitions/ErrorResp' '/api/v/4/message/{systemKey}/topics/count': get: operationId: GetTopicCount summary: description: Returns the number of topics tags: - Messaging produces: - application/json parameters: - in: header description: Dev token obtained through authentication. Dev token or user token are required fields name: ClearBlade-DevToken required: false type: string - in: header description: User token obtained through authentication. User token or dev token are required fields name: ClearBlade-UserToken required: false type: string - in: path description: System key that identifies the system the topics belong to type: string name: systemKey required: true responses: '200': description: Returns the number of topics schema: $ref: '#/definitions/count' '400': description: Bad request schema: $ref: '#/definitions/ErrorResp' '/api/v/2/edges/{systemKey}': get: operationId: GetAllEdges summary: description: Returns all edge info the current user is authorized to see tags: - Edge produces: - application/json parameters: - in: header description: Token obtained through user authentication. User token or dev token are required fields. name: ClearBlade-UserToken required: false type: string - in: header description: Token obtained through dev authentication. Dev token or user token are required fields. name: ClearBlade-DevToken required: false type: string - in: path description: System key that identifies the system that holds the edge name: systemKey required: true type: string - in: query description: System key that identifies the system you want the info about name: id required: true type: string responses: '200': description: A list of the edges from the specified system '400': description: Bad request '/api/v/3/edges/{systemKey}/{name}': get: operationId: GetEdgeDataByName summary: description: Returns the data from the specified edge tags: - Edge produces: - application/json parameters: - in: header description: Token obtained through user authentication. User token or dev token are required fields name: ClearBlade-UserToken required: false type: string - in: header description: Token obtained through dev authentication. Dev token or user token are required fields name: ClearBlade-DevToken required: false type: string - in: path description: System key that identifies the system that holds the collection name: systemKey required: true type: string - in: path description: The edge name name: name required: true type: string responses: '200': description: The specified edge's information '400': description: Bad request put: operationId: UpdateEdgeByName summary: description: Updates the specified edge's information tags: - Edge produces: - application/json parameters: - in: header description: Token obtained through user authentication. User token or dev token are required fields name: ClearBlade-UserToken required: false type: string - in: header description: Token obtained through dev authentication. Dev token or user token are required fields name: ClearBlade-DevToken required: false type: string - in: path description: System key that identifies the system the edge you're updating belongs to name: systemKey required: true type: string - in: path description: The edge name you're updating name: name required: true type: string - in: body description: Updated edge information name: Edge required: true schema: $ref: '#/definitions/edgeUpdate' responses: '200': description: No response was specified '400': description: Bad request post: operationId: CreateNewEdge summary: description: Creates a new edge in the specified system tags: - Edge produces: - application/json parameters: - in: header description: Token obtained through user authentication. User or dev token are required fields name: ClearBlade-UserToken required: false type: string - in: header description: Token obtained through dev authentication. Dev or user token are required fields name: ClearBlade-DevToken required: false type: string - in: path description: System key that identifies the system the new edge will belong to name: systemKey required: true type: string - in: path description: The edge name you're creating name: name required: true type: string - in: body description: New edge information name: body required: true schema: $ref: '#/definitions/edgeNew' responses: '200': description: No response was specified '400': description: Bad request delete: operationId: DeleteEdgeByName summary: description: Deletes the specified edge from its system tags: - Edge produces: - application/json parameters: - in: header description: Token obtained through user authentication. User token or dev token are required fields name: ClearBlade-UserToken required: false type: string - in: header description: Token obtained through dev authentication. Dev token or user token are required fields name: ClearBlade-DevToken required: false type: string - in: path description: System key that identifies the system the edge belongs to name: systemKey required: true type: string - in: path description: The edge name you're deleting name: name required: true type: string responses: '200': description: No response was specified '400': description: Bad request '/api/v/3/edges/{systemKey}/count': get: operationId: GetEdgeCount summary: description: Returns the total number of edges in a system tags: - Edge produces: - application/json parameters: - in: header description: Token obtained through user authentication. User token or dev token are required fields name: ClearBlade-UserToken required: false type: string - in: header description: Token obtained through dev authentication. Dev token or user token are required fields name: ClearBlade-DevToken required: false type: string - in: path description: System key that identifies the system that holds the edges name: systemKey required: true type: string responses: '200': description: Returns object containing the count of edges in a system '400': description: Bad request '/api/v/3/edges/{systemKey}/columns': get: operationId: GetEdgeTableSchema summary: description: Returns the columns and their data type for the edge table in a system tags: - Edge produces: - application/json parameters: - in: header description: Token obtained through user authentication. User token or dev token are required fields name: ClearBlade-UserToken required: false type: string - in: header description: Token obtained through dev authentication. Dev token or user token are required fields name: ClearBlade-DevToken required: false type: string - in: path description: System key that identifies the system that holds the edges name: systemKey required: true type: string responses: '200': description: Returns a list of columns and their system edge data types '400': description: Bad request '/admin/{systemKey}/sync/edge/status/{edgeName}': get: operationId: EdgeSyncStatus summary: description: Returns an edge's sync status tags: - Edge produces: - application/json parameters: - in: header description: Token obtained through dev authentication name: ClearBlade-DevToken required: true type: string - in: path description: System key that identifies the system that holds the edges name: systemKey required: true type: string - in: path description: The edge name name: edgeName required: true type: string responses: '200': description: Returns list of assets and their sync status related to the edge '400': description: Bad request '/admin/{systemKey}/sync/alledges/status': get: operationId: AllEdgeSyncStatus summary: description: Returns all edges in a system's sync status tags: - Edge produces: - application/json parameters: - in: header description: Token obtained through dev authentication name: ClearBlade-DevToken required: true type: string - in: path description: System key that identifies the system that holds the edges name: systemKey required: true type: string responses: '200': description: Returns list of edges and assets and their sync status related to them '400': description: Bad request '/api/v/3/code/{systemKey}/triggers': get: operationId: GetAllTrigger summary: description: Returns trigger handler list tags: - Handlers produces: - application/json parameters: - in: header description: Token obtained through user authentication name: ClearBlade-UserToken required: true type: string - in: path description: System key that identifies the system the handlers are in name: systemKey required: true type: string responses: '200': description: A list of trigger handlers schema: $ref: '#/definitions/triggerArray' '400': description: Bad request schema: $ref: '#/definitions/ErrorResp' '/api/v/3/code/{systemKey}/trigger/{name}': get: operationId: GetTriggerByName summary: description: Returns the specified trigger handler information tags: - Handlers produces: - application/json parameters: - in: header description: Token obtained through user authentication name: ClearBlade-UserToken required: true type: string - in: path description: System key that identifies the system the handler is in name: systemKey required: true type: string - in: path description: The trigger handler name name: name required: true type: string responses: '200': description: The trigger handler information requested schema: $ref: '#/definitions/triggerArray' '400': description: Bad request schema: $ref: '#/definitions/ErrorResp' put: operationId: UpdateTriggerByName summary: description: Updates the specified trigger handler tags: - Handlers produces: - application/json parameters: - in: header description: Token obtained through user authentication name: ClearBlade-UserToken required: true type: string - in: path description: System key that identifies the system the handler is in name: systemKey required: true type: string - in: path description: The trigger handler name you're updating name: name required: true type: string - in: body description: Updated trigger handler information name: body required: true schema: $ref: '#/definitions/triggerdata' responses: '200': description: No response was specified schema: $ref: '#/definitions/triggerArray' '400': description: Bad request schema: $ref: '#/definitions/ErrorResp' post: operationId: CreateNewTrigger summary: description: Creates a new trigger handler tags: - Handlers produces: - application/json parameters: - in: header description: Token obtained through user authentication name: ClearBlade-UserToken required: true type: string - in: path description: System key that identifies the system the handler is in name: systemKey required: true type: string - in: path description: The trigger handler name you're creating name: name required: true type: string - in: body description: New trigger information name: body required: true schema: $ref: '#/definitions/triggerdata' responses: '200': description: No response was specified schema: $ref: '#/definitions/triggerArray' '400': description: Bad request schema: $ref: '#/definitions/ErrorResp' delete: operationId: DeleteTriggerByName summary: description: Deletes the specified trigger handler tags: - Handlers produces: - application/json parameters: - in: header description: Token obtained through user authentication name: ClearBlade-UserToken required: true type: string - in: path description: System key that identifies the system the handler is in name: systemKey required: true type: string - in: path description: The trigger handler name you're deleting name: name required: true type: string responses: '200': description: No response was specified '400': description: Bad request '/api/v/3/code/{systemKey}/timers': get: operationId: GetAllTimers summary: description: Returns a list of timer handlers tags: - Handlers produces: - application/json parameters: - in: header description: Token obtained through user authentication name: ClearBlade-UserToken required: true type: string - in: path description: System key that identifies the system the handler is in name: systemKey required: true type: string responses: '200': description: No response was specified schema: $ref: '#/definitions/timerArray' '400': description: Bad request schema: $ref: '#/definitions/ErrorResp' '/api/v/3/code/{systemKey}/timer/{name}': get: operationId: GetTimerByName summary: description: Returns the specified timer handler information tags: - Handlers produces: - application/json parameters: - in: header description: Token obtained through user authentication name: ClearBlade-UserToken required: true type: string - in: path description: System key that identifies the system the handler is in name: systemKey required: true type: string - in: path description: The timer handler name name: name required: true type: string responses: '200': description: Returns list of timers with their information schema: $ref: '#/definitions/timerList' '400': description: Bad request schema: $ref: '#/definitions/ErrorResp' put: operationId: UpdateTimerByName summary: description: Updates the specified timer handler tags: - Handlers produces: - application/json parameters: - in: header description: Token obtained through user authentication name: ClearBlade-UserToken required: true type: string - in: path description: System key that identifies the system the handler is in name: systemKey required: true type: string - in: path description: The timer handler name you're updating name: name required: true type: string - in: body description: Updated timer handler information name: body required: true schema: $ref: '#/definitions/timerdata' 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' post: operationId: CreateNewTimer summary: description: Creates new timer handler tags: - Handlers produces: - application/json parameters: - in: header description: Token obtained through user authentication name: ClearBlade-UserToken required: true type: string - in: path description: System key that identifies the system the handler is in name: systemKey required: true type: string - in: path description: The timer handler name you're creating name: name required: true type: string - in: body description: New timer information name: body required: true schema: $ref: '#/definitions/timerdata' 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' delete: operationId: DeleteTimerByName summary: description: Deletes the specified trigger handler tags: - Handlers produces: - application/json parameters: - in: header description: Token obtained through user authentication name: ClearBlade-UserToken required: true type: string - in: path description: System key that identifies the system the handler is in name: systemKey required: true type: string - in: path description: The timer name you're deleting name: name required: true type: string responses: '200': description: Deletes the system's timer '400': description: Bad request schema: $ref: '#/definitions/ErrorResp' /admin/reg: post: operationId: RegDev summary: description: Registers a new developer account with the CB platform tags: - Developer produces: - application/json parameters: - in: body description: The developer's first and last name, organization, email, and password name: Registration info required: true schema: $ref: '#/definitions/devregdata' responses: '200': description: The developer was successfully created. schema: $ref: '#/definitions/devregresp' '500': description: Internal server error /admin/auth: post: operationId: AuthDev summary: description: | ## Description Logs the developer into the system and returns a developer token ## Endpoint body values Here are the body values for the two scenarios ### Basic auth Required keys - usernameemail - password Example ```json { "usernameemail":"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" } ``` tags: - Developer produces: - application/json parameters: - in: body description: Developer credentials name: credentials required: true schema: $ref: '#/definitions/authdata' responses: '200': description: Developer authenticated schema: $ref: '#/definitions/devregresp' /admin/logout: post: operationId: DevLogout summary: description: Logs the current developer out of their session and invalidates their DevToken tags: - Developer produces: - application/json parameters: - in: header description: Developer token obtained through admin authentication name: ClearBlade-DevToken required: true type: string responses: '200': description: Developer was successfully logged out '/admin/v/4/systemmanagement': get: operationId: GetSystemInfo summary: description: Returns the specified system's metadata tags: - Developer produces: - application/json parameters: - in: header description: Developer token obtained through admin authentication name: ClearBlade-DevToken required: true type: string - in: query description: System key that identifies the system you want the info about name: id required: true type: string responses: '200': description: Specified system metadata schema: $ref: '#/definitions/systemSettings' '400': description: Bad request post: operationId: CreateSystem summary: description: Creates a new system tied to the developer's account tags: - Developer produces: - application/json parameters: - in: header description: Developer token obtained through developer authentication name: ClearBlade-DevToken required: true type: string - in: body description: New system information name: body required: true schema: $ref: '#/definitions/newsystem' responses: '200': description: The system was successfully created. schema: $ref: '#/definitions/systemSettings' '400': description: Bad request put: operationId: UpdateSystem summary: description: Updates a system's metadata tags: - Developer produces: - application/json parameters: - in: header description: Developer token obtained through admin authentication name: ClearBlade-DevToken required: true type: string - in: body description: Updated system information name: body required: true schema: $ref: '#/definitions/systemSettings' responses: '200': description: System information has been successfully updated delete: operationId: DeleteSystem summary: description: Deletes the specified system tags: - Developer produces: - application/json parameters: - in: header description: Developer token obtained through admin authentication name: ClearBlade-DevToken required: true type: string - in: query description: System key that identifies the system you want to delete name: id required: true type: string responses: '200': description: The system was successfully deleted. /admin/collectionmanagement: post: operationId: DevCreateCollection summary: description: Creates a new collection or database connection in the specified system tags: - Developer produces: - application/json parameters: - in: header description: Developer token obtained through authentication name: ClearBlade-DevToken required: true type: string - in: body description: The new collection's configuration info name: Collection info required: true schema: $ref: '#/definitions/newcollection' responses: '200': description: The collection was successfully created. put: operationId: DevUpdateCollection summary: description: Creates or deletes a column within an existing collection or updates an existing database connection in the specified system tags: - Developer produces: - application/json parameters: - in: header description: Developer token obtained through admin authentication name: ClearBlade-DevToken required: false type: string - in: body description: Updated collection information name: body required: false schema: $ref: '#/definitions/updateCollection' responses: '200': description: The collection was successfully updated. delete: operationId: DevDeleteCollection summary: description: Deletes an existing collection in the specified system tags: - Developer produces: - application/json parameters: - in: header description: Developer token obtained through admin authentication name: ClearBlade-DevToken required: true type: string - in: query description: ID that identifies the collection to be deleted name: id required: true type: string responses: '200': description: The collection was successfully deleted. /admin/allapps: get: operationId: DevGetAssets summary: description: Retrieves system information for all systems in the developer account tags: - Developer produces: - application/json parameters: - in: header description: Developer token obtained through admin authentication name: ClearBlade-DevToken required: true type: string responses: '200': description: Returns an array of system information '400': description: Bad Request /admin/allcollections: get: operationId: DevGetCollections summary: description: Returns the specified system's collections tags: - Developer produces: - application/json parameters: - in: header description: Developer token obtained through admin authentication name: ClearBlade-DevToken required: true type: string - in: query description: System key that identifies the system the collections belong to name: appid required: true type: string responses: '200': description: A list of collections in the specified system '400': description: Bad Request /admin/allsystems: get: operationId: GetSystems summary: description: Returns all the systems tied to the specified developer's account tags: - Developer produces: - application/json parameters: - in: header description: Developer token obtained through admin authentication name: ClearBlade-DevToken required: true type: string responses: '200': description: List of systems /admin/regensystemsecret: put: operationId: RegenSecret summary: description: Generates a new system secret for the specified system tags: - Developer produces: - application/json parameters: - in: header description: Developer token obtained through admin authentication name: ClearBlade-DevToken required: true type: string - in: body description: System key that identifies the system you're regenerating the secret for name: body required: true schema: $ref: '#/definitions/regensystem' responses: '200': description: A new system secret was successfully generated. /admin/checkauth: post: operationId: VerifyAuth summary: description: Verifies developer access to the system tags: - Developer produces: - application/json parameters: - in: header description: Developer token obtained through admin authentication name: ClearBlade-DevToken required: true type: string responses: '200': description: Receives access to the system '400': description: Bad request /admin/userinfo: get: operationId: GetDevInfo summary: description: Returns the current developer's user information. This is a developer-only endpoint. tags: - Developer produces: - application/json parameters: - in: header description: Developer token obtained through admin authentication name: ClearBlade-DevToken required: true type: string responses: '200': description: Current developer information schema: $ref: '#/definitions/userinfo' '400': description: Bad request schema: $ref: '#/definitions/ErrorResp' put: operationId: UpdateDev2FA summary: description: | ## Description: Update the developer 2FA information. This is a developer-only endpoint. The email is taken from the developer's account. ## two_factor_method * email * sms * email_sms (enables both methods) tags: - 2FA produces: - application/json parameters: - in: header description: Developer token obtained through admin authentication name: ClearBlade-DevToken required: true type: string - in: body description: Updates to make for the developer's two-factor auth settings name: body required: true schema: $ref: '#/definitions/2FAinfo' responses: '200': description: 2FA methods successfully changed schema: $ref: '#/definitions/SuccessResp' '400': description: Bad request schema: $ref: '#/definitions/ErrorResp' '/admin/user/{systemKey}': get: operationId: GetUserList summary: description: Returns a list of all of the system's users tags: - Developer produces: - application/json parameters: - in: path description: System key that identifies the system the user is a part of name: systemKey required: true type: string - in: header description: Developer token obtained through admin authentication name: ClearBlade-DevToken required: true type: string - in: query description: Tags to filter users. Check 'users' model at the bottom of this page. name: query type: string responses: '200': description: Returns list of all users, user information, and count '400': description: Bad request '500': description: Internal server error put: operationId: UserChangeUserInfo summary: description: Changes any column in the user table and updates the specified user's password or permissions tags: - Developer produces: - application/json parameters: - in: path description: System key that identifies the system the user is a part of name: systemKey required: true type: string - in: header description: Developer token obtained through admin authentication name: ClearBlade-DevToken required: true type: string - in: body description: Roles to change for the user name: body required: true schema: $ref: '#/definitions/roles' responses: '200': description: The user's roles successfully changed '400': description: Bad request '500': description: Internal server error post: operationId: AddUser summary: description: Add a user to the system tags: - Developer produces: - application/json parameters: - in: path description: System key that identifies the system the user is a part of name: systemKey required: true type: string - in: header description: Developer token obtained through admin authentication name: ClearBlade-DevToken required: true type: string - in: body description: Developer's email name: body required: true schema: $ref: '#/definitions/userlogin' responses: '200': description: The user is added to the system. '401': description: Unauthorized '400': description: Bad request '500': description: Internal server error delete: operationId: DeleteUser summary: description: Deletes user from the system tags: - Developer produces: - application/json parameters: - in: header description: Developer token obtained through admin authentication name: ClearBlade-DevToken required: true type: string - in: path description: System key that identifies the system the handler is in name: systemKey required: true type: string - in: query description: User ID to delete name: user type: string responses: '200': description: The user is deleted. '400': description: Bad request '500': description: Internal server error '/admin/user/{systemKey}/roles': get: operationId: GetRoles summary: description: | ## Description: Get a list of roles that are available to add to a 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"}]}]]} ``` tags: - Developer produces: - application/json parameters: - in: path description: System key that identifies the system the user is a part of name: systemKey required: true type: string - in: header description: Developer token obtained through admin authentication name: ClearBlade-DevToken required: true type: string - in: query description: Refer to the example query above name: query type: string responses: '200': description: Returns the user's role(s), role information, and permissions '400': description: Bad request '500': description: Internal server error post: operationId: AddRole summary: description: Adds a new role to the system tags: - Developer produces: - application/json parameters: - in: path description: System key that identifies the system the user is a part of name: systemKey required: true type: string - in: header description: Developer token obtained through admin authentication name: ClearBlade-DevToken required: true type: string - in: body description: Role information name: body schema: $ref: '#/definitions/rolesinfo' responses: '200': description: Role gets added '400': description: Bad request '500': description: Internal server error put: operationId: SettingsChanges summary: description: Changes individual role settings tags: - Developer produces: - application/json parameters: - in: path description: System key that identifies the system the user is a part of name: systemKey required: true type: string - in: header description: Developer token obtained through admin authentication name: ClearBlade-DevToken required: true type: string - in: body description: Information about changes name: payload required: true schema: $ref: '#/definitions/changeRoleSettings' responses: '200': description: A column is added to the collection. '400': description: Bad request '500': description: Internal server error delete: operationId: DeleteRoles summary: description: Deletes system roles tags: - Developer produces: - application/json parameters: - in: header description: Developer token obtained through admin authentication name: ClearBlade-DevToken required: true type: string - in: path description: System key that identifies the system the handler is in name: systemKey required: true type: string - in: query description: Role identification key name: query required: true type: string responses: '200': description: No response was specified '400': description: Bad request '500': description: Internal server error '/admin/user/{systemKey}/roles/count': get: operationId: GetRolesCount summary: description: Get the number of roles in a system tags: - Developer produces: - application/json parameters: - in: path description: System key that identifies the system the user is a part of name: systemKey required: true type: string - in: header description: Developer token obtained through admin authentication name: ClearBlade-DevToken required: true type: string - in: query description: Identifies role list's page size and number name: user required: true type: string responses: '200': description: Returns list of all users '401': description: Unauthorized '500': description: Internal server error '/admin/user/{systemKey}/columns': get: operationId: GetUserColumnData summary: description: Returns data in the user list column tags: - Developer produces: - application/json parameters: - in: path description: System key that identifies the system the user is a part of name: systemKey required: true type: string - in: header description: Developer token obtained through admin authentication name: ClearBlade-DevToken required: true type: string responses: '200': description: Returns list of all users '400': description: Bad request '500': description: Internal server error post: operationId: AddColumn summary: description: Adds a new column to the user collection tags: - Developer produces: - application/json parameters: - in: path description: System key that identifies the system the user is a part of name: systemKey required: true type: string - in: header description: Developer token obtained through admin authentication name: ClearBlade-DevToken required: true type: string - in: body description: Column information name: payload required: true schema: $ref: '#/definitions/addUserColumn' responses: '200': description: A column is added to the collection. '400': description: Bad request '500': description: Internal server error /admin/putpass: put: operationId: ChangeDevPassword summary: description: Changes a developer's password tags: - Developer produces: - application/json parameters: - in: header description: Developer token obtained through admin authentication name: ClearBlade-DevToken required: true type: string - in: body description: Password change information name: body required: true schema: $ref: '#/definitions/devpass' responses: '200': description: Developer's password was successfully changed /admin/resetpassword: post: operationId: ResetPassword summary: description: Changes a developer's password tags: - Admin produces: - application/json parameters: - in: header description: Developer token obtained through admin authentication name: ClearBlade-DevToken required: true type: string - in: body description: New login information name: body required: true schema: $ref: '#/definitions/resetPassword' responses: '200': description: Password is reset /admin/pkey: get: operationId: GetLicenseKey summary: description: Returns the current platform license key tags: - Admin produces: - application/json parameters: - in: header description: Developer token obtained through admin authentication name: ClearBlade-DevToken required: true type: string responses: '200': description: Returns platform license key '400': description: Bad request /admin/triggers/definitions: get: operationId: GetTriggers summary: description: Returns list of trigger definitions. These are the possible actions that can set off a trigger. tags: - Developer produces: - application/json parameters: - in: header description: Developer token obtained through admin authentication. Dev token or user token are required fields name: ClearBlade-DevToken required: false type: string - in: header description: User token obtained through admin authentication. User token or dev token are required fields name: ClearBlade-UserToken required: false type: string responses: '200': description: Trigger definition list '/admin/triggers/handlers/{systemKey}': get: operationId: GetTriggerHandlers summary: description: Returns list of trigger handlers tags: - Developer produces: - application/json parameters: - in: header description: Developer token obtained through admin authentication name: ClearBlade-DevToken required: true type: string - in: path description: System key that identifies the system the handlers are in name: systemKey required: true type: string responses: '200': description: A trigger handler list '/admin/triggers/handlers/{systemKey}/{name}': get: operationId: GetTriggerHandler summary: description: Returns the specified trigger handler information tags: - Developer produces: - application/json parameters: - in: header description: Developer token obtained through admin authentication name: ClearBlade-DevToken required: true type: string - in: path description: System key that identifies the system the handler is in name: systemKey required: true type: string - in: path description: The trigger handler name you want name: name required: true type: string responses: '200': description: No response was specified put: operationId: UpdateTriggerHandler summary: description: Updates the specified trigger handler tags: - Developer produces: - application/json parameters: - in: header description: Developer token obtained through admin authentication name: ClearBlade-DevToken required: true type: string - in: body description: Updated trigger handler information name: body required: true schema: $ref: '#/definitions/triggerdata' - in: path description: System key that identifies the system the handler is in name: systemKey required: true type: string - in: path description: The trigger handler name you're updating name: name required: true type: string responses: '200': description: No response was specified post: operationId: CreateTrigger summary: description: Creates a new trigger handler tags: - Developer produces: - application/json parameters: - in: header description: Developer token obtained through admin authentication name: ClearBlade-DevToken required: true type: string - in: body description: New trigger information name: body required: true schema: $ref: '#/definitions/triggerdata' - in: path description: System key that identifies the system the handler is in name: systemKey required: true type: string - in: path description: The trigger handler name you're creating name: name required: true type: string responses: '200': description: No response was specified delete: operationId: DeleteTriggerHandler summary: description: Deletes the specified trigger handler tags: - Developer produces: - application/json parameters: - in: header description: Developer token obtained through admin authentication name: ClearBlade-DevToken required: true type: string - in: path description: System key that identifies the system the handler is in name: systemKey required: true type: string - in: path description: The trigger handler name you're deleting name: name required: true type: string responses: '200': description: No response was specified '/admin/triggers/timers/{systemKey}': get: operationId: GetTimerHandlers summary: description: Returns a timer handler list tags: - Developer produces: - application/json parameters: - in: header description: Developer token obtained through admin authentication name: ClearBlade-DevToken required: true type: string - in: path description: System key that identifies the system the handler is in name: systemKey required: true type: string responses: '200': description: No response was specified '/admin/triggers/timers/{systemKey}/{name}': get: operationId: GetTimerHandler summary: description: Returns the specified timer handler information tags: - Developer produces: - application/json parameters: - in: header description: Developer token obtained through admin authentication name: ClearBlade-DevToken required: true type: string - in: path description: System key that identifies the system the handler is in name: systemKey required: true type: string - in: path description: The timer handler name name: name required: true type: string responses: '200': description: No response was specified put: operationId: UpdateTimerHandler summary: description: Updates the specified timer handler tags: - Developer produces: - application/json parameters: - in: header description: Developer token obtained through admin authentication name: ClearBlade-DevToken required: true type: string - in: path description: System key that identifies the system the handler is in name: systemKey required: true type: string - in: path description: The timer handler name you're updating name: name required: true type: string - in: body description: Updated timer handler information name: body required: true schema: $ref: '#/definitions/timerdata' responses: '200': description: No response was specified post: operationId: create_timer_handler summary: description: Creates new timer handler tags: - Developer produces: - application/json parameters: - in: header description: Developer token obtained through admin authentication name: ClearBlade-DevToken required: true type: string - in: path description: System key that identifies the system the handler is in name: systemKey required: true type: string - in: path description: The timer handler name you're creating name: name required: true type: string - in: body description: New timer information name: body required: true schema: $ref: '#/definitions/timerdata' responses: '200': description: No response was specified delete: operationId: DeleteTimerHandler summary: description: Deletes the specified trigger handler tags: - Developer produces: - application/json parameters: - in: header description: Developer token obtained through admin authentication name: ClearBlade-DevToken required: true type: string - in: path description: System key that identifies the system the handler is in name: systemKey required: true type: string - in: path description: The timer name you're deleting name: name required: true type: string responses: '200': description: No response was specified '/admin/devices/{systemKey}': get: operationId: GetSystemDevices summary: description: Retrieves information about all devices in the specified system tags: - Developer produces: - application/json parameters: - in: header description: Developer token obtained through admin authentication name: ClearBlade-DevToken required: true type: string - in: path description: System key that identifies the system the devices belong to name: systemKey required: true type: string - in: query description: Tags to filter devices by. See the [REST API query schema](https://docs.clearblade.com/iotenterprise/rest-api-query-schema) for an example. All devices are returned if a query is not specified. name: query required: false type: string responses: '200': description: A list of devices '400': description: Bad request put: operationId: UpdateDevicesAdmin summary: description: Updates all devices matching a query's filters tags: - Developer produces: - application/json parameters: - in: path description: System key that identifies the system the device is a part of name: systemKey required: true type: string - in: header description: Token obtained through user authentication name: ClearBlade-DevToken required: true type: string - in: body description: Query to limit the update scope and new data values name: payload required: true schema: $ref: '#/definitions/PutQuery' 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 delete: operationId: DeleteDevicesAdmin summary: description: Deletes all devices matching the filters specified by a query tags: - Developer produces: - application/json parameters: - in: path description: System key that identifies the system the device is a part of name: systemKey required: true type: string - in: header description: Token obtained through user authentication name: ClearBlade-DevToken required: true type: string - in: query description: Tags to filter devices by. See the [REST API query schema](https://docs.clearblade.com/iotenterprise/rest-api-query-schema) for an example. name: query required: true type: string responses: '200': description: Successfully deleted devices '400': description: Bad request '/admin/devices/{systemKey}/{name}': get: operationId: GetSystemDevice summary: description: Retrieves the specified device's information tags: - Developer produces: - application/json parameters: - in: header description: Developer token obtained through admin authentication name: ClearBlade-DevToken required: true type: string - in: path description: System key that identifies the system the device belongs to name: systemKey required: true type: string - in: path description: The device's name you're getting info about name: name required: true type: string responses: '200': description: No response was specified put: operationId: UpdateSystemDevice summary: description: Updates the specified device's information tags: - Developer produces: - application/json parameters: - in: header description: Developer token obtained through admin authentication name: ClearBlade-DevToken required: true type: string - in: path description: System key that identifies the system the device you're updating belongs to name: systemKey required: true type: string - in: path description: The device name you're updating name: name required: true type: string - in: body description: Updated device information name: body required: true schema: $ref: '#/definitions/deviceAdminUpdate' responses: '200': description: No response was specified post: operationId: CreateSystemDevice summary: description: Creates a new device in the specified system tags: - Developer produces: - application/json parameters: - in: header description: Developer token obtained through admin authentication name: ClearBlade-DevToken required: true type: string - in: path description: System key that identifies the system the new device will belong to name: systemKey required: true type: string - in: path description: The device name you're creating name: name required: true type: string - in: body description: New device information name: body required: true schema: $ref: '#/definitions/deviceAdminNew' responses: '200': description: No response was specified delete: operationId: DeleteSystemDevice summary: description: Deletes the specified device from its system tags: - Developer produces: - application/json parameters: - in: header description: Developer token obtained through admin authentication name: ClearBlade-DevToken required: true type: string - in: path description: System key that identifies the system the device belongs to name: systemKey required: true type: string - in: path description: The device name you're deleting name: name required: true type: string responses: '200': description: No response was specified '/admin/devices/keys/{systemKey}/{deviceName}': post: operationId: CreateRotatingKeys summary: description: Creates rotating keys for a device tags: - Device produces: - application/json parameters: - in: header description: Developer token obtained through developer authentication name: ClearBlade-DevToken required: true type: string - in: path description: System key that identifies the system the device you're updating belongs to name: systemKey required: true type: string - in: path description: The device's name you are adding keys to name: deviceName required: true type: string - in: body description: Number of rotating keys name: body required: true schema: $ref: '#/definitions/count' responses: '200': description: No response was specified schema: $ref: '#/definitions/deviceKey' delete: operationId: DeleteDeviceKeys summary: description: Deletes the rotating keys from its device tags: - Developer produces: - application/json parameters: - in: header description: Developer token obtained through developer authentication name: ClearBlade-DevToken required: true type: string - in: path description: System key that identifies the system the device belongs to name: systemKey required: true type: string - in: path description: The device name whose keys are being deleted name: deviceName required: true type: string responses: '200': description: Deletes rotating keys '/admin/edges/{systemKey}': get: operationId: GetEdges summary: description: Retrieves all the edges that belong to the specified system tags: - Developer produces: - application/json parameters: - in: header description: Developer token obtained through admin authentication name: ClearBlade-DevToken required: true type: string - in: path description: System key that identifies the system the edges belong to name: systemKey required: true type: string responses: '200': description: No response was specified '/admin/edges/{systemKey}/control': get: operationId: GetAdapterEdges summary: description: Retrieves all the edges the adapter belongs to tags: - Developer produces: - application/json parameters: - in: header description: Developer token obtained through admin authentication name: ClearBlade-DevToken required: true type: string - in: path description: System key that identifies the system the edges belong to name: systemKey required: true type: string responses: '200': description: No response was specified '/admin/edges/{systemKey}/{edgeName}': get: operationId: GetEdge summary: description: Retrieves the specified edge's information tags: - Developer produces: - application/json parameters: - in: header description: Developer token obtained through admin authentication name: ClearBlade-DevToken required: true type: string - in: path description: System key that identifies the system the edge belongs to name: systemKey required: true type: string - in: path description: The edge name you're getting info about name: edgeName required: true type: string responses: '200': description: No response was specified put: operationId: UpdateEdge summary: description: Updates the specified edge's information tags: - Developer produces: - application/json parameters: - in: header description: Developer token obtained through admin authentication name: ClearBlade-DevToken required: true type: string - in: path description: System key that identifies the system the edge you're updating belongs to name: systemKey required: true type: string - in: path description: The edge name you're updating name: edgeName required: true type: string - in: body description: Updated edge information name: Edge required: true schema: $ref: '#/definitions/edgeUpdate' responses: '200': description: No response was specified post: operationId: CreateEdge summary: description: Creates a new edge in the specified system tags: - Developer produces: - application/json parameters: - in: header description: Developer token obtained through admin authentication name: ClearBlade-DevToken required: true type: string - in: path description: System key that identifies the system the new edge will belong to name: systemKey required: true type: string - in: path description: The edge name you're creating name: edgeName required: true type: string - in: body description: New edge information name: body required: true schema: $ref: '#/definitions/edgeNew' responses: '200': description: No response was specified delete: operationId: DeleteEdge summary: description: Deletes the specified edge from its system tags: - Developer produces: - application/json parameters: - in: header description: Developer token obtained through admin authentication name: ClearBlade-DevToken required: true type: string - in: path description: System key that identifies the system the edge belongs to name: systemKey required: true type: string - in: path description: The edge name you're deleting name: edgeName required: true type: string responses: '200': description: No response was specified '/admin/edges/template/{systemKey}': get: operationId: GetEdgeTemplate summary: description: Get a list of which triggers, services and libraries should be copied onto which edge when it starts tags: - Developer produces: - application/json parameters: - in: header description: Developer token obtained through admin authentication name: ClearBlade-DevToken required: true type: string - in: path description: System key that identifies the system the edge template belongs to name: systemKey required: true type: string responses: '200': description: No response was specified '/admin/edges/template/{systemKey}/{edgeName}': put: operationId: UpdateEdgeTemplate summary: description: Update the template for the specified edge tags: - Developer produces: - application/json parameters: - in: header description: Developer token obtained through admin authentication name: ClearBlade-DevToken required: true type: string - in: path description: System key that identifies the system the edge template belongs to name: systemKey required: true type: string - in: path description: The edge name you're modifying the template for name: edgeName required: true type: string - in: body description: List of resources to add or remove to an edge's template name: add required: true schema: $ref: '#/definitions/edgeTemplateUpdate' responses: '200': description: No response was specified '/codeadmin/v/2/{systemKey}/{serviceName}': put: operationId: UpdateService summary: description: Updates the code service's information and data tags: - Developer produces: - application/json parameters: - in: header description: Developer token obtained through admin authentication name: ClearBlade-DevToken required: true type: string - in: path description: System key that identifies the system the code service belongs to name: systemKey required: true type: string - in: path description: Code service's name name: serviceName required: true type: string - in: body description: List of resources to add or remove to an edge's template name: payload required: false schema: $ref: '#/definitions/serviceUpdate' responses: '200': description: No response was specified '400': description: Bad request '500': description: Internal server error post: operationId: AddService summary: description: Adds code service to the system tags: - Developer produces: - application/json parameters: - in: header description: Developer token obtained through admin authentication name: ClearBlade-DevToken required: true type: string - in: path description: System key that identifies the system that holds the library name: systemKey required: true type: string - in: path description: Code service's name name: serviceName required: true type: string - in: body description: Code service information name: body required: true schema: $ref: '#/definitions/addservice' responses: '200': description: Code service successfully added '500': description: Server error delete: operationId: DeleteService summary: description: Deletes a local library from the specified system tags: - Developer produces: - application/json parameters: - in: header description: Developer token obtained through admin authentication name: ClearBlade-DevToken required: true type: string - in: path description: System key that identifies the system that holds the library name: systemKey required: true type: string - in: path description: Code service's name name: serviceName required: true type: string responses: '200': description: The library was successfully deleted '500': description: Server error '/codeadmin/v/2/library/{systemKey}': get: operationId: GetLibraries summary: description: Returns the specified system's available libraries and their meta information tags: - Developer produces: - application/json parameters: - in: header description: Developer token obtained through admin authentication name: ClearBlade-DevToken required: true type: string - in: path description: System key that identifies the system that holds the libraries name: systemKey required: true type: string responses: '200': description: A list of available libraries and information about them '500': description: Server error. '/codeadmin/v/2/library/{systemKey}/{libName}': get: operationId: GetLibrary summary: description: Returns the specified library and its meta information tags: - Developer produces: - application/json parameters: - in: header description: Developer token obtained through admin authentication name: ClearBlade-DevToken required: true type: string - in: path description: System key that identifies the system that holds the library name: systemKey required: true type: string - in: path description: Library's name name: libName required: true type: string responses: '200': description: The specified library and its metadata '500': description: Server error put: operationId: UpdateLibrary summary: description: Updates local library tags: - Developer produces: - application/json parameters: - in: header description: Developer token obtained through admin authentication name: ClearBlade-DevToken required: true type: string - in: path description: System key that identifies the system that holds the library name: systemKey required: true type: string - in: path description: Library's name name: libName required: true type: string - in: body description: Updated library information and code name: body required: true schema: $ref: '#/definitions/updatedata' responses: '200': description: The library has successfully updated '500': description: Server error post: operationId: CreateLibrary summary: description: Creates a local library in the specified system tags: - Developer produces: - application/json parameters: - in: header description: Developer token obtained through admin authentication name: ClearBlade-DevToken required: true type: string - in: path description: System key that identifies the system that holds the library name: systemKey required: true type: string - in: path description: Library's name name: libName required: true type: string - in: body description: New library information and code name: body required: true schema: $ref: '#/definitions/libdata' responses: '200': description: Library successfully created '500': description: Server error delete: operationId: DeleteLibrary summary: description: Deletes a local library from the specified system tags: - Developer produces: - application/json parameters: - in: header description: Developer token obtained through admin authentication name: ClearBlade-DevToken required: true type: string - in: path description: System key that identifies the system that holds the library name: systemKey required: true type: string - in: path description: Library's name name: libName required: true type: string responses: '200': description: The library was successfully deleted. '500': description: Server error '/codeadmin/v/2/history/library/{systemKey}/{libName}': get: operationId: LibraryHistory summary: description: Returns a library's previous versions tags: - Developer produces: - application/json parameters: - in: header description: Developer token obtained through admin authentication name: ClearBlade-DevToken required: true type: string - in: path description: System key that identifies the system that holds the library name: systemKey required: true type: string - in: path description: Library's name name: libName required: true type: string responses: '200': description: The specified library's history '500': description: Server error '/codeadmin/v/2/history/library/{systemKey}/{libName}/{libVersion}': get: operationId: GetOldLibraryVersion summary: description: Gets a library's old version tags: - Developer produces: - application/json parameters: - in: header description: Developer token obtained through admin authentication name: ClearBlade-DevToken required: true type: string - in: path description: System key that identifies the system that holds the library name: systemKey required: true type: string - in: path description: Library's name name: libName required: true type: string - in: path description: Library's version name: libVersion required: true type: string responses: '200': description: The specified library's old version '500': description: Server error. '/codeadmin/v/2/logs/{systemKey}/{serviceName}': get: operationId: GetLogs summary: description: Returns a log list for the code service tags: - Developer produces: - application/json parameters: - in: header description: Developer token obtained through admin authentication name: ClearBlade-DevToken required: true type: string - in: path description: System key that identifies the system with the failed services name: systemKey required: true type: string - in: path description: Code service's name name: serviceName required: true type: string responses: '200': description: Returns log history '500': description: Server error /codeadmin/failed: get: operationId: GetFailedServices summary: description: Returns list of failed code services for all systems the current developer is authorized to see tags: - Developer produces: - application/json parameters: - in: header description: Developer token obtained through admin authentication name: ClearBlade-DevToken required: true type: string responses: '200': description: List of failed services '/codeadmin/failed/{systemKey}': get: operationId: GetSystemFailedServices summary: description: Returns a list of failed code services for the specified system tags: - Developer produces: - application/json parameters: - in: header description: Developer token obtained through admin authentication. Dev token or user token are required fields name: ClearBlade-DevToken required: false type: string - in: header description: User token obtained through admin authentication. User token or dev token are required fields name: ClearBlade-UserToken required: false type: string - in: path description: System key that identifies the system with the failed services name: systemKey required: true type: string responses: '200': description: List of failed services post: operationId: RetryFailedService summary: description: Retries one failed service in the specified system tags: - Developer produces: - application/json parameters: - in: header description: Developer token obtained through admin authentication. Dev token or user token are required fields name: ClearBlade-DevToken required: false type: string - in: header description: User token obtained through admin authentication. User token or dev token are required fields name: ClearBlade-UserToken required: false type: string - in: path description: System key that identifies the system with the failed services name: systemKey required: true type: string - in: body description: Unique ID of the failed code service you're retrying name: id required: false schema: type: string responses: '200': description: Code service was successfully executed delete: operationId: DeleteFailedService summary: description: Deletes the specified failed service run from the list of failed service runs. Does not delete the service. tags: - Developer produces: - application/json parameters: - in: header description: Developer token obtained through admin authentication. Dev token or user token are required fields name: ClearBlade-DevToken required: false type: string - in: header description: User token obtained through admin authentication. User token or dev token are required fields name: ClearBlade-UserToken required: false type: string - in: path description: System key that identifies the system with the failed services name: systemKey required: true type: string - in: body description: Unique ID of the failed code service run you're deleting name: id required: false schema: type: string responses: '200': description: Run was successfully deleted from the list of failed runs /admin/platform/developers: get: operationId: GetDevs summary: description: Returns the platform's developers tags: - Admin produces: - application/json parameters: - in: header description: Developer token obtained through admin authentication name: ClearBlade-DevToken required: true type: string - in: query description: Response page size name: pagesize required: false type: string - in: query description: Response page number name: pagenum required: false type: string - in: query description: '' name: total required: false type: string - in: query description: Filter response name: filter required: false type: string responses: '200': description: No response was specified /admin/platform/developer: get: operationId: GetDev summary: description: Returns the specified developer's information tags: - Admin produces: - application/json parameters: - in: header description: Developer token obtained through admin authentication name: ClearBlade-DevToken required: true type: string - in: query description: The developer's email in question name: developer required: true type: string responses: '200': description: No response was specified post: operationId: DisableDev summary: description: Disables the specified developer on the platform tags: - Developer produces: - application/json parameters: - in: header description: Developer token obtained through admin authentication name: ClearBlade-DevToken required: true type: string - in: body description: Information to identify the developer you're disabling name: body required: true schema: $ref: '#/definitions/disableData' responses: '200': description: No response was specified '/admin/portals/{systemKey}': get: operationId: GetPortalInfo summary: description: Returns a specified portal's information tags: - Developer produces: - application/json parameters: - in: header description: Developer token obtained through developer authentication name: ClearBlade-DevToken required: true type: string - in: path description: System key that identifies the specified system name: systemKey required: true type: string responses: '200': description: No response was specified schema: $ref: '#/definitions/portalArray' '/api/about': get: operationId: APIInfo summary: description: Returns the platform version's information produces: - application/json responses: '200': description: Returns platform version information schema: $ref: '#/definitions/platformInfo' '/admin/platform/{systemKey}': get: operationId: GetSystemStatus summary: description: Retrieves the specified system's status relating to limits to be used by the billing system tags: - Admin produces: - application/json parameters: - in: header description: Developer token obtained through admin authentication name: ClearBlade-DevToken required: true type: string - in: path description: System key that identifies the system you're requesting information about name: systemKey required: true type: string responses: '200': description: No response was specified /admin/count/developers: get: operationId: GetAdminDevCount summary: description: Retrieves the number of developers who are system administrators tags: - Admin produces: - application/json parameters: - in: header description: Developer token obtained through admin authentication name: ClearBlade-DevToken required: true type: string responses: '200': description: Returns number of admin developers '400': description: Bad request /admin/count/systems: get: operationId: GetSystemCount summary: description: Retrieves the number of systems available tags: - Admin produces: - application/json parameters: - in: header description: Developer token obtained through admin authentication name: ClearBlade-DevToken required: true type: string responses: '200': description: No response was specified '400': description: Bad request '404': description: Not found '/admin/developers/{systemKey}': put: operationId: AdminOwnerChange summary: description: For Admin, you can add/remove/change a system's owner even if you’re not it. For Developer, you can add/remove a developer as long as you’re the system owner. tags: - Admin - Developer produces: - application/json parameters: - in: path description: System key that identifies the system that holds the deployment name: systemKey required: true type: string - in: header description: Developer token obtained through admin authentication name: ClearBlade-DevToken required: true type: string - in: body description: Updated system owner email name: body required: false schema: $ref: '#/definitions/updateOwner' responses: '200': description: Owner successfully added/removed '400': description: Bad request '500': description: Internal server error '/admin/systems/{devEmail}': get: operationId: GetSystemsForDev summary: description: Get the list of systems the developer has access to tags: - Admin produces: - application/json parameters: - in: header description: Developer token obtained through admin authentication name: ClearBlade-DevToken required: true type: string - in: path description: The Developer's email in the format `name@orgname.com` name: devEmail required: true type: string responses: "200": description: List of systems the developer has access to schema: $ref: "#/definitions/systemInfo" "400": description: Bad request schema: $ref: "#/definitions/ErrorResp" /admin/validate: post: operationId: SendValidation summary: description: | ## Description: Sends a validation link to the developer's email or phone. This endpoint is for Dev only. ## Validation method types: * email * phone tags: - 2FA produces: - application/json parameters: - in: header description: Developer token obtained through admin authentication name: ClearBlade-DevToken required: true type: string - in: body description: The method type to validate name: body required: true schema: $ref: '#/definitions/validation' responses: '200': description: Validation successfully sent schema: $ref: '#/definitions/SuccessResp' '400': description: Bad request schema: $ref: '#/definitions/ErrorResp' /admin/settings/email-service: get: operationId: EmailSettings summary: description: Gets email communication settings. This endpoint is Admin only. tags: - 2FA produces: - application/json parameters: - in: header description: Developer token obtained through admin authentication name: ClearBlade-DevToken required: true type: string responses: '200': description: Returns email communication settings schema: $ref: '#/definitions/emailSettings' '400': description: Bad request schema: $ref: '#/definitions/ErrorResp' post: operationId: CreateEmailCommunication summary: description: | ## Description: Creates email communication. This endpoint is Admin only. ## Settings choices |Settings|Allowed Values| |--------|-----| |encryption_type|STARTTLS, TLS, NONE| |protocol|SMTP| tags: - 2FA produces: - application/json parameters: - in: header description: Developer token obtained through admin authentication name: ClearBlade-DevToken required: true type: string - in: body description: The email settings to be updated name: body required: true schema: $ref: '#/definitions/emailSettings' responses: '200': description: Successfully added email service settings '400': description: Bad request schema: $ref: '#/definitions/ErrorResp' put: operationId: UpdateEmailSettings summary: 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 tags: - 2FA produces: - application/json parameters: - in: header description: Developer token obtained through admin authentication name: ClearBlade-DevToken required: true type: string - in: body description: The email settings to be updated name: body required: true schema: $ref: '#/definitions/emailSettings' responses: '200': description: Successfully updated email service settings schema: $ref: '#/definitions/SuccessResp' '400': description: Bad request schema: $ref: '#/definitions/ErrorResp' delete: operationId: DeleteEmailSettings summary: description: Deletes email communication settings. This endpoint is Admin only. tags: - 2FA produces: - application/json parameters: - in: header description: Developer token obtained through admin authentication name: ClearBlade-DevToken required: true type: string responses: '200': description: Email settings were successfully deleted schema: $ref: '#/definitions/SuccessResp' '400': description: Bad request schema: $ref: '#/definitions/ErrorResp' /admin/settings/email-service/test: post: operationId: TestEmail summary: description: Test email service. This endpoint is Admin only. tags: - 2FA produces: - application/json parameters: - in: header description: Developer token obtained through admin authentication name: ClearBlade-DevToken required: true type: string - in: body description: The recipient's email to send the test message name: body required: true schema: $ref: '#/definitions/emailTest' responses: '200': description: Successfully sends a test email schema: $ref: '#/definitions/SuccessResp' '400': description: Bad request schema: $ref: '#/definitions/ErrorResp' /admin/settings/sms-service: get: operationId: SMSSettings summary: description: Gets SMS communication settings. This endpoint is Admin only. tags: - 2FA produces: - application/json parameters: - in: header description: Developer token obtained through admin authentication name: ClearBlade-DevToken required: true type: string responses: '200': description: Returns SMS communication settings schema: $ref: '#/definitions/SMSSettings' '400': description: Bad request schema: $ref: '#/definitions/ErrorResp' post: operationId: CreateSMSCommunication summary: description: Creates SMS communication. Twilio is the only supported service. This endpoint is Admin only. tags: - 2FA produces: - application/json parameters: - in: header description: Developer token obtained through admin authentication name: ClearBlade-DevToken required: true type: string - in: body description: The SMS settings to be updated name: body required: true schema: $ref: '#/definitions/SMSSettings' responses: '200': description: Successfully added SMS service settings schema: $ref: '#/definitions/SuccessResp' '400': description: Bad request schema: $ref: '#/definitions/ErrorResp' put: operationId: UpdateSMSSettings summary: description: Updates SMS communication settings. Twilio is the only supported service. This endpoint is Admin only. tags: - 2FA produces: - application/json parameters: - in: header description: Developer token obtained through admin authentication name: ClearBlade-DevToken required: true type: string - in: body description: The SMS settings to be updated name: body required: true schema: $ref: '#/definitions/SMSSettings' responses: '200': description: Successfully updated SMS service settings schema: $ref: '#/definitions/SuccessResp' '400': description: Bad request schema: $ref: '#/definitions/ErrorResp' delete: operationId: DeleteSMSSettings summary: description: Deletes SMS communication settings. This endpoint is Admin only. tags: - 2FA produces: - application/json parameters: - in: header description: Developer token obtained through admin authentication name: ClearBlade-DevToken required: true type: string responses: '200': description: SMS settings were successfully deleted schema: $ref: '#/definitions/SuccessResp' '400': description: Bad request schema: $ref: '#/definitions/ErrorResp' /admin/settings/sms-service/test: post: operationId: TestSMS summary: description: Test SMS service. This endpoint is Admin only. tags: - 2FA produces: - application/json parameters: - in: header description: Developer token obtained through admin authentication name: ClearBlade-DevToken required: true type: string - in: body description: The recipient's phone number to send the test message name: body required: true schema: $ref: '#/definitions/SMSTest' responses: '200': description: Successfully sends a test message schema: $ref: '#/definitions/SuccessResp' '400': description: Bad request schema: $ref: '#/definitions/ErrorResp' /admin/settings/security: get: operationId: ViewSecurity summary: description: View instance-wide security settings. This endpoint is Admin only. tags: - 2FA produces: - application/json parameters: - in: header description: Developer token obtained through admin authentication name: ClearBlade-DevToken required: true type: string responses: '200': description: Returns 2FA security settings schema: $ref: '#/definitions/SecuritySettings' '400': description: Bad request schema: $ref: '#/definitions/ErrorResp' put: operationId: UpdateSecurity summary: description: Update instance-wide security settings. TTL must be between 86400 and 2592000 seconds. This endpoint is Admin only. tags: - 2FA produces: - application/json parameters: - in: header description: Developer token obtained through admin authentication name: ClearBlade-DevToken required: true type: string - in: body description: The SMS settings to be updated name: body required: true schema: $ref: '#/definitions/SecuritySettings' responses: '200': description: Successfully updated 2FA security settings schema: $ref: '#/definitions/SecuritySettings' '400': description: Bad request schema: $ref: '#/definitions/ErrorResp' /admin/audit: get: operationId: GetAudit summary: description: | ## Description: Returns list of assets and the information about the changes made. This endpoint is for Admin only. ### Query structure: ```json {"PAGESIZE":int,"PAGENUM":int,"FILTERS":[[{"_REPLACE_WITH_OPERATOR_":[{"valueType":"value"}]}]], "SORT":[{"DESC":"value"}]} ``` 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} ``` tags: - Audit produces: - application/json parameters: - in: header description: Developer token obtained through admin authentication name: ClearBlade-DevToken required: true type: string - in: query description: Query object used to filter the items. See the [REST API query schema](https://docs.clearblade.com/iotenterprise/rest-api-query-schema) for an example. name: query required: false type: string responses: '200': description: Returns audit information schema: $ref: '#/definitions/auditInfo' /admin/audit/count: get: operationId: GetCounts summary: description: Gets the total number of changes made to assets across the instance's systems. This endpoint is Admin only. tags: - Audit produces: - application/json parameters: - in: header description: Developer token obtained through admin authentication name: ClearBlade-DevToken required: true type: string responses: '200': description: Returns the number of actions /admin/audit/{systemKey}: get: operationId: GetAuditDev summary: description: | ## Description: Returns a list of assets and the information about the changes made. This endpoint is for Admin and Dev. ### Query structure: ```json {"PAGESIZE":int,"PAGENUM":int,"FILTERS":[[{"_REPLACE_WITH_OPERATOR_":[{"valueType":"value"}]}]], "SORT":[{"DESC":"value"}]} ``` 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} ``` tags: - Audit produces: - application/json parameters: - in: path description: System key that identifies the system that holds the deployment name: systemKey required: true type: string - in: header description: Developer token obtained through admin authentication name: ClearBlade-DevToken required: true type: string - in: query description: Query object used to filter the items. See the [REST API query schema](https://docs.clearblade.com/iotenterprise/rest-api-query-schema) for an example. name: query required: false type: string responses: '200': description: Returns audit information schema: $ref: '#/definitions/auditInfo' /admin/audit/{systemKey}/count: get: operationId: GetCountsDev summary: description: Gets the total number of changes made to assets across the instance's systems. This endpoint is for Admin and Dev. tags: - Audit produces: - application/json parameters: - in: path description: System key that identifies the system that holds the deployment name: systemKey required: true type: string - in: header description: Developer token obtained through admin authentication name: ClearBlade-DevToken required: true type: string responses: '200': description: Returns the number of actions /admin/platform/systems: get: operationId: GetSystemUpdates summary: description: | ## Description: Get a 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"}]} ``` 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} ``` tags: - Audit produces: - application/json parameters: - in: header description: Developer token obtained through admin authentication name: Clearblade-DevToken required: true type: string - in: query description: Query object used to filter the items. See the [REST API query schema](https://docs.clearblade.com/iotenterprise/rest-api-query-schema) for an example. name: query required: false type: string responses: '200': description: No response was specified schema: $ref: '#/definitions/systemInfo' /admin/platform/systems/{systemKey}: get: operationId: GetSystemUpdatesDev summary: description: | ## Description: Get a list of changes 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"}]} ``` 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} ``` tags: - Audit produces: - application/json parameters: - in: path description: System key that identifies the system that holds the deployment name: systemKey required: true type: string - in: header description: Developer token obtained through admin authentication name: clearblade-devtoken required: true type: string - in: query description: Query object used to filter the items. See the [REST API query schema](https://docs.clearblade.com/iotenterprise/rest-api-query-schema) for an example. name: query required: false type: string responses: '200': description: No response was specified schema: $ref: '#/definitions/systemInfo' '/api/v/3/{systemKey}/deployments': get: operationId: GetAllDeployments summary: tags: - Deployments produces: - application/json description: | ## Description: Gets a system's deployment names and descriptions ### Query: ```json {"PAGESIZE":int,"PAGENUM":int,"FILTERS":[[{"EQ":[{"valueType":"value"}]}]],"SORT":[{"DESC":"value"}]} ``` ### Example: ```json {"PAGESIZE":0,"PAGENUM":0,"SORT":[{"DESC":"name"}]} parameters: - in: header description: Token obtained through user authentication. User token or dev token are required fields name: ClearBlade-UserToken required: false type: string - in: header description: Token obtained through dev authentication. Dev token or user token are required fields name: ClearBlade-DevToken required: false type: string - in: query description: Tags to filter deployments by. See the [REST API query schema](https://docs.clearblade.com/iotenterprise/rest-api-query-schema) for an example. name: query required: false type: string - in: path description: System key that identifies the system that holds the deployment name: systemKey required: true type: string responses: '200': description: Deployments retrieved successfully schema: $ref: '#/definitions/deploymentSuccess' '500': description: Server error post: operationId: CreateDeployment summary: description: Creates one deployment for the system tags: - Deployments produces: - application/json parameters: - in: header description: Token obtained through user authentication. User token or dev token are required fields name: ClearBlade-UserToken required: false type: string - in: header description: Token obtained through dev authentication. Dev token or user token are required fields name: ClearBlade-DevToken required: false type: string - in: path description: System key that identifies the system that holds the deployment name: systemKey required: true type: string - in: body description: Deployment information name: body required: true schema: $ref: '#/definitions/createDeployment' responses: '200': description: Deployment created successfully '500': description: Server error. '/api/v/3/{systemKey}/deployments/{deploymentName}': get: operationId: GetADeployment summary: tags: - Deployments produces: - application/json parameters: - in: header description: Token obtained through user authentication. User token or dev token are required fields name: clearblade-usertoken required: false type: string - in: header description: Token obtained through dev authentication. Dev token or user token are required fields name: clearblade-devtoken required: false type: string - in: path description: System key that identifies the system that holds the deployment name: systemKey required: true type: string - in: path description: The deployment's name to retrieve name: deploymentName required: true type: string responses: '200': description: Retrieved deployment successfully '500': description: Server error put: operationId: UpdateDeployment summary: description: Updates a deployment tags: - Deployments produces: - application/json parameters: - in: header description: Token obtained through user authentication. User token or dev token are required fields name: ClearBlade-UserToken required: false type: string - in: header description: Token obtained through dev authentication. Dev token or user token are required fields name: ClearBlade-DevToken required: false type: string - in: path description: System key that identifies the system that holds the deployment name: systemKey required: true type: string - in: path description: The deployment's name to update name: deploymentName required: true type: string - in: body description: Updated deployment information name: body required: true schema: $ref: '#/definitions/updateDeployment' responses: '200': description: Deployment successfully updated '500': description: Server error delete: operationId: DeleteDeployment summary: description: Deletes a deployment based on the name tags: - Deployments produces: - application/json parameters: - in: header description: Token obtained through user authentication. User token or dev token are required fields name: ClearBlade-UserToken required: false type: string - in: header description: Token obtained through dev authentication. Dev token or user token are required fields name: ClearBlade-DevToken required: false type: string - in: path description: System key that identifies the system that holds the deployment name: systemKey required: true type: string - in: path description: The deployment's name to delete name: deploymentName required: true type: string responses: '200': description: Deployment successfully deleted '500': description: Server error '/admin/{systemKey}/sync/deployment/status/{deploymentName}': get: operationId: GetSyncStatus summary: tags: - Deployments produces: - application/json parameters: - in: header description: Dev token obtained through user authentication name: ClearBlade-DevToken required: true type: string - in: path description: System key that identifies the system that holds the deployment name: systemKey required: true type: string - in: path description: The deployment's name to retrieve name: deploymentName required: true type: string 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 '/admin/{systemKey}/sync/retry': post: operationId: RetrySync summary: description: Retries sync for an asset in a deployment tags: - Deployments produces: - application/json parameters: - in: header description: Dev token obtained through dev authentication name: ClearBlade-DevToken required: true type: string - in: path description: System key that identifies the system that holds the deployment name: systemKey required: true type: string - in: body description: Sync information name: body required: true schema: $ref: '#/definitions/retrySync' responses: '200': description: Retries sync successfully '500': description: Server error '/admin/v/4/service_caches/{systemKey}': get: operationId: GetSharedCache summary: tags: - Shared cache produces: - application/json parameters: - in: header description: Dev token obtained through user authentication name: ClearBlade-DevToken required: true type: string - in: path description: System key that identifies the system that holds the deployment name: systemKey required: true type: string responses: '200': description: Retrieves a shared cache list schema: $ref: '#/definitions/CacheArrayResp' '400': description: Bad request schema: $ref: '#/definitions/ErrorResp' '401': description: Unauthorized. User cannot access resource. '/admin/v/4/service_caches/{systemKey}/{cacheName}': post: operationId: addSharedCache summary: description: Adds a shared cache to the system tags: - Shared cache produces: - application/json parameters: - in: header description: Dev token obtained through user authentication name: ClearBlade-DevToken required: true type: string - in: path description: System key that identifies the system that holds the shared cache name: systemKey required: true type: string - in: path description: The shared cache's name to add name: cacheName required: true type: string - in: body description: Information to create a shared cache name: body required: true schema: $ref: '#/definitions/addCache' 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' put: operationId: UpdateSharedCache summary: description: Updates shared cache properties, like TTL and description tags: - Shared cache produces: - application/json parameters: - in: header description: Dev token obtained through user authentication name: ClearBlade-DevToken required: true type: string - in: path description: System key that identifies the system that holds the shared cache name: systemKey required: true type: string - in: path description: The shared cache's name to update name: cacheName required: true type: string - in: body description: Updated cache information name: body required: true schema: $ref: '#/definitions/updateCache' 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' delete: operationId: DeleteSharedCache summary: description: Deletes a shared cache tags: - Shared cache produces: - application/json parameters: - in: header description: Dev token obtained through user authentication name: ClearBlade-DevToken required: true type: string - in: path description: System key that identifies the system that holds the deployment name: systemKey required: true type: string - in: path description: The shared cache's name to delete name: cacheName required: true type: string 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. '/admin/v/4/session/{systemKey}/user': get: operationId: GetUserSession summary: description: | ## Description: Returns a list of user sessions with user IDs and timestamps ### Query structure: ```json {"PAGESIZE":int,"PAGENUM":int,"FILTERS":[[{"_REPLACE_WITH_OPERATOR_":[{"valueType":"value"}]}]], "SORT":[{"DESC":"value"}]} ``` 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} ``` tags: - Session produces: - application/json parameters: - in: header description: Developer token obtained through admin authentication name: ClearBlade-DevToken required: true type: string - in: query description: Query object used to filter the items. See the [REST API query schema](https://docs.clearblade.com/iotenterprise/rest-api-query-schema) for an example. name: query required: false type: string - in: path description: System key that identifies the system name: systemKey required: true type: string responses: '200': description: Returns user session list schema: $ref: '#/definitions/userSession' '400': description: Bad request schema: $ref: '#/definitions/ErrorResp' '401': description: Unauthorized. User cannot access resource. delete: operationId: DeleteUserSession summary: description: | ## Description: Delete user session. ### Query structure: ```json {"PAGESIZE":int,"PAGENUM":int,"FILTERS":[[{"_REPLACE_WITH_OPERATOR_":[{"valueType":"value"}]}]], "SORT":[{"DESC":"value"}]} ``` 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} ``` tags: - Session produces: - application/json parameters: - in: header description: Developer token obtained through admin authentication name: ClearBlade-DevToken required: true type: string - in: query description: Query object used to filter the items. See the [REST API query schema](https://docs.clearblade.com/iotenterprise/rest-api-query-schema) for an example. name: query required: false type: string - in: path description: System key that identifies the system name: systemKey required: true type: string responses: '200': description: Deletes user session '400': description: Bad request schema: $ref: '#/definitions/ErrorResp' '401': description: Unauthorized '/admin/v/4/session/{systemKey}/user/count': get: operationId: GetUserSessionCount summary: description: | ## Description: Returns the number of user sessions ### Query structure: ```json {"PAGESIZE":int,"PAGENUM":int,"FILTERS":[[{"_REPLACE_WITH_OPERATOR_":[{"valueType":"value"}]}]], "SORT":[{"DESC":"value"}]} ``` 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} ``` tags: - Session produces: - application/json parameters: - in: header description: Developer token obtained through admin authentication name: ClearBlade-DevToken required: true type: string - in: query description: Query object used to filter the items. See the [REST API query schema](https://docs.clearblade.com/iotenterprise/rest-api-query-schema) for an example. name: query required: false type: string - in: path description: System key that identifies the system name: systemKey required: true type: string responses: '200': description: Returns the number of user sessions schema: $ref: '#/definitions/count' '/admin/v/4/session/{systemKey}/device': get: operationId: GetDeviceSession summary: 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"}]} ``` 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} ``` tags: - Session produces: - application/json parameters: - in: header description: Developer token obtained through admin authentication name: ClearBlade-DevToken required: true type: string - in: query description: Query object used to filter the items. See the [REST API query schema](https://docs.clearblade.com/iotenterprise/rest-api-query-schema) for an example. name: query required: false type: string - in: path description: System key that identifies the system name: systemKey required: true type: string responses: '200': description: Returns a list of device sessions schema: $ref: '#/definitions/deviceSession' delete: operationId: DeleteDeviceSession summary: description: | ## Description: Delete device session. ### Query structure: ```json {"PAGESIZE":int,"PAGENUM":int,"FILTERS":[[{"_REPLACE_WITH_OPERATOR_":[{"valueType":"value"}]}]], "SORT":[{"DESC":"value"}]} ``` 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} ``` tags: - Session produces: - application/json parameters: - in: header description: Developer token obtained through admin authentication name: ClearBlade-DevToken required: true type: string - in: query description: Query object used to filter the items. See the [REST API query schema](https://docs.clearblade.com/iotenterprise/rest-api-query-schema) for an example. name: query required: false type: string - in: path description: System key that identifies the system. name: systemKey required: true type: string responses: '200': description: Deletes device session '400': description: Bad request schema: $ref: '#/definitions/ErrorResp' '401': description: Unauthorized '/admin/v/4/session/{systemKey}/device/count': get: operationId: GetDeviceSessionCount summary: description: | ## Description: Returns the number of device sessions ### Query structure: ```json {"PAGESIZE":int,"PAGENUM":int,"FILTERS":[[{"_REPLACE_WITH_OPERATOR_":[{"valueType":"value"}]}]], "SORT":[{"DESC":"value"}]} ``` 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} ``` tags: - Session produces: - application/json parameters: - in: header description: Developer token obtained through admin authentication name: ClearBlade-DevToken required: true type: string - in: query description: Query object used to filter the items. See the [REST API query schema](https://docs.clearblade.com/iotenterprise/rest-api-query-schema) for an example. name: query required: false type: string - in: path description: System key that identifies the system name: systemKey required: true type: string responses: '200': description: Returns the number of device sessions schema: $ref: '#/definitions/count' '/api/v/4/bucket_sets/{systemKey}': get: operationId: GetBucketsData summary: description: Returns a system bucket metadata list tags: - Files produces: - application/json parameters: - in: header description: Developer token obtained through admin authentication. Dev token or user token are required fields name: ClearBlade-DevToken required: false type: string - in: header description: User token obtained through admin authentication. User token or dev token are required fields name: ClearBlade-UserToken required: false type: string - in: path description: System key that identifies the system name: systemKey required: true type: string responses: '200': description: Returns all buckets' metadata schema: $ref: '#/definitions/allBuckets' '/api/v/4/bucket_sets/{systemKey}/{bucketSetName}': get: operationId: GetSingleBucketData summary: description: Returns the specified bucket's metadata tags: - Files produces: - application/json parameters: - in: header description: Developer token obtained through admin authentication. Dev token or user token are required fields name: ClearBlade-DevToken required: false type: string - in: header description: User token obtained through admin authentication. User token or dev token are required fields name: ClearBlade-UserToken required: false type: string - in: path description: System key that identifies the system name: systemKey required: true type: string - in: path description: The bucketSetName to retrieve name: bucketSetName required: true type: string responses: '200': description: Returns a bucket's metadata schema: $ref: '#/definitions/buckets' '/api/v/4/bucket_sets/{systemKey}/{bucketSetName}/files': get: operationId: GetBoxFiles summary: description: | ## Description: Get a box file's metadata. 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 ``` tags: - Files produces: - application/json parameters: - in: header description: Developer token obtained through admin authentication name: ClearBlade-DevToken required: true type: string - in: query description: Query object used to filter the items. See the [REST API query schema](https://docs.clearblade.com/iotenterprise/rest-api-query-schema) for an example. name: box required: false type: string - in: path description: System key that identifies the system name: systemKey required: true type: string - in: path description: The bucketSetName to retrieve name: bucketSetName required: true type: string responses: '200': description: Returns all metadata from box files schema: $ref: '#/definitions/box' '/api/v/4/bucket_sets/{systemKey}/{bucketSetName}/file/meta': get: operationId: GetBoxFilesMeta summary: 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 ``` tags: - Files produces: - application/json parameters: - in: header description: Developer token obtained through admin authentication. Dev token or user token are required fields name: ClearBlade-DevToken required: false type: string - in: header description: User token obtained through admin authentication. User token or dev token are required fields name: ClearBlade-UserToken required: false type: string - in: query description: One of the inboxes, outboxes, or sandboxes. Defaults to 'inbox' if empty. name: box required: false type: string - in: query description: Query object used to filter the items. See the [REST API query schema](https://docs.clearblade.com/iotenterprise/rest-api-query-schema) for an example. name: path required: false type: string - in: path description: System key that identifies the system name: systemKey required: true type: string - in: path description: The bucketSetName to retrieve name: bucketSetName required: true type: string responses: '200': description: Returns a box file's metadata schema: $ref: '#/definitions/box_data' '/api/v/4/bucket_sets/{systemKey}/{bucketSetName}/file/read': get: operationId: GetBoxFileContent summary: description: | ## Description: Reads the content of a specific file in a specific box. boxName defaults to "inbox" ### Query structure: ```json box={boxName} path={relativePath} Note: path value must be URL encoded ``` ### 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=%2FTest.csv ``` tags: - Files produces: - application/json parameters: - in: header description: Developer token obtained through admin authentication. Dev token or user token are required fields name: ClearBlade-DevToken required: false type: string - in: header description: User token obtained through admin authentication. User token or dev token are required fields name: ClearBlade-UserToken required: false type: string - in: query description: One of the inboxes, outboxes, or sandboxes. Defaults to 'inbox' if empty. name: box required: false type: string - in: query description: Query object used to filter the items. See the [REST API query schema](https://docs.clearblade.com/iotenterprise/rest-api-query-schema) for an example. name: path required: false type: string - in: path description: System key that identifies the system name: systemKey required: true type: string - in: path description: The bucketSetName to retrieve name: bucketSetName required: true type: string responses: '200': description: Returns the file's content '/api/v/4/bucket_sets/{systemKey}/{bucketSetName}/file/create': post: operationId: CreateBucketFile summary: description: Creates a new file in a bucket tags: - Files produces: - application/json parameters: - in: header description: Developer token obtained through admin authentication. Dev token or user token are required fields name: ClearBlade-DevToken required: false type: string - in: header description: User token obtained through admin authentication. User token or dev token are required fields name: ClearBlade-UserToken required: false type: string - in: body name: Body schema: $ref: '#/definitions/createBox' - in: path description: System key that identifies the system name: systemKey required: true type: string - in: path description: The bucketSetName to retrieve name: bucketSetName required: true type: string responses: '200': description: Returns the new box file's metadata schema: $ref: '#/definitions/box_data' '/api/v/4/bucket_sets/{systemKey}/{bucketSetName}/file/copy': post: operationId: CopyBucketFile summary: description: Copies a file to a new location within buckets tags: - Files produces: - application/json parameters: - in: header description: Developer token obtained through admin authentication. Dev token or user token are required fields name: ClearBlade-DevToken required: false type: string - in: header description: User token obtained through admin authentication. User token or dev token are required fields name: ClearBlade-UserToken required: false type: string - in: body description: If `from_box` or `to_box` is empty, the corresponding path is a full path to the local file system. `from_box` and `to_box` cannot be simultaneously empty. name: Body schema: $ref: '#/definitions/copyFile' - in: path description: System key that identifies the system name: systemKey required: true type: string - in: path description: The bucketSetName to retrieve name: bucketSetName required: true type: string responses: '200': description: File is copied. Returns empty. '/api/v/4/bucket_sets/{systemKey}/{bucketSetName}/file/move': post: operationId: MoveBucketFile summary: description: Moves a file to a new location within buckets tags: - Files produces: - application/json parameters: - in: header description: Developer token obtained through admin authentication. Dev token or user token are required fields name: ClearBlade-DevToken required: false type: string - in: header description: User token obtained through admin authentication. User token or dev token are required fields name: ClearBlade-UserToken required: false type: string - in: body description: If `from_box` or `to_box` is empty, the corresponding path is a full path to the local file system. `from_box` and `to_box` cannot be simultaneously empty. name: Body schema: $ref: '#/definitions/copyFile' - in: path description: System key that identifies the system name: systemKey required: true type: string - in: path description: The bucketSetName to retrieve name: bucketSetName required: true type: string responses: '200': description: File is moved. Returns empty. '/api/v/4/bucket_sets/{systemKey}/{bucketSetName}/file/delete': post: operationId: DeleteBucketFile summary: description: Deletes a file from the bucket tags: - Files produces: - application/json parameters: - in: header description: Developer token obtained through admin authentication. Dev token or user token are required fields name: ClearBlade-DevToken required: false type: string - in: header description: User token obtained through admin authentication. User token or dev token are required fields name: ClearBlade-UserToken required: false type: string - in: body description: If `box` is empty, then `path` is treated as a full path in the local file system. name: Body schema: $ref: '#/definitions/deleteFile' - in: path description: System key that identifies the system name: systemKey required: true type: string - in: path description: The bucketSetName to retrieve name: bucketSetName required: true type: string responses: '200': description: File is deleted. Returns empty. definitions: QueryResultSet: type: object description: An object representing a SQL query result set properties: DATA: type: array description: An array containing each row returned by a query items: type: object TOTAL: type: integer description: The number of rows affected by a query userregdata: description: The information to be used for user registration. Custom fields may be added. required: - email - password properties: email: type: string description: User's email. example: cbman@clearblade.com password: type: string description: User's password. example: cl34rbl4d3 devregdata: description: The information to be used for user registration. Custom fields may be added. required: - email - password - fname - lname - org properties: email: type: string description: Developer's email. example: martin@clearblade.com password: type: string description: Developer's password. example: bieberboy fname: type: string description: Developer's first name. example: Martin lname: type: string description: Developer's last name. example: theMachine org: type: string description: Developer's organization. example: ClearBlade authdata: description: The credentials to be used for authentication and refreshing developer tokens properties: email: type: string example: cbman@clearblade.com password: type: string example: cl34rbl4d3 userdata: properties: column_name: type: string example: column_value deleteuserdata: properties: user_id: type: string example: c6b4cf0b8ca5b7c3fad793cb12 passdata: required: - old_password - new_password properties: old_password: type: string example: cl34rbl4d3 new_password: type: string example: P@ssw0rd deviceUserUpdate: description: Updated device information properties: state: type: string example: 'On' custom_attribute: type: string example: custom_setting deviceAuthdata: required: - deviceName - activeKey properties: deviceName: type: string example: BLEdevice activeKey: type: string example: 378BLE ColumnField: type: array items: $ref: '#/definitions/ItemID' ItemID: type: object properties: item_id: type: string example: "6e0227d8-8a98-454a-951d-a109f813a397" updatedata: required: - description - dependencies - code properties: description: type: string example: Random number generator dependencies: type: string example: log code: type: string example: 'function rand(){log(''rolling die''); return 3;}' libdata: required: - code - dependencies - visibility properties: code: type: string example: 'function getter(uri){var r=Requests();r.get({''uri'':uri},function(err,resp){log(JSON.stringify(resp));});}' dependencies: type: string example: 'http,log' visibility: type: string example: system addservice: required: - code - name - systemID - parameters properties: name: type: string example: serviceName code: type: string example: 'function serviceName(req,resp){resp.success(“success”);}' dependencies: type: string example: 'log' parameters: type: string example: ["{}"] run_user: type: string example: "" systemID: type: string example: "c0f8e2c50bc6cc90b7a19abbbb8d01" serviceUpdate: required: - auto_balance - auto_restart - code - concurrency - current_version - logging_enabled - name properties: auto_balance: description: If concurrency > 0, then auto_balance can be set to true if needed type: boolean auto_restart: type: boolean description: If execution_timeout = -1 => Stream Service then auto_restart can be set to true if needed code: type: string example: 'function serviceName(req,resp){resp.success(“success”);}' concurrency: type: integer example: 0 current_version: type: integer example: 4 execution_timeout: type: integer example: 60 dependencies: type: string example: "log" logging_enabled: type: boolean name: type: string example: serviceName timers: type: array example: [] triggers: type: array example: [] parameters: type: array example: [] run_user: description: "Uses user_id." type: string example: "e8b7f0cb0bdccdb7a8a7c78cdfcb01" newsystem: description: Info to create a new system required: - name - description properties: name: type: string example: 'ExampleSystem' description: type: string example: 'Here is my new system.' systemSettings: description: System info properties: appId: type: string description: system key example: 'a6e0f8e20bbefcec789de6b8f4cf01' appSecret: type: string description: system secret example: 'A6E0F8E20BDEB0C2838EF2B6D09801' name: type: string example: 'ExampleSystem' description: type: string example: 'Here is my new system.' token_ttl: type: string description: TTL for developer tokens in seconds. Min - 86400 (1 day), Max- 2592000 (30 days), Default - 432000 Infinite - -1 example: '432000' token_ttl_user: type: string description: TTL for user tokens in seconds. Min - 3600 (1 hour), Max- 7776000 (90 days), Default - 432000 (5 days) Infinite - -1 example: '432000' token_ttl_device: type: string description: TTL for device tokens in seconds. Min - 3600 (1 hour), Max- 7776000 (90 days), Default - 432000 (5 days) Infinite - -1 example: '432000' token_ttl_anon: type: integer description: TTL for anonymous tokens in seconds. Min - 3600 (1 hour), Max- 7776000 (90 days), Default - 432000 (5 days) Infinite - -1 example: '432000' Dev: type: string description: The system owner's developer ID example: '92f8dbbb0bccb3fff4be5cdb601' registration: type: string example: '' auth_service: description: Configure the system to have all authentication requests go through a specific code service type: string example: '' reg_service: description: Configure the system to have all registration requests go through a specific code service type: string example: '' addAdapter: description: The information to be used for adding an adapter required: - name properties: architecture: type: string description: The platform the adapter will be running on example: darwin-amd64 deploy_command: type: string description: The file name running for the deploy command example: "" logs_command: type: string description: A command or shell script to retrieve logs printed out by the running adapter example: "" name: type: string description: The adapter name example: example-adapter OS: type: string description: The OS this adapter will run on example: Linux start_command: type: string 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 must be manually started by connecting to the gateway device (via SSH) and issuing an appropriate start. example: "" status_command: type: string description: A command or shell script that will be run to determine the adapter's status on a specific ClearBlade Edge. A shell script that echoes the adapter's status should be supplied. example: "" stop_command: type: string 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 must be manually stopped by connecting to the gateway device (via SSH) and issuing an appropriate stop command. example: "" undeploy_command: type: string 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 ClearBlade Platform default behavior is to remove the adapter files from the directory where the Edge is running. example: "" MapAdapterCommand: description: The information to be used for adding a command to an adapter properties: architecture: type: string description: The platform the adapter will be running on example: darwin-amd64 OS: type: string description: The OS this adapter will run on example: Linux deploy_command: type: string description: The file name running for the deploy command example: "./deploy.sh" logs_command: type: string description: "" example: "./logs.sh" start_command: type: string 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 must be manually started by connecting to the gateway device (via SSH) and issuing an appropriate start. example: "./start.sh" status_command: type: string description: A command or shell script that will be run to determine the adapter's status on a specific ClearBlade Edge. A shell script that echoes an adapter's status should be supplied. example: "./status.sh" stop_command: type: string 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 must be manually stopped by connecting to the gateway device (via SSH) and issuing an appropriate stop command. example: "./stop.sh" undeploy_command: type: string 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 ClearBlade Platform's default behavior is to remove the adapter files from the directory where the Edge is running. example: "./undeploy.sh" run_stop_on_deploy: type: boolean description: "" example: true run_start_on_deploy: type: boolean description: "" example: true run_deploy_on_deploy: type: boolean description: "" example: true AdapterFileConfig: description: Adapter file content and config. To associate this file with a command, use the MapAdapterCommand endpoint. required: - name properties: adapter_name: type: string description: The adapter the file is a part of file: type: string description: The base64 encoded file content example: "IyEvYmluL2Jhc2gKbWtkaXIgU2hvd1RpbWVBZGFwdGVyCgptdiBzdGFydC5zaCBTaG93VGltZUFkYXB0ZXIKbXYgc3RvcC5zaCBTaG93VGltZUFkYXB0ZXIKbXYgc3RhdHVzLnNoIFNob3dUaW1lQWRhcHRlcgptdiBkZXBsb3kuc2ggU2hvd1RpbWVBZGFwdGVyCm12IHVuZGVwbG95LnNoIFNob3dUaW1lQWRhcHRlcgptdiBzaG93VGltZSBTaG93VGltZUFkYXB0ZXIKCmVjaG8gIlNob3dUaW1lQWRhcHRlciBEZXBsb3llZCI=" name: type: string description: The name of the file, spaces ` ` or `-` are not allowed path_name: type: string description: The file path where the adapter file is stored on the client side. For example, on the file system where the Edge is running. example: start.sh edgeCommand: description: The information for the command running on a specific edge required: - command - edges properties: command: type: string description: The command the edge is using example: status edges: type: string description: Edge names being used example: ["edgeName"] newcollection: description: The information necessary to create a new collection required: - appID - name properties: appID: type: string example: 'c0f8e2c50bbeeaf87f5efa2eee301' description: The system key collectionID: type: string example: "c0f8e2c50bbeeafb87f5efa2eee301" name: type: string example: "newCollection" addColumnInfo: required: - id - name - type properties: id: type: string example: 'c0f8e2c50bbeeafb87f5efa2eee301' description: This is the collection ID name: type: string example: Sensor_Location type: type: string example: "string" 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. required: - id properties: addColumn: $ref: '#/definitions/addColumnInfo' id: type: string example: 'c0f8e2c50bbeeafb87f5efa2eee301' description: The collection ID messagePublish: description: The topic, message body, and the QoS (0,1 or 2) required to publish a message required: - topic properties: topic: type: string example: '/sensor/111111' body: type: string example: '{"temperature":43}' qos: type: number example: 0 regensystem: description: Contains the system's ID to generate new keys required: - id properties: id: type: string example: '[systemID]' roles: description: Contains the roles to add or delete for the user required: - user - changes properties: user: type: string example: b4d8aaab0bf48e98dacbd78e9e50 changes: $ref: '#/definitions/changeroles' 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" changeroles: description: Changes roles required: - roles properties: roles: $ref: '#/definitions/changeRolesObject' changeRolesObject: description: Contains at least one of the keys, add or delete, which consists of an array of roles properties: add: type: array example: ["Administrator"] delete: type: array example: ["Authenticated"] addUserColumn: description: User column information required: - column_name - type properties: column_name: type: string example: phone_number type: type: string example: string changeRoleSettings: description: Changes individual role settings required: - changes - id properties: changes: $ref: '#/definitions/roleSettings' id: type: string example: Administrator roleSettings: description: Assets with permission changes properties: description: type: string allcollections: $ref: '#/definitions/changesInfo' allservices: $ref: '#/definitions/permissions' collections: $ref: '#/definitions/changesInfo' deployments: $ref: '#/definitions/permissions' 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' changesInfo: description: Item identification required: - itemInfo - permissions properties: itemInfo: $ref: '#/definitions/itemInfo' permissions: $ref: '#/definitions/permissions' itemInfo: description: Item identification required: - id - name properties: id: type: string example: 8edaedc50bcaf9cd88bce5c6e57a name: type: string example: sampleAsset devpass: description: Contains oldPass and newPass keys required: - old_password - new_password properties: old_password: type: string example: bieber1 new_password: type: string example: bieber2 devemail: description: Developer's email key required: - email properties: email: type: string example: rob@clearblade.com rolesinfo: description: Information about the roles required: - name properties: name: type: string example: Administrator collections: type: array example: [] description: type: string example: "" services: type: array example: [] topics: type: array example: [] userlogin: description: User login information required: - email - password properties: email: type: string example: helpme@clearblade.com password: type: string example: c13rb1ad3ru13z triggerdata: required: - def_module - def_name - service_name - key_value_pairs - disabled properties: def_module: type: string example: Messaging def_name: type: string example: Publish service_name: type: string example: updateTemps key_value_pairs: $ref: '#/definitions/KVPs' disabled: type: boolean description: Enable or disable trigger example: true KVPs: properties: topic: type: string example: temperature/sensorA timerdata: required: - frequency - name - repeats - service_name - disabled properties: description: type: string description: Timer information example: My 10-second timer frequency: type: integer description: Frequency (in seconds) between two consecutive timer handler invocations example: 10 name: type: string description: Timer label example: tenSecondTimer repeats: type: integer description: The number of times a timer handler is invoked. To invoke the handler indefinitely, set 'repeats = -1' example: 20 service_name: type: string description: The handler service invoked by the timer example: getTemps disabled: type: boolean description: Enable or disable timer example: true timerSuccess: description: Success response for timer properties: description: type: string example: My 10-second timer frequency: type: integer example: 10 name: type: string example: tenSecondTimer namespace: type: string example: tenSecond repeats: type: integer example: 20 service_name: type: string example: getTemps start_time: type: string example: '2017-07-03T19:52:41.693Z' system_key: type: string example: 828dead00b84d78ed580c5faa7a101 system_secret: type: string example: 828DEAD00BD6F9E9AF8FD2F3D817 timer_key: type: string example: 828dead00b84d78ed580c5faa7a101::tenSecondTimer user_id: type: string example: 92f8dbbb0bccb3fff4b2e0e5cdb601 user_token: type: string example: jt-w5IiOOnhuSp8hJbanB2Tluj_ShXphjAta0_6_mAcUPSbatjFRYr1m5Ojl4skSOZ3txbbkFWArnUnfNA== disableData: description: The information to be used for disabling a developer required: - email - admin - disabled properties: email: type: string admin: type: boolean disabled: type: boolean deploymentSuccess: type: array items: $ref: '#/definitions/deployment' deployment: properties: description: type: string example: This is an example deployment name: type: string example: deployment_name createDeployment: description: The information used to create a deployment required: - name properties: name: type: string edges: type: array description: Edge names to be included in the deployment example: - edge1 - edge2 - edge3 assets: type: array items: $ref: '#/definitions/Assets' updateDeployment: description: The information used to update a deployment required: - assets - edges properties: assets: type: object description: Assets to be added and removed from a deployment properties: add: type: array items: $ref: '#/definitions/Assets' remove: type: array items: $ref: '#/definitions/Assets' edges: type: object description: Edges to be added and removed from a deployment properties: adds: type: array items: type: string description: Edge names to be added to the deployment example: - edge1 - edge2 - edge3 removes: type: array items: type: string description: Edge names to be removed from the deployment example: - edge5 - edge6 - edge7 Assets: type: object description: Assets for the deployment properties: asset_class: type: string description: The names of the services, users, devices, triggers, timers, adapters, portals, plugins, or collections that are being updated in the deployment example: adapters asset_id: type: string description: Name of a particular asset or empty string for all assets example: adapter_name sync_to_edge: type: boolean description: Specifies whether the asset should be synced to all edges example: true sync_to_platform: type: boolean description: Specifies whether the asset should be synced to the platform example: true deviceAdminUpdate: description: Updated device information properties: type: type: string state: type: string description: type: string enabled: type: boolean allow_key_auth: type: boolean active_key: type: string keys: type: string allow_certificate_auth: type: boolean certificate: type: string custom: type: string changes: description: Changes roles and password properties: password: example: "test" type: "string" roles: $ref: "#/definitions/changeRolesObject" 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" updateOwner: description: New system owner email required: - owner - change properties: owner: type: string example: "owner@clearblade.com" change: items: $ref: '#/definitions/Change' Change: description: Owner changes properties: add: type: string example: "owner@clearblade.com" remove: type: string example: "owner@clearblade.com" deviceAdminNew: description: New device information required: - name - type - state - enabled - allow_key_auth - allow_certificate_auth properties: name: type: string type: type: string state: type: string description: type: string enabled: type: boolean allow_key_auth: type: boolean active_key: type: string keys: type: string allow_certificate_auth: type: boolean certificate: type: string custom: type: string edgeUpdate: description: Update edge required: - system_key - system_secret properties: system_key: type: string system_secret: type: string token: type: string public_addr: type: string public_port: type: string local_addr: type: string local_port: type: string description: type: string location: type: string mac_address: type: string edgeNew: description: New edge required: - system_key - system_secret - token properties: system_key: type: string system_secret: type: string token: type: string public_addr: type: string public_port: type: string local_addr: type: string local_port: type: string description: type: string location: type: string mac_address: type: string edgeTemplateUpdate: required: - def_name properties: def_module: $ref: '#/definitions/edgeTemplateModule' def_name: type: string edgeTemplateModule: properties: module: type: string enum: - trigger - service - library Item: properties: name: type: string id: type: integer format: int64 Collection: description: A data set that contains items required: - name - id properties: name: type: string tags: type: array items: type: string photoUrls: type: array items: type: string id: type: integer format: int64 category: type: string DataPut: properties: $set: type: object properties: 'columnName': example: 'newValue' query: $ref: '#/definitions/DataQuery' DataQuery: properties: FILTERS: type: array $ref: '#/definitions/DataArray' DataArray: type: array items: $ref: '#/definitions/DataArray2' DataArray2: type: array items: $ref: '#/definitions/DataObject' DataObject: type: object properties: EQ: $ref: '#/definitions/DataObject2' DataObject2: type: array items: $ref: '#/definitions/DataObjectItem' DataObjectItem: type: object properties: item_id: type: string example: "6e0227d8-8a98-454a-951d-a109f813a397" PutQuery: type: object properties: query: $ref: '#/definitions/Filters' $set: type: object properties: '[columnName]': example: '[newValue]' FilterQuery: type: object properties: SORT: type: array minLength: 0 items: $ref: '#/definitions/SortQuery' PAGESIZE: type: integer default: 100 PAGENUM: type: integer example: 1 Query: type: object properties: SORT: type: array minLength: 0 items: $ref: '#/definitions/SortObject' PAGESIZE: type: integer default: 100 PAGENUM: type: integer example: 1 FILTERS: $ref: '#/definitions/Filters' permissions: type: object description: "Read - 1, Create - 2, Update - 4, Delete - 8. Ex: R+C+D = 1+2+8 = 10" properties: permissions: type: integer example: 8 users: type: object properties: SORT: type: array minLength: 0 items: $ref: '#/definitions/SortUser' PAGESIZE: type: integer default: 100 PAGENUM: type: integer example: 1 Filters: type: array items: $ref: '#/definitions/Operator' SortQuery: type: object description: Sorts based on query properties: DESC: type: string description: Sort by descending values example: "datetime" SortUser: type: object description: Sort by user ID properties: ASC: type: string description: Sort by ascending values example: "user_id" SortObject: type: object description: Choose only one of the below properties properties: ASC: type: string description: Sort by ascending values in this column example: columnName DESC: type: string description: Sort by descending values in this column example: columnName Operator: type: object description: Choose only one of the below properties properties: EQ: type: array items: $ref: '#/definitions/OperatorValue' GT: type: array items: $ref: '#/definitions/OperatorValue' LT: type: array items: $ref: '#/definitions/OperatorValue' GTE: type: array items: $ref: '#/definitions/OperatorValue' LTE: type: array items: $ref: '#/definitions/OperatorValue' NEQ: type: array items: $ref: '#/definitions/OperatorValue' RE: type: array items: $ref: '#/definitions/OperatorValue' OperatorValue: type: object description: An object describing a column/value relationship to be used in a query's operators properties: '[columnName]': type: string description: '[itemValue]' addCache: description: The information given when adding a cache required: - ttl properties: description: type: string description: New shared cache description name: type: string example: sharedCache ttl: type: integer example: 30 minLength: 30 maxLength: 3600 updateCache: description: The information updated in a cache required: - ttl properties: description: type: string ttl: type: integer example: 30 minLength: 30 maxLength: 3600 getCacheResp: description: The list of shared cache returned type: object required: - id - name - system_key - ttl properties: description: type: string example: Here is an example description. id: description: The cache's unique ID type: string example: 54eb0787-50df-4099-b368-c68ea97f1ce2 name: type: string example: test_cache system_key: type: string example: b4d49dd00basfdb3deb4ccbefeb0df01 ttl: type: integer example: 30 minLength: 30 maxLength: 3600 CacheArrayResp: description: Cache list type: array items: $ref: '#/definitions/getCacheResp' SuccessResp: description: Success responses required: - success properties: success: type: boolean description: Describes if the action was successfully performed or not. example: true ErrorResp: description: Error responses type: object required: - error - statusCode properties: error: $ref: '#/definitions/Error' example: true statusCode: description: Error code type: integer example: 400 Error: description: Bad request error information required: - id - code - level - category - message - detail - line properties: id: type: string example: "f5471393-b45e-42dc-8a13-034284d291f5" code: type: integer example: 400 level: type: integer example: 1 category: type: string example: "User Permissions" message: type: string example: "Bad request" lowLevelError: type: object example: {} line: type: string example: "/go/src/clearblade/router/newRouter.go:336" detail: type: string example: "Invalid token" webhookResp: description: List of webhooks and properties type: array items: $ref: '#/definitions/getWebhook' getWebhook: type: object description: Webhook properties required: - auth_method - id - name - service_name - system_key - system_secret properties: auth_method: type: string example: "http_basic_auth" description: type: string example: Webhook to get data id: type: string example: "f2ca33c4-8bd0-45aa-af4a-da3467b451bc" name: type: string example: "webhook_example" service_name: type: string example: "service_example" system_key: type: string example: "ccafb4cf0bd0dcbcadaccaf9ebba01" system_secret: type: string example: "CCAFB4CF0BBABDDCE3F2F1E6C3E601" webhookCreate: type: object description: Webhook creation properties required: - auth_method - name - service_name properties: auth_method: type: string example: "http_basic_auth" description: type: string example: Create a webhook name: type: string example: "webhook_example" service_name: type: string example: "service_example" webhookUpdate: type: object description: Webhook update properties required: - auth_method properties: auth_method: type: string example: "http_basic_auth" description: type: string example: Create a webhook executeWebhook: description: Data passing through webhooks required: - data properties: data: type: string example: "Third-party server data" collectionSuccess: type: object description: Collection success response body required: - CURRENTPAGE - NEXTPAGEURL - PREVPAGEURL - TOTAL properties: CURRENTPAGE: type: integer example: 2 DATA: type: array items: $ref: '#/definitions/dataArray' NEXTPAGEURL: type: string 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" PREVPAGEURL: type: integer example: 1 TOTAL: type: integer example: 2 dataArray: type: object example: { 'row1': 'row1_data','row2': 'row2_data'} count: type: object example: { "count":1} columnSuccess: type: array items: $ref: '#/definitions/columnObject' columnObject: type: object properties: ColumnName: type: string example: "item_id" ColumnType: type: string example: "int" PK: type: boolean example: "false" allCollectionsSuccess: type: array items: $ref: '#/definitions/allCollections' allCollections: type: object properties: name: type: string example: Employee_List collectionID: type: string example: "92ceabdd0be690a3d3fdd9dbd3e901" appID: type: string description: The system key example: "c0f8e2c50bbeeafb87f5efa2eee301" getUsersSuccess: properties: Data: $ref: '#/definitions/getUsersData' Total: type: integer example: 1 getUsersData: type: array items: $ref: '#/definitions/getUsers' getUsers: properties: creation_date: type: string example: "2019-09-11T18:41:15Z" email: type: string example: "cbman@clearblade.com" user_id: type: string example: "ce81b8dd0bf6fea6cec6d3c19774" regUser: properties: creation_date: type: string example: "2019-09-11T18:41:15Z" email: type: string example: "cbman@clearblade.com" options: type: string example: "" user_id: type: string example: "ce81b8dd0bf6fea6cec6d3c19774" user_token: type: string example: "jt-w5IiOOnhuSp8hJbanB2Tluj_ShXphjAta0_6_mAcUPSbatjFRYr1m5Ojl4skSOZ3txbbkFWArnUnfNA==" expires_at: description: The format is UNIX timestamp. If the value is -1, then no refresh token is returned. type: integer example: 1589313683 refresh_token: type: string example: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOiJhNGE0YTNlYjBiZDg5ZmU4YmV4cCI6MTU4OTc0NTY4MywiaWF0IjoxNTg4ODgxNjgzfQ.K2Ji0HldYtUO0RgednnOq117cnZy-ij-C1k1a8qVMsw" authUser: properties: user_token: type: string example: "jt-w5IiOOnhuSp8hJbanB2Tluj_ShXphjAta0_6_mAcUPSbatjFRYr1m5Ojl4skSOZ3txbbkFWArnUnfNA==" user_id: type: string example: "ce81b8dd0bf6fea6cec6d3c19774" expires_at: description: The format is UNIX timestamp. If the value is -1, then no refresh token is returned. type: integer example: 1589313683 refresh_token: type: string example: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOiJhNGE0YTNlYjBiZDg5ZmU4YmV4cCI6MTU4OTc0NTY4MywiaWF0IjoxNTg4ODgxNjgzfQ.K2Ji0HldYtUO0RgednnOq117cnZy-ij-C1k1a8qVMsw" authAnon: properties: user_token: type: string example: "jt-w5IiOOnhuSp8hJbanB2Tluj_ShXphjAta0_6_mAcUPSbatjFRYr1m5Ojl4skSOZ3txbbkFWArnUnfNA==" userCheck: properties: is_authenticated: type: boolean example: true deviceAdd: properties: allow_certificate_auth: type: boolean allow_key_auth: type: boolean certificate: type: string description: type: string example: "This is a sensor" active_key: type: string example: "1574445864" name: type: string example: "device_name" state: type: string example: "On" type: type: string example: "Sensor" deviceUpdate: properties: allow_certificate_auth: type: boolean example: true allow_key_auth: type: boolean example: true certificate: type: string example: "" created_date: type: integer example: 1574445666 description: type: string example: "This device is a sensor" device_key: type: string example: "c0f8e2c50bbeeafb87f5efa2eee301 :: device_name" enabled: type: boolean example: true last_active_date: type: integer example: 1574445864 name: type: string example: "device_name" state: type: string example: "On" system_key: type: string example: "c0f8e2c50bbeeafb87f5efa2eee301" type: type: string example: "sensor" deviceAuth: properties: deviceToken: type: string example: "1dBfevzh0-lLVbZwx9DbyTLPyw-8F0RDq3qeUGqwinr8x3-bKMXLpfyliRSXsre5KxMn76CuChFQANoEEg==" deviceName: type: string example: "BLEdevice" expiresAt: description: The format is UNIX timestamp. If the value is -1, then no refresh token is returned. type: integer example: 1589313683 refreshToken: type: string example: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOiJhNGE0YTNlYjBiZDg5ZmU4YmV4cCI6MTU4OTc0NTY4MywiaWF0IjoxNTg4ODgxNjgzfQ.K2Ji0HldYtUO0RgednnOq117cnZy-ij-C1k1a8qVMsw" triggerArray: type: array items: $ref: '#/definitions/triggerList' triggerList: properties: system_key: type: string example: 'ccafb4cf0bd0dcbcadaccaf9ebba01' system_secret: type: string example: 'CCAFB4CF0BBABDDCE3F2F1E6C3E601' name: type: string example: 'Message_Trigger' namespace: type: string example: "" event_definition: $ref: '#/definitions/eventDefinition' key_value_pairs: type: object example: { "topic": "/CB/sensors/#"} service_name: type: string example: "TriggerHandler" eventDefinition: properties: def_module: type: string example: "Messaging" def_name: type: string example: "Subscribe" def_keys: type: array example: [ "topic"] visibility: type: boolean example: true timerArray: type: array items: $ref: '#/definitions/timerList' timerList: properties: timer_key: type: string example: "c0f8e2c50bbeeafb87f5efa2eee301 :: timer_name" name: type: string example: 'Timer_Example' namespace: type: string example: "" description: type: string example: "This timer is 60 seconds" start_time: type: string example: '2017-07-03T19:52:41.693Z' repeats: type: integer description: The number of times a timer handler is invoked. To invoke the handler indefinitely, set 'repeats = -1' example: -1 frequency: type: integer description: Frequency (in seconds) between two consecutive timer handler invocations example: 60 service_name: type: string example: "TimerHandler" system_key: type: string example: 'ccafb4cf0bd0dcbcadaccaf9ebba01' system_secret: type: string example: 'CCAFB4CF0BBABDDCE3F2F1E6C3E601' user_id: type: string example: c6b4cf0b8ca5b7c3fad793cb12 user_token: type: string example: jt-w5IiOOnhuSp8hJbanB2Tluj_ShXphjAta0_6_mAcUPSbatjFRYr1m5Ojl4skSOZ3txbbkFWArnUnfNA== auditInfo: type: array items: $ref: '#/definitions/auditItems' auditItems: properties: action_type: type: string example: "Update" asset_class: type: string example: 'devices' asset_id: type: string example: "ClearBlade-iPhone" changes: type: string example: '{"last_location_update":"2020-01-29T20:18:18.429,"last_seen_location":"none","x_pos":874.2206168192284,"y_pos":739.82265853589}' email: type: string example: 'example@clearblade.com' id: type: integer example: 10440595 response_time: type: integer description: In milleseconds example: 4038669 system_key: type: string example: 'ccafb4cf0bd0dcbcadaccaf9ebba01' time: type: string example: '2020-01-29T20:18:18.475214Z' user_type: type: string example: "DEV" systemInfo: type: array items: $ref: '#/definitions/analyticItems' analyticItems: properties: system_key: type: string example: 'ccafb4cf0bd0dcbcadaccaf9ebba01' name: type: string example: "System-Name" owner: type: string example: 'example@clearblade.com' numDevs: type: integer example: 2 developers: type: array example: ["example@clearblade.com"] numServices: type: integer example: 2 numLibraries: type: integer example: 2 numDeployments: type: integer example: 2 numRoles: type: integer example: 2 numUsers: type: integer example: 2 numDevices: type: integer example: 2 numEdges: type: integer example: 2 numAPIReqsTotal: type: integer example: 2 numAPIReqsMonth: type: integer example: 2 numAPIReqsYear: type: integer example: 2 numPub: type: integer example: 2 numPubMonth: type: integer example: 2 numPubYear: type: integer example: 2 numRecTotal: type: integer example: 2 numRecMonth: type: integer example: 2 numRecYear: type: integer example: 2 diskUsage: type: integer example: 2 disabled: type: boolean example: false lastUpdated: type: integer example: 1580407664 validation: properties: type: type: string example: email emailSettings: description: 2FA email communication settings properties: encryption_type: type: string example: "STARTTLS" from: type: string example: "example@gmail.com" host: type: string example: "smtp.gmail.com" port: type: string example: "587" protocol: type: string example: "SMTP" two_factor_message: type: string example: "Please use the code to log in: $CODE" two_factor_subject: type: string example: "Login code" username: type: string example: "example@gmail.com" password: type: string example: "test" validation_message: type: string example: "Please validate your email here: $LINK" validation_subject: type: string example: "Email validation" emailTest: description: 2FA email communication test properties: recipient: type: string example: "example@companyname.com" SMSSettings: description: 2FA SMS communication settings properties: from: type: string example: "+15120000000" service_name: type: string example: "Twilio" description: "Only Twilio is supported." two_factor_message: type: string example: "Please use the code to log in: $CODE" url: type: string example: "https://api.twilio.com" username: type: string example: "AC25b4eb989b9db8" password: type: string example: "test" validation_message: type: string example: "Please validate your email here: $LINK" SMSTest: description: 2FA SMS communication test properties: recipient: type: string example: "+15120000000" SecuritySettings: description: 2FA security settings properties: developer_token_ttl: type: integer example: 86400 two_factor_auth: $ref: '#/definitions/enabled' enabled: properties: enabled: type: boolean example: true userinfo: description: User information properties: admin: type: boolean example: true creation_date: type: integer example: 1551475825 email: type: string example: "example@clearblade.com" email_validated: type: boolean example: true fname: type: string example: "FirstName" last_login: type: integer example: 1551475825 lname: type: string example: "LastName" org: type: string example: "CompanyName" phone: type: string example: "+15120000000" phone_validated: type: boolean example: true two_factor_enabled: type: boolean example: true two_factor_enabled_instance": type: boolean example: true two_factor_method: type: string example: "email" userid: type: string example: "e291cdc70be288c3af01" 2FAinfo: description: 2FA method information properties: two_factor_method: type: string example: "sms" phone: type: string example: "+15120000000" two_factor_enabled: type: boolean example: true allDatabases: type: array items: $ref: '#/definitions/database' database: description: Database name and type type: object properties: dbtype: type: string example: "MongoDB" name: type: string example: "sample_db" createDatabase: description: All database credentials can be found in the endpoint description type: object properties: name: type: string example: "mysql_example" dbtype: type: string example: "mysql" credentials: type: object $ref: '#/definitions/credentials' credentials: properties: user: type: string example: "MYSQL_USER" password: type: string example: "MSQL_PASSWORD" address: type: string example: "MYSQL_ADDRESS" port: type: string example: "3306" dbname: type: string example: "MYSQL_DATABASE_NAME" externalDB: properties: credentials: type: object $ref: '#/definitions/credentials' dbtype: type: string example: "mysql" id: type: integer example: 5 name: type: string example: "mysql_example" system_key: type: string example: bc91ede40bb993a7babaa801 operationsDB: properties: operation: items: $ref: '#/definitions/operations' operations: type: string example: "db.collectionName.find()" DBResp: properties: Data: type: array example: [<array of data objects>] Total: type: integer example: 1 userSession: type: array items: $ref: '#/definitions/userSessionInfo' userSessionInfo: properties: issued: type: integer example: 1587659826 user_id: type: string example: "9aeeace602d2a6aaead2f62a" deviceSession: type: array items: $ref: '#/definitions/deviceSessionInfo' deviceSessionInfo: properties: issued: type: integer example: 1587659826 device_key: type: string example: "DEVICENAME00000" devregresp: properties: dev_token: type: string example: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOiJhNGE0YhjY2NhNS0xNjRhLTQ5ODgtYjU2MS1jYWVmNTcyNGU0NjAiLCJ1dCI6MSwidHQiOjEsImV4cCI6MTU4OTMxMzY4MywiaWF0IjoxNTg4ODgxNjgzfQ.0FK58r0wcJSQIDuDCAselAdmN-uj_CXHqJqk2mF9WB4" expires_at: description: The format is UNIX timestamp. If the value is -1, then no refresh token is returned. type: integer example: 1589313683 is_two_factor: type: boolean example: false refresh_token: type: string example: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOiJhNGE0YTNlYjBiZDg5ZmU4YmV4cCI6MTU4OTc0NTY4MywiaWF0IjoxNTg4ODgxNjgzfQ.K2Ji0HldYtUO0RgednnOq117cnZy-ij-C1k1a8qVMsw" user_id: type: string example: "a4a4a3eb0bd89fe8bbeb99f8d2be01" resetPassword: properties: email: type: string example: "example@clearblade.com" new_password: type: string example: "password" msgArray: type: array items: $ref: '#/definitions/msgTopic' msgTopic: properties: ip: type: string example: "" payload: type: string example: "Message Body." description: The topic's message body payloadsize: description: Message character count type: integer example: 50 pk: type: string example: "12a38ef9-6d01-4aed-8117-e4464f14ffbc" qos: description: Quality of Service (0,1,2) type: integer example: 0 time: description: The format is UNIX timestamp type: integer example: 1589313683 topicid: type: string example: "Topic name" userid: type: string example: "e291cdc70bf6a4fa3e288c3af01" allowKey: properties: allow_key_auth: type: boolean example: true deviceKey: description: Rotating key list properties: active_key: type: string example: "��W&\u001a�Kw��" keys: type: array items: $ref: '#/definitions/rotatingDeviceKeys' rotatingDeviceKeys: type: string example: "��W&\u001a�Kw��" portalArray: type: array items: $ref: '#/definitions/portalSettings' portalSettings: properties: config: type: object description: type: string example: "Portal description." last_updated: type: string example: "03 Aug 20 02:33 UTC" name: type: string example: "ExamplePortal" namespace: type: string example: "" system_key: type: string example: "98a6cbe60bceafcc5d8b4a33b" type: type: string example: "custom_v2" platformInfo: properties: about: type: object example: "ClearBlade Platform" buildId: type: string example: "a66297bca:485" version: type: string example: "9.0.0" codeMeta: properties: code: type: array items: $ref: '#/definitions/codeSettings' 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 type: boolean example: false auto_balance_euid: type: string example: "" auto_restart: type: boolean example: false concurrency: type: integer example: 0 euid: type: string example: "b0a6cbe60b8edf93fdca978aed8e01" execution_timeout: type: integer example: 60 logging_enabled: type: boolean name: type: string example: serviceName namespace: type: string example: "" system_key: type: string example: "98a6cbe60bceafcc5d8b4a33b" uuid: type: string example: "ea339dce-3e5e-45b2-b1a6-fe030a03b0fd" version: type: integer example: 3 version_id: type: string example: "1767d09d-e6c6-4841-a26a-9935a1e5fd96" allIndexes: properties: Data: type: array items: $ref: '#/definitions/indexArray' Total: description: Total number of indexes in the collection type: integer example: 2 indexArray: description: Type choices are unique and nonunique index properties: name: description: Column name type: string example: ExampleColumn type: description: Index type type: string example: Unique index retrySync: properties: edge: description: Edge name type: string example: ExampleEdge asset_class: description: Asset type type: string example: services asset_id: type: string example: c0f8e2c50bbeeafb87f5efa2eee301 is_collection: type: boolean sync_event: type: integer example: 0 (Insert)/1 (Update)/2 (Delete)/5 (Upsert) buckets: properties: deployment_name: description: Deployment Name type: string example: ExampleDeployment edge_config: description: Edge Config file type: array example: [root: '</root/directory>'] edge_storage: description: Edge storage type (local or Google) type: string example: local platform_config: description: Platform config file type: array example: [root: '</root/directory>'] platform_storage: description: Platform storage type (local or Google) type: string example: local system_key: type: string example: "98a6cbe60bceafcc5d8b4a33b" allBuckets: type: array items: $ref: '#/definitions/buckets' box: type: object properties: "example/full/path/to/file.txt": $ref: '#/definitions/box_data' box_data: properties: base_name: description: Base name type: string example: 'sample.txt' bucket_name: description: Box name type: string example: inbox last_modified: description: Update date type: string example: '2017-07-03T19:52:41.693Z' path_name: description: Full file path type: string example: 'example/full/path/to/file.txt' permissions: description: File permissions type: string example: '-rw-r--r--' relative_name: description: Relative name type: string example: test/file.txt size: description: File size in bytes type: integer example: 60 createBox: properties: box: description: Box name type: string example: inbox path: description: Relative file path type: string example: /relative/file/path contents: description: base64 encoded file contents type: string example: "IyEvYmluL2Jhc2gKbWtkaXIgU2hvd1RpbWVBZGFwdGVyCgptdiBzdGFydC5zaCBTaG93VGltZUFkYXB0ZXIKbXYgc3RvcC5zaCBTaG93VGltZUFkYXB0ZXIKbXYgc3RhdHVzLnNoIFNob3dUaW1lQWRhcHRlcgptdiBkZXBsb3kuc2ggU2hvd1RpbWVBZGFwdGVyCm12IHVuZGVwbG95LnNoIFNob3dUaW1lQWRhcHRlcgptdiBzaG93VGltZSBTaG93VGltZUFkYXB0ZXIKCmVjaG8gIlNob3dUaW1lQWRhcHRlciBEZXBsb3llZCI=" copyFile: properties: from_box: description: Box name where the file is being copied/moved type: string example: inbox from_path: description: Relative file path name where the file is being copied/moved type: string example: /relative/file/path to_box: description: Box name of where the file is being copied/moved to type: string example: inbox to_path: description: Relative file path name where the file is being copied/moved to type: string example: /relative/file/path deleteFile: properties: box: description: Box name of the file being deleted type: string example: inbox path: description: Relative file path name of the file being deleted type: string example: /relative/file/path |
...