swagger: '2.0' info: version: '3.0' title: ClearBlade API description: A friendly little API to help you interact with the ClearBlade platform. termsOfService: 'https://docs.clearblade.com/v/4/static/tac.html' contact: email: support@clearblade.com host: platform.clearblade.com basePath: / schemes: - https tags: - name: Adapter description: Adapter configuration and management. - name: Admin description: Admin developer operations. - name: 2FA description: Interactions for Two Factor Authentication. - name: Audit description: Interactions with the developer audit trail. - name: Code description: Interactions with code services. - name: Webhooks description: Interactions with webhooks. - name: Data description: Interactions with data collections. - name: Databases description: Interactions with external database connections. - name: Deployments description: Deployment CRUD Operations - name: Device description: Device authentication and management. - name: Developer description: Developer operations. - name: Edge description: Interactions with edges. - name: Handlers description: Interactions triggers and timers. - name: Messaging description: MQTT messaging and push notifications. - name: Shared Cache description: Interactions with Shared Caches - name: User description: User authentication and management. - name: Session description: Interactions with user and device sessions. - name: Portal description: Interactions with portals. - name: Files description: Interactions with file management. paths: /api/v/1/user: get: operationId: GetUsers summary: USERS - Get all users description: Returns all user info that 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 query model below 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 UserToken. Either 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: USER - Users change roles and passwords for other users description: Users can change the roles and passwords for other users in the system 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: ADAPTERS - Get all adapters description: Returns all device info that 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. name: ClearBlade-DevToken required: true type: string responses: '200': description: A list of adapters. '400': description: Bad request. '401': description: User cannot access resource post: operationId: addAdapter summary: ADAPTERS - Add an adapter 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.. name: ClearBlade-DevToken required: true 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: Gets list of configuration information for all adapter files description: Lists configuration information for all versions of all adapter files 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: ADAPTERS - Add or replace file content & configuration description: Create a new file with content and configuration, or replace an existing file's content & 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: ADAPTERS - Map Adapter command to execute a file description: Adds a command to the configuration section of the adapter. 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 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: ADAPTERS - Delete adapter 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. name: ClearBlade-DevToken required: true 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' (it's successful) '400': description: Bad request. '/api/v/4/{SystemKey}/adapters/{AdapterName}/files/{fileName}': get: operationId: FileDownload summary: ADAPTERS - Download file from adapter description: Downloads file from command in adapter to 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: File Name identifies the file in the adapter. name: fileName required: true type: string - in: header description: Dev Token obtained through authentication. name: ClearBlade-DevToken required: true type: string responses: '200': description: File is downloaded unto computer. '400': description: Bad request. delete: operationId: DeleteFile summary: ADAPTERS - Delete adapter files description: Deletes the adapter file for a command 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: File Name identifies the file in the adapter. name: fileName required: true type: string responses: '200': description: No response or ‘Unknown Response type’ (it’s successful) '400': description: Bad request. '500': description: Internal Server Error put: operationId: updateExistingFileContent summary: ADAPTERS - Update Existing File's content description: Update the content of the existing file 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: File Name identifies the file in the adapter. 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 as file content to overwrite the existing content example: "IyEvYmluL2Jhc2gKZWNobyAiaGVsbG8gd29ybGQi" required: - file responses: '200': description: Returns the config and content of the file updated. '400': description: Bad Request. '401': description: Unauthorized. '500': description: Server error. '/api/v/4/{SystemKey}/adapters/{AdapterName}/control': put: operationId: AddEdgeCommand summary: ADAPTERS - Send command to edge 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: Edge command is working. '400': description: Bad Request. '401': description: Unauthorized. '500': description: Server error. /api/v/1/user/reg: post: operationId: RegUser summary: USERS - Register new user description: Registers a new user in the specified system and returns an UserToken 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: USERS - Authenticate user description: | ## Description Logs user into system and returns an UserToken. ## Endpoint Body Values Here are the body values for the two scenarios ### Basic Auth Required Keys - username - password Example ```json { "username":"cbman@clearblade.com", "password":"cl34rbl4d3" } ``` ### Refreshing Token Required Keys - grant_type (only one valid value - "refresh_token") - refresh_token - access_token Example ```json { "grant_type":"refresh_token", "refresh_token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOiJmMjkwZTJlYjBiZDRmNjhiZDRkM2RlZjNkMWM0MDEiLCJzaWQiOiIzOWFkM2U5OC1hMmU0LTQxYzQtOGMzNi03ZjQxNDFhYzYxN2IiLCJ1dCI6MiwidHQiOjMsImV4cCI6MTU5MDI3ODExMSwiaWF0IjoxNTg5NDE0MTExfQ.iY6uJu2QgNP0uHoGdmEZm9wsztB1SUrCHrisxoXoxolol", "access_token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOiJmMjkwZTJlYjBiZDRmNjhiZDRkM2RlZjNkMWM0MDEiLCJzaWQiOiI3NmY4ODg4MS04YmU5LTRiM2UtOWJkNi1jOTJjZGQ4OTNlMmEiLCJ1dCI6MiwidHQiOjEsImV4cCI6MTU4OTg0NjExMSwiaWF0IjoxNTg5NDE0MTExfQ.xboryHuVn2zz-gSZ_JcD7-j_eBmJU1SMHkiDl9j8bak" } ``` 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: USERS - Authenticate anonymous user description: Logs an anonymous user into the specified system and returns an UserToken. 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: USERS - Check user auth description: Checks if current user's UserToken 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 in not authenticated with the specified system. '401': description: Unauthorized. '500': description: Server error. /api/v/1/user/logout: post: operationId: UserLogout summary: USERS - Log out user description: Logs the current user out of the specified system and invalidates their UserToken. 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: USERS - Get user info description: Returns all user information about the current user. 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: USERS - Update user info description: Updates some or all of 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: Allows an user with adequate permissions to delete another user description: This endpoints provides user the ability to delete another user if the user has 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: USERS - Change user password description: Changes an 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: DEVICES - Update info description: Updates a device's state or custom attributes. tags: - Device 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 device is a part of. name: systemKey required: true type: string - in: path description: Name of device. 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: DEVICES - Adds a device description: Adds a device in the system tags: - Device 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 device is a part of. name: systemKey required: true type: string - in: path description: Name of device. 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: DEVICES - Authenticate device description: | ## Description Logs device into system and returns an Device Access Token. ## Endpoint Body Values Here are the body values for the two scenarios ### Basic Auth Required Keys - deviceName - activeKey Example ```json { "deviceName":"BLEdevice", "activeKey":"378123BLE" } ``` ### Refreshing Token Required Keys - grant_type (only one valid value - "refresh_token") - refresh_token - access_token Example ```json { "grant_type":"refresh_token", "refresh_token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOiJmMjkwZTJlYjBiZDRmNjhiZDRkM2RlZjNkMWM0MDEiLCJzaWQiOiIzOWFkM2U5OC1hMmU0LTQxYzQtOGMzNi03ZjQxNDFhYzYxN2IiLCJ1dCI6MiwidHQiOjMsImV4cCI6MTU5MDI3ODExMSwiaWF0IjoxNTg5NDE0MTExfQ.iY6uJu2QgNP0uHoGdmEZm9wsztB1SUrCHrisxoXoxolol", "access_token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOiJmMjkwZTJlYjBiZDRmNjhiZDRkM2RlZjNkMWM0MDEiLCJzaWQiOiI3NmY4ODg4MS04YmU5LTRiM2UtOWJkNi1jOTJjZGQ4OTNlMmEiLCJ1dCI6MiwidHQiOjEsImV4cCI6MTU4OTg0NjExMSwiaWF0IjoxNTg5NDE0MTExfQ.xboryHuVn2zz-gSZ_JcD7-j_eBmJU1SMHkiDl9j8bak" } ``` 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: DEVICES - Get all devices description: Returns all device info that 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. name: ClearBlade-UserToken required: true type: string - in: query description: Tags to filter devices by. See the query model below for an example. name: query required: false type: string responses: '200': description: A list of devices. schema: $ref: '#/definitions/deviceUpdate' '400': description: Bad request. schema: $ref: '#/definitions/ErrorResp' put: operationId: UpdateDevices summary: DEVICES - Update devices using a query 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. name: ClearBlade-UserToken required: true type: string - in: body description: 'Query to limit scope of update, 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. schema: $ref: '#/definitions/ErrorResp' delete: operationId: DeleteDevices summary: DEVICES - Delete devices using a query 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. name: ClearBlade-UserToken required: true type: string - in: query description: Tags to filter devices by. See the query model below 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: DEVICES - Get count description: Returns the total number of devices in a system. tags: - Device 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 devices. name: systemKey required: true type: string responses: '200': description: Returns object containing count of devices in a system schema: $ref: '#/definitions/count' '400': description: Bad request. schema: $ref: '#/definitions/ErrorResp' '/api/v/3/devices/{systemKey}/columns': get: operationId: GetDeviceTableSchema summary: EDGE - Get device columns description: Returns the columns and their data type for the device table in a system. tags: - Device 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 devices. name: systemKey required: true type: string responses: '200': description: Returns list of columns and data types for devices table in a system schema: $ref: '#/definitions/columnSuccess' '400': description: Bad request. schema: $ref: '#/definitions/ErrorResp' '/api/v/4/devices/{systemKey}/connections': get: operationId: GetConnectedDeviceList summary: DEVICES - Get connected device list description: Returns the list of connected devices. tags: - Device produces: - application/json parameters: - in: header description: Dev Token obtained through authentication. name: ClearBlade-UserToken required: true 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 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: DEVICES - Get information for a connected device description: Returns the connection information of the device. tags: - Device 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 devices. name: systemKey required: true type: string - in: path description: Name of the connected device. name: name required: true type: string responses: '200': description: Returns 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: DEVICES - Get total of connected devices description: Returns the number of device connections. tags: - Device 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 devices. name: systemKey required: true type: string responses: '200': description: Returns 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: DATA(name) - Get items description: Returns the data from the specified collection. tags: - Data 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 collection. name: systemKey required: true type: string - in: path description: Name of the collection. name: collectionName required: true type: string - in: query description: Query object used to filter the items. See query model below for 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: DATA(name) - Update items description: Updates preexisting data rows in the specified collection. tags: - Data 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 collection. name: systemKey required: true type: string - in: path description: Name of the collection. name: collectionName required: true type: string - in: body description: 'Query to limit scope of update, 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: DATA(name) - Create items description: Creates new data rows in the specified collection. tags: - Data 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 collection. name: systemKey required: true type: string - in: path description: Name of the collection. 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: DATA(name) - Delete items description: Deletes data rows in the specified collection. tags: - Data 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 collection. name: systemKey required: true type: string - in: path description: Name of the collection. name: collectionName required: true type: string - in: query description: Query to limit scope of deletion. 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: DATA(id) - Get items description: Returns the data from the specified collection. tags: - Data produces: - application/json parameters: - in: header description: Token obtained through user authentication. name: ClearBlade-UserToken required: true type: string - in: path description: ID of the collection. name: collectionID required: true type: string - in: query description: Query object used to filter the items. See query model below for 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: DATA(id) - Update items description: Updates preexisting data rows in the specified collection. tags: - Data produces: - application/json parameters: - in: header description: Token obtained through user authentication. name: ClearBlade-UserToken required: true type: string - in: path description: ID of the collection. name: collectionID required: true type: string - in: body description: 'Query to limit scope of update, 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: DATA(id) - Create items description: Creates new data rows in the specified collection. tags: - Data produces: - application/json parameters: - in: header description: Token obtained through user authentication. name: ClearBlade-UserToken required: true type: string - in: path description: ID of the collection. 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: DATA(id) - Delete items description: Deletes data rows in the specified collection. tags: - Data produces: - application/json parameters: - in: header description: Token obtained through user authentication. name: ClearBlade-UserToken required: true type: string - in: path description: ID of the collection. name: collectionID required: true type: string - in: query description: Query to limit scope of deletion. 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: DATA(id) - Get columns 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. name: ClearBlade-UserToken required: true type: string - in: path description: ID of the collection. 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 for ensuring 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: DATA - Create collection 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. name: ClearBlade-UserToken required: true 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: Configuration info for new collection. name: Collection info required: true schema: $ref: '#/definitions/newcollection' responses: '200': description: Collection was successfully created. schema: $ref: '#/definitions/newcollection' '400': description: Invalid status value schema: $ref: '#/definitions/ErrorResp' put: operationId: UpdateCollection summary: DATA - Update collection 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. name: ClearBlade-UserToken required: true 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: Collection was successfully updated. There is no response delete: operationId: DeleteCollection summary: DATA - Delete collection description: Deletes an existing collection in the specified system. tags: - Data produces: - application/json parameters: - in: header description: Token obtained through user authentication. name: ClearBlade-UserToken required: true 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: Collection was successfully deleted. There is no response '/api/v/3/allcollections/{systemKey}': get: operationId: GetCollections summary: DATA - Get collections description: Returns all the collections in the specified system. tags: - Data 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 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: DATA - Update upsert values 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: Name of the collection. name: collectionName required: true type: string - in: query description: A column in your table that has 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: DATA - Create collection description: This creates a non-unique index on a column. This is useful for speeding up certain queries, but doesn't work with upsert. This call will fail if the index already exists. 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: Name of the collection. name: collectionName required: true type: string - in: query description: name: columnName required: true type: string responses: '200': description: Column is successfully indexed. schema: $ref: '#/definitions/SuccessResp' '400': description: Invalid status value schema: $ref: '#/definitions/ErrorResp' delete: operationId: DeleteNonUniqueIndex summary: DATA - Delete collection 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: Name of the collection. name: collectionName required: true type: string - in: query description: name: columnName required: true type: string responses: '200': description: Index was successfully deleted. schema: $ref: '#/definitions/SuccessResp' '/api/v/4/data/{systemKey}/{collectionName}/uniqueindex': post: operationId: CreateUniqueIndex summary: DATA - Create Unique Index 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: Name of the collection. name: collectionName required: true type: string - in: query description: name: columnName required: true type: string responses: '200': description: Column is successfully indexed. schema: $ref: '#/definitions/SuccessResp' '400': description: Bad Request schema: $ref: '#/definitions/ErrorResp' delete: operationId: DeleteUniqueIndex summary: DATA - Delete unique index 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: Name of the collection. name: collectionName required: true type: string - in: query description: name: columnName required: true type: string responses: '200': description: 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: DATA - Get list of indexes description: This returns all USER CREATED indexes/constraints for the collection.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: Name of the collection. 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: DATABASES - Retrieves all internal and external database statuses 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: DATABASES - Retrieves all external database connections 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. name: ClearBlade-DevToken required: true 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: DATABASES - Create a external database connection description: | ## Description: Creates an external database connections for that system. This is a developer only endpoint. ### List of database types supported: |Database Name|db_type| |-------------|-------| |MONGO|mongodb| |POSTGRES|postgres| |MYSQL|mysql| |MSSQL|mssql| |COUCHDB|couchdb| ### Database Credentials |Field|Type|Database|Description|Options|Default| |-----|----|-----|-------|-------|----| |user|string|All|The external database username| |password|string|All|The external database password| |address|string|All|The external database IP address| |port|string|All|The port used to connect to the external database||27017 (Mongo), 3306 (MySQL), 5432 (Postgres), 1433 (MSSQL)| |dbname|string|All|The name of the external database| |connection_type|string|Mongo|The external database DNS connection type|srv and standard|standard| |tls|boolean|Mongo and Postgres|Setting the tls to `true` allows for transport encryption. This field is optional|True and false|True (Mongo) False(Postgres)| |authMechanism|string|Mongo|Database authentication method. This field is optional|SCRAM-SHA-256, SCRAM-SHA-1, MONGODB-CR, PLAIN, GSSAPI, MONGODB-X509|SCRAM-SHA-1| |authSource|string|Mongo|Database authentication source. This field is optional||admin| |replicaSet|string|Mongo|Allows for use of Replication Methods such as `rs.reconfig() `.This field is optional||empty string| |encryption|string|MSSQL|Setting the encryption to `true` allows for secure encryption|disable and true| tags: - Databases 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: body description: Credentials for external database connection. 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: DATABASES - Retrieve a specific external database connection description: Returns the name and database type of a external database connection. This is a developer and user endpoint. tags: - Databases produces: - application/json parameters: - in: header description: User Token obtained through authentication. name: ClearBlade-UserToken required: true type: string - in: path description: System key that identifies the system. name: systemKey required: true type: string - in: path description: Name of external database connection. name: name required: true type: string responses: '200': description: Credentials for a specific external database connection. Refer to the 'credentials' table for each database in the endpoint above. schema: $ref: '#/definitions/externalDB' '400': description: Bad Request schema: $ref: '#/definitions/ErrorResp' '401': description: Unauthorized '500': description: Server error. put: operationId: UpdateDatabaseCredentials summary: DATABASES - Update external database credentials description: Updates existing external database credentials 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. name: ClearBlade-UserToken required: true type: string - in: path description: System Key that identifies the system. name: systemKey required: true type: string - in: path description: Name of external database connection. 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 was 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: DATABASES - Delete a external database connection 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. name: ClearBlade-UserToken required: true type: string - in: path description: System Key that identifies the system. name: systemKey required: true type: string - in: path description: Name of external database connection. name: name required: true type: string responses: '200': description: External Database connection was successfully deleted. schema: $ref: '#/definitions/SuccessResp' '400': description: Bad request. schema: $ref: '#/definitions/ErrorResp' '500': description: Server error. '/api/v/4/external-db/{systemKey}/{name}/data': post: operationId: PerformDBOperation summary: DATABASES - Create a external database connection description: Perform an operation on the external database.This is a developer and user endpoint. tags: - Databases produces: - application/json parameters: - in: header description: User Token obtained through authentication. name: ClearBlade-UserToken required: true type: string - in: path description: System Key that identifies the system. name: systemKey required: true type: string - in: path description: Name of external database connection. name: name required: true type: string - in: body description: List of operations to be performed. Refer to the operations that are 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: CODE - Retrieve information about service description: Returns setting information and data for a code service 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 setting information and data for a code service '500': description: Server error. post: operationId: ExecuteService summary: CODE - Call/Execute code service 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: Parameters for code service. 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: CODE - Get all failed services using Query description: Returns list of failed code services. 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: query description: Uses query to limit scope of list of failed services. Check 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: CODE - Returns code services and settings description: Returns list of code services and its settings info . 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 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: WEBHOOKS - Returns webhooks in the system description: Returns all webhooks in the 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 responses: '200': description: List of webhooks 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: WEBHOOKS - Creates a webhook 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: Name that identifies the webhook 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: WEBHOOKS - Update a webhook 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: Name that identifies the webhook name: name required: true type: string - in: body description: Updated collection information. name: body required: false schema: $ref: '#/definitions/webhookUpdate' responses: '200': description: Collection was successfully updated. '400': description: Bad request. schema: $ref: '#/definitions/ErrorResp' '401': description: Unauthorized. schema: $ref: '#/definitions/ErrorResp' '500': description: Internal Server Error. schema: $ref: '#/definitions/ErrorResp' delete: operationId: DeleteWebhook summary: WEBHOOKS - Delete a webhook 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: Name that identifies the webhook 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: WEBHOOKS - Executes query string payload webhook description: Executes the webhook of type Payload, 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: Name that identifies the webhook 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: WEBHOOKS - Executing a webhook 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: Name that identifies the webhook 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: MESSAGING - Get history 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. 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: 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 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: MESSAGING - Delete history description: Deletes the messaging history for a single topic. tags: - Messaging 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: 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: MESSAGING - Publish message 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. 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: 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: MESSAGING - Gets list of topics 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. name: ClearBlade-DevToken required: true 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 query model in the description for 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: MESSAGING - Gets number of topics description: Returns the number of topics. tags: - Messaging 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 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: EDGE - Fetch all edges description: Returns all edge info that the current user is authorized to see. tags: - Edge 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 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: Edge(name) - Get edge info description: Returns the data from the specified edge. tags: - Edge 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 collection. name: systemKey required: true type: string - in: path description: Name of the edge. name: name required: true type: string responses: '200': description: Information about the specified edge. '400': description: Bad request. put: operationId: UpdateEdgeByName summary: EDGE - Update edge description: Updates the specified edge's information. tags: - Edge produces: - application/json parameters: - in: header description: Developer Token obtained through admin authentication. name: ClearBlade-UserToken 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: Name of the edge 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: EDGE - Create edge description: Creates a new edge in the specified system. tags: - Edge produces: - application/json parameters: - in: header description: Developer Token obtained through admin authentication. name: ClearBlade-UserToken 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: Name of the edge 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: Edge - Delete edge description: Deletes the specified edge from its system. tags: - Edge produces: - application/json parameters: - in: header description: Developer Token obtained through admin authentication. name: ClearBlade-UserToken required: true type: string - in: path description: System key that identifies the system the edge currently belongs to. name: systemKey required: true type: string - in: path description: Name of the edge 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: EDGE - Get count description: Returns the total number of edges in a system. tags: - Edge 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 edges. name: systemKey required: true type: string responses: '200': description: Returns object containing count of edges in a system '400': description: Bad request. '/api/v/3/edges/{systemKey}/columns': get: operationId: GetEdgeTableSchema summary: EDGE - Get columns 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. name: ClearBlade-UserToken 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 columns and their data types of edges table in a system. '400': description: Bad request. '/admin/{systemKey}/sync/edge/status/{edgeName}': get: operationId: EdgeSyncStatus summary: EDGE - Gets sync status for an edge description: Returns sync status for an edge 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: Name of the edge 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: EDGE - Gets sync status for all edges description: Returns sync status for all edges in a system 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 the assets and their sync status related to them '400': description: Bad request '/api/v/3/code/{systemKey}/triggers': get: operationId: GetAllTrigger summary: HANDLERS - Get trigger handlers description: Returns list of trigger 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 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: HANDLERS - Get trigger handler 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: Name of the trigger handler you want. name: name required: true type: string responses: '200': description: Information about the trigger handler requested. schema: $ref: '#/definitions/triggerArray' '400': description: Bad request. schema: $ref: '#/definitions/ErrorResp' put: operationId: UpdateTriggerByName summary: HANDLERS - Update trigger handler 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: Name of the trigger handler 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: HANDLERS - Create trigger handler 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: Name of the trigger handler 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: HANDLERS - Delete trigger handler 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: Name of the trigger handler 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: HANDLERS - Get timer handlers 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: HANDLERS - Get timer handler 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: Name of the timer handler you want. 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: HANDLERS - Update timer handler 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: Name of the timer handler 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: HANDLERS - Create timer handler 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: Name of the timer handler 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: HANDLERS - Delete trigger handler 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: Name of the timer you're deleting. name: name required: true type: string responses: '200': description: Deletes timer from system. '400': description: Bad request. schema: $ref: '#/definitions/ErrorResp' /admin/reg: post: operationId: RegDev summary: DEVELOPER - Register new dev description: Registers a new developer account with the CB platform. tags: - Developer produces: - application/json parameters: - in: body description: 'First and last name, organization, email, and password for developer' name: Registration info required: true schema: $ref: '#/definitions/devregdata' responses: '200': description: Developer was successfully created. schema: $ref: '#/definitions/devregresp' '500': description: Internal Server Error. /admin/auth: post: operationId: AuthDev summary: DEVELOPER - Authenticate dev description: | ## Description Logs developer into system and returns an Developer Token ## Endpoint Body Values Here are the body values for the two scenarios ### Basic Auth Required Keys - username - password Example ```json { "username":"cbman@clearblade.com", "password":"cl34rbl4d3" } ``` ### Refreshing Token Required Keys - grant_type (only one valid value - "refresh_token") - refresh_token - access_token Example ```json { "grant_type":"refresh_token", "refresh_token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOiJmMjkwZTJlYjBiZDRmNjhiZDRkM2RlZjNkMWM0MDEiLCJzaWQiOiIzOWFkM2U5OC1hMmU0LTQxYzQtOGMzNi03ZjQxNDFhYzYxN2IiLCJ1dCI6MiwidHQiOjMsImV4cCI6MTU5MDI3ODExMSwiaWF0IjoxNTg5NDE0MTExfQ.iY6uJu2QgNP0uHoGdmEZm9wsztB1SUrCHrisxoXoxolol", "access_token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOiJmMjkwZTJlYjBiZDRmNjhiZDRkM2RlZjNkMWM0MDEiLCJzaWQiOiI3NmY4ODg4MS04YmU5LTRiM2UtOWJkNi1jOTJjZGQ4OTNlMmEiLCJ1dCI6MiwidHQiOjEsImV4cCI6MTU4OTg0NjExMSwiaWF0IjoxNTg5NDE0MTExfQ.xboryHuVn2zz-gSZ_JcD7-j_eBmJU1SMHkiDl9j8bak" } ``` 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: DEVELOPER - Log out dev 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: DEVELOPER - Get system info description: Returns metadata about 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 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: DEVELOPER - Create system 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: System was successfully created. schema: $ref: '#/definitions/systemSettings' '400': description: Bad Request. put: operationId: UpdateSystem summary: DEVELOPER - Update system info 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 successfully updated. delete: operationId: DeleteSystem summary: DEVELOPER - Delete system 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: System was successfully deleted. /admin/collectionmanagement: post: operationId: DevCreateCollection summary: DEVELOPER - Create collection 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: Configuration info for new collection. name: Collection info required: true schema: $ref: '#/definitions/newcollection' responses: '200': description: Collection was successfully created. put: operationId: DevUpdateCollection summary: DEVELOPER - Update collection 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: Collection was successfully updated. delete: operationId: DevDeleteCollection summary: DEVELOPER - Delete collection 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: Collection was successfully deleted. /admin/allapps: get: operationId: DevGetAssets summary: DEVELOPER - Get platform assets 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: DEVELOPER - Get collections description: Returns all the collections 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: 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: DEVELOPER - Get systems 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: DEVELOPER - Regen secret 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: New System Secret was successfully generated. /admin/checkauth: post: operationId: VerifyAuth summary: DEVELOPER - Verifies access to the system 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: DEVELOPER - Get dev info description: Returns all user information about the current developer. 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: 2FA - Update developer 2FA information. description: | ## Description: Update the developer 2FA information. This is a developer only endpoint. Note - the email is taken from the developer's account. ## two_factor_method * email * sms * email_sms (enables both method) 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 two-factor auth settings for the developer. 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: DEVELOPER - Get list of users and information description: Returns list of all of the users in 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: 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: DEVELOPER - Change user information and permissions description: Changes any colomn in users table and update password or permissions of the specified user. 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: User's roles successfully changed. '400': description: Bad Request '500': description: Internal Server Error post: operationId: AddUser summary: DEVELOPER - Add user description: Add an 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: User is added to the system. '401': description: Unauthorized '400': description: Bad Request '500': description: Internal Server Error delete: operationId: DeleteUser summary: DEVELOPER - Delete user 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: UserId of the user to delete name: user type: string responses: '200': description: User is deleted. '400': description: Bad Request '500': description: Internal Server Error '/admin/user/{systemKey}/roles': get: operationId: GetRoles summary: DEVELOPER - Get list of roles description: | ## Description: Get as a list of roles that are available to add to an user ### Query: ```json {"PAGESIZE":int,"PAGENUM":int,"FILTERS":[[{"EQ":[{"name":"value"}]}]]} ``` ### Example: 0 and 0 for pagesize and pagenum returns all the information in one response. ```json {"PAGESIZE":0,"PAGENUM":0,"FILTERS":[[{"EQ":[{"name":"Authenticated"}]}]]} ``` 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 role(s), role information, and permissions for the user '400': description: Bad Request '500': description: Internal Server Error post: operationId: AddRole summary: DEVELOPER - Add new role 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: DEVELOPER - Changes roles settings description: Changes settings in individual roles 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: Column is added to the collection. '400': description: Bad Request '500': description: Internal Server Error delete: operationId: DeleteRoles summary: DEVELOPER - Delete roles description: Deletes roles 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: 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: DEVELOPER - Get number of roles description: Get 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 page size and page number for roles list. 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: DEVELOPER - Get users column info. 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: DEVELOPER - Add new column 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: Column is added to the collection. '400': description: Bad Request '500': description: Internal Server Error /admin/putpass: put: operationId: ChangeDevPassword summary: DEVELOPER - Change dev password 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: ADMIN - Change dev password (Admin) 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 resetted /admin/pkey: get: operationId: GetLicenseKey summary: ADMIN - Get platform license key. description: Returns 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: DEVELOPER - Get trigger definitions 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. name: ClearBlade-DevToken required: true type: string responses: '200': description: List of trigger definitions. '/admin/triggers/handlers/{systemKey}': get: operationId: GetTriggerHandlers summary: DEVELOPER - Get trigger handlers 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 list of trigger handlers '/admin/triggers/handlers/{systemKey}/{name}': get: operationId: GetTriggerHandler summary: DEVELOPER - Get trigger handler 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: Name of the trigger handler you want. name: name required: true type: string responses: '200': description: No response was specified put: operationId: UpdateTriggerHandler summary: DEVELOPER - Update trigger handler 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: Name of the trigger handler you're updating. name: name required: true type: string responses: '200': description: No response was specified post: operationId: CreateTrigger summary: DEVELOPER - Create trigger handler 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: Name of the trigger handler you're creating. name: name required: true type: string responses: '200': description: No response was specified delete: operationId: DeleteTriggerHandler summary: DEVELOPER - Delete trigger handler 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: Name of the trigger handler you're deleting. name: name required: true type: string responses: '200': description: No response was specified '/admin/triggers/timers/{systemKey}': get: operationId: GetTimerHandlers summary: DEVELOPER - Get timer handlers description: Returns a list of timer 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 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: DEVELOPER - Get timer handler 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: Name of the timer handler you want. name: name required: true type: string responses: '200': description: No response was specified put: operationId: UpdateTimerHandler summary: DEVELOPER - Update timer handler 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: Name of the timer handler 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: DEVELOPER - Create time handler 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: Name of the timer handler 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: DEVELOPER - Delete trigger handler 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: Name of the timer you're deleting. name: name required: true type: string responses: '200': description: No response was specified '/admin/devices/{systemKey}': get: operationId: GetSystemDevices summary: DEVELOPER - Get devices with or without a query 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 in question belong to. name: systemKey required: true type: string - in: query description: Tags to filter devices by. See the query model below 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: DEVELOPER - Update devices using a query description: Updates 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: body description: 'Query to limit scope of update, 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: DEVELOPER - Delete devices using a query 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 query model below 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: DEVELOPER - Get device description: Retrieves information about the specified device. 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 in question belongs to. name: systemKey required: true type: string - in: path description: Name of the device you're getting info about. name: name required: true type: string responses: '200': description: No response was specified put: operationId: UpdateSystemDevice summary: DEVELOPER - Update device 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: Name of the device 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: DEVELOPER - Create device 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: Name of the device 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: DEVELOPER - Delete device 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 currently belongs to. name: systemKey required: true type: string - in: path description: Name of the device 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: DEVICE -Creates rotating keys for a device. 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: Name of the device 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: DEVELOPER - Delete rotating keys for a device 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 currently belongs to. name: systemKey required: true type: string - in: path description: Name of the device whose keys are being deleted. name: deviceName required: true type: string responses: '200': description: Deletes rotating keys '/admin/edges/{systemKey}': get: operationId: GetEdges summary: DEVELOPER - Get edges 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 in question belong to. name: systemKey required: true type: string responses: '200': description: No response was specified '/admin/edges/{systemKey}/control': get: operationId: GetAdapterEdges summary: DEVELOPER - Get edges for the adapter description: Retrieves all the edges that 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 in question belong to. name: systemKey required: true type: string responses: '200': description: No response was specified '/admin/edges/{systemKey}/{edgeName}': get: operationId: GetEdge summary: DEVELOPER - Get edge description: Retrieves information about 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 in question belongs to. name: systemKey required: true type: string - in: path description: Name of the edge you're getting info about. name: edgeName required: true type: string responses: '200': description: No response was specified put: operationId: UpdateEdge summary: DEVELOPER - Update edge 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: Name of the edge 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: DEVELOPER - Create edge 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: Name of the edge 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: DEVELOPER - Delete edge 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 currently belongs to. name: systemKey required: true type: string - in: path description: Name of the edge you're deleting. name: edgeName required: true type: string responses: '200': description: No response was specified '/admin/edges/template/{systemKey}': get: operationId: GetEdgeTemplate summary: DEVELOPER - Get edge template description: 'Get list of which triggers, services, and libraries should be copied onto which edge when it starts up.' 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: DEVELOPER - Update edge template description: Update 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: Name of the edge you're modifying the template for. name: edgeName required: true type: string - in: body description: list of resources to add or remove to the template for an edge. name: add required: true schema: $ref: '#/definitions/edgeTemplateUpdate' responses: '200': description: No response was specified '/codeadmin/v/2/{systemKey}/{serviceName}': put: operationId: UpdateService summary: DEVELOPER - Update code service description: Updates the information and data in 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 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 the template for an edge. 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: DEVELOPER - Add code service 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: DEVELOPER - Delete code service 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: Library was successfully deleted. '500': description: Server error. '/codeadmin/v/2/library/{systemKey}': get: operationId: GetLibraries summary: DEVELOPER - Get all libraries description: Returns all available libraries in the specified system along with 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 some info about them. '500': description: Server error. '/codeadmin/v/2/library/{systemKey}/{libName}': get: operationId: GetLibrary summary: DEVELOPER - Get library 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: DEVELOPER - Update library 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: Library successfully updated. '500': description: Server error. post: operationId: CreateLibrary summary: DEVELOPER - Create library 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: DEVELOPER - Delete library 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: Library was successfully deleted. '500': description: Server error. '/codeadmin/v/2/history/library/{systemKey}/{libName}': get: operationId: LibraryHistory summary: DEVELOPER - Get library history description: Returns all previous versions of a 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 responses: '200': description: History of the specified library. '500': description: Server error. '/codeadmin/v/2/history/library/{systemKey}/{libName}/{libVersion}': get: operationId: GetOldLibraryVersion summary: DEVELOPER - Get old library version description: Gets an old version of a 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: path description: Library's version. name: libVersion required: true type: string responses: '200': description: The old version of the specified library. '500': description: Server error. '/codeadmin/v/2/logs/{systemKey}/{serviceName}': get: operationId: GetLogs summary: DEVELOPER - Get services logs description: Returns 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: DEVELOPER - Get all failed services 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: DEVELOPER - Get system's failed services description: Returns list of failed code services 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: 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: DEVELOPER - Retry failed service description: Retries one failed service 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 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: DEVELOPER - Delete failed service run 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. 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: body description: Unique id of 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: ADMIN - Get developers description: Returns all developers in the platform. 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: ADMIN - Get developer description: Returns information about the specified developer. 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: Email of the developer in question. name: developer required: true type: string responses: '200': description: No response was specified post: operationId: DisableDev summary: DEVELOPER - Disable developer 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: DEVELOPER - Gets the information for a portal description: Returns information about a specified portal. 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: DEVELOPER - Gets the information for the platform description: Returns information about the platform version. produces: - application/json responses: '200': description: Returns platform version information schema: $ref: '#/definitions/platformInfo' '/admin/platform/{systemKey}': get: operationId: GetSystemStatus summary: ADMIN - Get system status description: Retrieves the specified system's status as it relates 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: ADMIN - Get number of admin developers description: Retrieves the number of developers who are considered administrators in their system. 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: ADMIN - Get number of systems available description: Retrieves the number of systems that are 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: ADMIN - Add/Remove/Change owner description: For admin, you can add/remove/change the owner of a system even if you’re not the system's owner. For Developer,you can add/remove a developer as long as you’re the owner of the system. 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: Get Systems for a developer 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: Email of the Developer. Should be 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: 2FA - Send validation link description: | ## Description: Sends a validation link to either the developer's email or phone. This endpoint is for Dev only. ## Validation Method Types: * email * phone 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: 2FA - Get Email Settings description: 'Gets current 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 communcation settings schema: $ref: '#/definitions/emailSettings' '400': description: Bad Request. schema: $ref: '#/definitions/ErrorResp' post: operationId: CreateEmailCommunication summary: 2FA - Create Email Communication 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: 2FA - Update Email Settings 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: 2FA - Delete email settings 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 was successfully deleted. schema: $ref: '#/definitions/SuccessResp' '400': description: Bad Request. schema: $ref: '#/definitions/ErrorResp' /admin/settings/email-service/test: post: operationId: TestEmail summary: 2FA - Test Email Service 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 email address to send the test message name: body required: true schema: $ref: '#/definitions/emailTest' responses: '200': description: Successfully sends test email schema: $ref: '#/definitions/SuccessResp' '400': description: Bad Request. schema: $ref: '#/definitions/ErrorResp' /admin/settings/sms-service: get: operationId: SMSSettings summary: 2FA - Get SMS Settings description: 'Gets current 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 communcation settings schema: $ref: '#/definitions/SMSSettings' '400': description: Bad Request. schema: $ref: '#/definitions/ErrorResp' post: operationId: CreateSMSCommunication summary: 2FA - Create SMS Communication 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: 2FA - Update SMS Settings 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: 2FA - Delete SMS settings 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 was successfully deleted. schema: $ref: '#/definitions/SuccessResp' '400': description: Bad Request. schema: $ref: '#/definitions/ErrorResp' /admin/settings/sms-service/test: post: operationId: TestSMS summary: 2FA - Test SMS Service 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 phone number to send the test message name: body required: true schema: $ref: '#/definitions/SMSTest' responses: '200': description: Successfully sends test message schema: $ref: '#/definitions/SuccessResp' '400': description: Bad Request. schema: $ref: '#/definitions/ErrorResp' /admin/settings/security: get: operationId: ViewSecurity summary: 2FA - View Security Settings 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: 2FA - Update Security Settings 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: AUDIT - Get Audit Info description: | ## Description: Returns list of assets and the information about the changes that have been made. This endpoint is for Admin only. ### Query Structure: ```json {"PAGESIZE":int,"PAGENUM":int,"FILTERS":[[{"_REPLACE_WITH_OPERATOR_":[{"valueType":"value"}]}]], "SORT":[{"DESC":"value"}]} ``` Note - You can generate a complex query object in a code service using the `ClearBlade.Query()` object. ## Audit Table Schema: Refer to this when building the query. | Column | Type | Possible Values|Example| |:---------|:---------|:------|:---------| | id | bigint |ANY_POSITIVE_INTEGER|10440595| |system_key|string|SINGLE_STRING_WITH_HEX_CHARS_ONLY|"ccafb4cadaccaf9ebba01"| |time|timestamp|ISO_DATE_TIME_STRING|"2020-01-29T20:18:18.475214Z"| |response_time|bigint|ANY_POSITIVE_INTEGER|4038669| |asset_class|string|adapters, adapterFiles, devices, users, multi_dev, services, libraries, servicecaches, timers, triggers, webhooks, portals, plugins, rolesperms, collections, edges, messaging, deployments, edgegroups, system, usersessions, devicesessions|"collections"| |action_type|string|Create, Update, Delete, Create Columns, Delete Columns, Developer Password Reset, User Password Reset, MQTT Disconnect, MQTT Connect|"MQTT Connect"| |email|string|SINGLE_VALID_EMAIL_STRING|"example@clearblade.com"| |asset_id|string|ANY_STRING|"ClearBlade-iPhone"| |changes|string|STRINGIFIED_JSON|"{\\"newVersion\\":2}"| |user_type|string|UNKNOWN, DEV, USER, DEVICE, Invalid UserType|"DEVICE"| ### Example: ```json {"FILTERS":[[{"NEQ":[{"asset_class":"services"}]},{"EQ":[{"action_type":"create"}]}]],"PAGESIZE":0,"PAGENUM":0} ``` 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 query model at in the description for example. name: query required: false type: string responses: '200': description: Returns audit information schema: $ref: '#/definitions/auditInfo' /admin/audit/count: get: operationId: GetCounts summary: Audit - Get counts description: 'Gets total number of changes made to assets across all systems on the instance. 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 number of actions /admin/audit/{systemKey}: get: operationId: GetAuditDev summary: AUDIT - Get Audit Info description: | ## Description: Returns list of assets and the information about the changes that have been made. This endpoint is for Admin and Dev. ### Query Structure: ```json {"PAGESIZE":int,"PAGENUM":int,"FILTERS":[[{"_REPLACE_WITH_OPERATOR_":[{"valueType":"value"}]}]], "SORT":[{"DESC":"value"}]} ``` Note - You can generate a complex query object in a code service using the `ClearBlade.Query()` object. ## Audit Table Schema: Refer to this when building the query. | Column | Type | Possible Values|Example| |:---------|:---------|:------|:---------| | id | bigint |ANY_POSITIVE_INTEGER|10440595| |system_key|string|SINGLE_STRING_WITH_HEX_CHARS_ONLY|"ccafb4cadaccaf9ebba01"| |time|timestamp|ISO_DATE_TIME_STRING|"2020-01-29T20:18:18.475214Z"| |response_time|bigint|ANY_POSITIVE_INTEGER|4038669| |asset_class|string|adapters, adapterFiles, devices, users, multi_dev, services, libraries, servicecaches, timers, triggers, webhooks, portals, plugins, rolesperms, collections, edges, messaging, deployments, edgegroups, system, usersessions, devicesessions|"collections"| |action_type|string|Create, Update, Delete, Create Columns, Delete Columns, Developer Password Reset, User Password Reset, MQTT Disconnect, MQTT Connect|"MQTT Connect"| |email|string|SINGLE_VALID_EMAIL_STRING|"example@clearblade.com"| |asset_id|string|ANY_STRING|"ClearBlade-iPhone"| |changes|string|STRINGIFIED_JSON|"{\\"newVersion\\":2}"| |user_type|string|UNKNOWN, DEV, USER, DEVICE, Invalid UserType|"DEVICE"| ### Example: ```json {"FILTERS":[[{"NEQ":[{"asset_class":"services"}]},{"EQ":[{"action_type":"create"}]}]],"PAGESIZE":0,"PAGENUM":0} ``` 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 query model at in the description for 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: AUDIT - Get counts description: 'Gets total number of changes made to assets across all systems on the instance. 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 number of actions /admin/platform/systems: get: operationId: GetSystemUpdates summary: AUDIT - Get list of systems that have been updated description: | ## Description: Get list of systems that have been updated. This is an Admin only endpoint. ### Query: ```json {"PAGESIZE":int,"PAGENUM":int,"FILTERS":[[{"_REPLACE_WITH_OPERATOR_":[{"valueType":"value"}]}]],"SORT":[{"DESC":"value"}]} ``` Note - You can generate a complex query object in a code service using the `ClearBlade.Query()` object. ## Admin Audit Table Schema: Refer to this when building the query. | Column | Type | Possible Values| Examples| |:--------|:--------|:------|:------| | name | string |ANY_STRING|"ClearBladeDev"| |owner|string|EMAIL_STRING |"example@clearblade.com"| |systemKey|string|SINGLE_STRING_WITH_HEX_CHARS_ONLY|"80sdff82c0b1fbda1f271"| |disabled|boolean|true, false|true| |lastUpdated|timestamp|ISO_DATE_TIME_STRING|"2020-01-29T20:18:18.475214Z"| |numDevs|int|ANY_POSITIVE_INTEGER|2| |numServices|int|ANY_POSITIVE_INTEGER|2| |numLibraries|int|ANY_POSITIVE_INTEGER|2| |numDeployments|int|ANY_POSITIVE_INTEGER|2| |numRoles|int|ANY_POSITIVE_INTEGER|2| |numUsers|int|ANY_POSITIVE_INTEGER|2| |numDevices|int|ANY_POSITIVE_INTEGER|2| |numEdge|int|ANY_POSITIVE_INTEGER|2| |numAPIReqsTotal|int|ANY_POSITIVE_INTEGER|2| |numAPIReqsMonth|int|ANY_POSITIVE_INTEGER|2| |numAPIReqsYear|int|ANY_POSITIVE_INTEGER|2| |numPub|int|ANY_POSITIVE_INTEGER|2| |numPubMonth|int|ANY_POSITIVE_INTEGER|2| |numPubYear|int|ANY_POSITIVE_INTEGER|2| |numRecTotal|int|ANY_POSITIVE_INTEGER|2| |numRecMonth|int|ANY_POSITIVE_INTEGER|2| |numRecYear|int|ANY_POSITIVE_INTEGER|2| |diskUsage|int|ANY_POSITIVE_INTEGER|2| ### Example: ```json "query":{"FILTERS":[[{"NEQ":[{"disabled":true}]},{"EQ":[{"numDevs":2}]}]],"PAGESIZE":0,"PAGENUM":0} ``` 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 query model at in the description for 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: AUDIT - Get list of systems that have been updated description: | ## Description: Get list of changes that have been made to the system. This is an Admin and Dev endpoint. ### Query: ```json "query":{"PAGESIZE":int,"PAGENUM":int,"FILTERS":[[{"_REPLACE_WITH_OPERATOR_":[{"valueType":"value"}]}]],"SORT":[{"DESC":"value"}]} ``` Note - You can generate a complex query object in a code service using the `ClearBlade.Query()` object. ## Admin Audit Table Schema: ## Admin Audit Table Schema: Refer to this when building the query. | Column | Type | Possible Values| Examples| |:--------|:--------|:------|:------| | name | string |ANY_STRING|"ClearBladeDev"| |owner|string|EMAIL_STRING |"example@clearblade.com"| |systemKey|string|SINGLE_STRING_WITH_HEX_CHARS_ONLY|"80sdff82c0b1fbda1f271"| |disabled|boolean|true, false|true| |lastUpdated|timestamp|ISO_DATE_TIME_STRING|"2020-01-29T20:18:18.475214Z"| |numDevs|int|ANY_POSITIVE_INTEGER|2| |numServices|int|ANY_POSITIVE_INTEGER|2| |numLibraries|int|ANY_POSITIVE_INTEGER|2| |numDeployments|int|ANY_POSITIVE_INTEGER|2| |numRoles|int|ANY_POSITIVE_INTEGER|2| |numUsers|int|ANY_POSITIVE_INTEGER|2| |numDevices|int|ANY_POSITIVE_INTEGER|2| |numEdge|int|ANY_POSITIVE_INTEGER|2| |numAPIReqsTotal|int|ANY_POSITIVE_INTEGER|2| |numAPIReqsMonth|int|ANY_POSITIVE_INTEGER|2| |numAPIReqsYear|int|ANY_POSITIVE_INTEGER|2| |numPub|int|ANY_POSITIVE_INTEGER|2| |numPubMonth|int|ANY_POSITIVE_INTEGER|2| |numPubYear|int|ANY_POSITIVE_INTEGER|2| |numRecTotal|int|ANY_POSITIVE_INTEGER|2| |numRecMonth|int|ANY_POSITIVE_INTEGER|2| |numRecYear|int|ANY_POSITIVE_INTEGER|2| |diskUsage|int|ANY_POSITIVE_INTEGER|2| ### Example: ```json "query":{"FILTERS":[[{"NEQ":[{"disabled":true}]},{"EQ":[{"numDevs":2}]}]],"PAGESIZE":0,"PAGENUM":0} ``` 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 query model at in the description for 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: DEPLOYMENTS - Gets all deployment names and descriptions for a system tags: - Deployments produces: - application/json description: | ## Description: Gets all deployment names and descriptions for a system ### Query: ```json {"PAGESIZE":int,"PAGENUM":int,"FILTERS":[[{"EQ":[{"valueType":"value"}]}]],"SORT":[{"DESC":"value"}]} ``` ### Example: ```json {"PAGESIZE":0,"PAGENUM":0,"SORT":[{"DESC":"name"}]} parameters: - in: header description: User Token obtained through user authentication. name: ClearBlade-UserToken required: true type: string - in: query description: Tags to filter deployments by. See the query model above 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: DEPLOYMENTS - Creates a deployment description: Creates one deployment for system tags: - Deployments produces: - application/json parameters: - in: header description: User Token obtained through user authentication. name: ClearBlade-UserToken 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: Information regarding deployment 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: DEPLOYMENTS - Gets a deloyment for a system tags: - Deployments produces: - application/json parameters: - in: header description: User Token obtained through user authentication. name: clearblade-usertoken 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: Name of the deployment to retrieve name: deploymentName required: true type: string responses: '200': description: Retrieved deployment successfully '500': description: Server error. put: operationId: UpdateDeployment summary: DEPLOYMENT - Update deployment description: Updates a deployment. tags: - Deployments produces: - application/json parameters: - in: header description: User Token obtained through user authentication. name: ClearBlade-UserToken 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: Name of the deployment 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: DEPLOYMENT - Delete a deployment description: Deletes a deployment based on the name tags: - Deployments produces: - application/json parameters: - in: header description: User Token obtained through user authentication. name: ClearBlade-UserToken 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: Name of the deployment 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: DEPLOYMENTS - Gets sync status for a deployment 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: Name of the deployment 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: DEPLOYMENTS - Retries sync for an asset description: Retries sync for an asset in an 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: Information regarding sync 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: SHARED CACHE - Gets shared caches for a 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 deployment. name: systemKey required: true type: string responses: '200': description: Retrieves a list of shared caches. schema: $ref: '#/definitions/CacheArrayResp' '400': description: Bad Request. schema: $ref: '#/definitions/ErrorResp' '401': description: Unauthorized. User cannot access resource. '/admin/v/4/service_caches/{systemKey}/{cacheName}': post: operationId: addSharedCache summary: SHARED CACHE - Add a shared cache 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: Name of the shared cache 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: SHARED CACHE - Update a shared cache description: Updates a shared cache properties, like ttl & 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: Name of the shared cache 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: SHARED CACHE - Delete a shared cache 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: Name of the shared cache 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: SESSION - Get user session info description: | ## Description: Returns list of user sessions with User ID and Timestamps . ### Query Structure: ```json {"PAGESIZE":int,"PAGENUM":int,"FILTERS":[[{"_REPLACE_WITH_OPERATOR_":[{"valueType":"value"}]}]], "SORT":[{"DESC":"value"}]} ``` Note - You can generate a complex query object in a code service using the `ClearBlade.Query()` object. ### Filter Options * user_id - string * issued - int (Unix timestamp) ### Example: ```json {"FILTERS":[[{"NEQ":[{"user_id":"9cd8ece70bea9e5a6de9cee05"}]},{"EQ":[{"issued":1587659839}]}]],"PAGESIZE":0,"PAGENUM":0} ``` 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 query model at in the description for 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 list of user sessions schema: $ref: '#/definitions/userSession' '400': description: Bad Request. schema: $ref: '#/definitions/ErrorResp' '401': description: Unauthorized. User cannot access resource. delete: operationId: DeleteUserSession summary: SESSION - Delete user session description: | ## Description: Delete user session. ### Query Structure: ```json {"PAGESIZE":int,"PAGENUM":int,"FILTERS":[[{"_REPLACE_WITH_OPERATOR_":[{"valueType":"value"}]}]], "SORT":[{"DESC":"value"}]} ``` Note - You can generate a complex query object in a code service using the `ClearBlade.Query()` object. ### Filter Options * user_id - string * issued - int (Unix timestamp) ### Example: ```json {"FILTERS":[[{"NEQ":[{"user_id":"9cd8ece70bea9e5a6de9cee05"}]},{"EQ":[{"issued":1587659839}]}]],"PAGESIZE":0,"PAGENUM":0} ``` 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 query model at in the description for 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: SESSION - Get user session count description: | ## Description: Returns number of user sessions. ### Query Structure: ```json {"PAGESIZE":int,"PAGENUM":int,"FILTERS":[[{"_REPLACE_WITH_OPERATOR_":[{"valueType":"value"}]}]], "SORT":[{"DESC":"value"}]} ``` Note - You can generate a complex query object in a code service using the `ClearBlade.Query()` object. ### Filter Options * user_id - string * issued - int (Unix timestamp) ### Example: ```json {"FILTERS":[[{"NEQ":[{"user_id":"9cd8ece70bea9e5a6de9cee05"}]},{"EQ":[{"issued":1587659839}]}]],"PAGESIZE":0,"PAGENUM":0} ``` 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 query model at in the description for 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 number of user sessions schema: $ref: '#/definitions/count' '/admin/v/4/session/{systemKey}/device': get: operationId: GetDeviceSession summary: SESSION - Get device session info description: | ## Description: Returns list of device sessions with Device Key and Timestamps . ### Query Structure: ```json {"PAGESIZE":int,"PAGENUM":int,"FILTERS":[[{"_REPLACE_WITH_OPERATOR_":[{"valueType":"value"}]}]], "SORT":[{"DESC":"value"}]} ``` Note - You can generate a complex query object in a code service using the `ClearBlade.Query()` object. ### Filter Options * device_key - string * issued - int (Unix timestamp) ### Example: ```json {"FILTERS":[[{"NEQ":[{"device_key":"e2c794e60bee9ced68fc101 :: DEVICENAME0001}]},{"EQ":[{"issued":1587659839}]}]],"PAGESIZE":0,"PAGENUM":0} ``` 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 query model at in the description for 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 list of device sessions schema: $ref: '#/definitions/deviceSession' delete: operationId: DeleteDeviceSession summary: SESSION - Delete device session description: | ## Description: Delete device session. ### Query Structure: ```json {"PAGESIZE":int,"PAGENUM":int,"FILTERS":[[{"_REPLACE_WITH_OPERATOR_":[{"valueType":"value"}]}]], "SORT":[{"DESC":"value"}]} ``` Note - You can generate a complex query object in a code service using the `ClearBlade.Query()` object. ### Filter Options * device_key - string * issued - int (Unix timestamp) ### Example: ```json {"FILTERS":[[{"NEQ":[{"device_key":"e2c794e60bee9ced68fc101 :: DEVICENAME0001"}]},{"EQ":[{"issued":1587659839}]}]],"PAGESIZE":0,"PAGENUM":0} ``` 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 query model at in the description for 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: SESSION - Get device session count description: | ## Description: Returns number of device sessions. ### Query Structure: ```json {"PAGESIZE":int,"PAGENUM":int,"FILTERS":[[{"_REPLACE_WITH_OPERATOR_":[{"valueType":"value"}]}]], "SORT":[{"DESC":"value"}]} ``` Note - You can generate a complex query object in a code service using the `ClearBlade.Query()` object. ### Filter Options * device_key - string * issued - int ### Example: ```json {"FILTERS":[[{"NEQ":[{"device_key":"e2c794e60bee9ced68fc101 :: DEVICENAME0001"}]},{"EQ":[{"issued":1587659839}]}]],"PAGESIZE":0,"PAGENUM":0} ``` 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 query model at in the description for 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 number of device sessions schema: $ref: '#/definitions/count' '/api/v/4/bucket_sets/{systemKey}': get: operationId: GetBucketsData summary: FILES - Returns a list of metadata for buckets in system description: Returns a list of metadata for buckets in system tags: - Files 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. name: systemKey required: true type: string responses: '200': description: Returns all buckets metadata schema: $ref: '#/definitions/allBuckets' '/api/v/4/bucket_sets/{systemKey}/{deploymentName}': get: operationId: GetSingleBucketData summary: FILES - Returns metadata for specified bucket description: Returns metadata for specified bucket tags: - Files 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. name: systemKey required: true type: string - in: path description: Name of the deployment to retrieve name: deploymentName required: true type: string responses: '200': description: Returns a bucket's metadata schema: $ref: '#/definitions/buckets' '/api/v/4/bucket_sets/{systemKey}/{deploymentName}/files': get: operationId: GetBoxFiles summary: FILES - Get all files metadata in a box description: | ## Description: Returns metadata of files in a specific box. boxName defaults to "inbox" ### Query Structure: ```json box={boxName} ``` ### boxName Options * inbox * outbox * sandbox If `box==""`, then all files from all three boxes (inbox, outbox, sandbox) will be returned. ### Example: ```json box=inbox ``` 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 query model at in the description for 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: Name of the deployment to retrieve name: deploymentName required: true type: string responses: '200': description: Returns all metadata from box files schema: $ref: '#/definitions/box' '/api/v/4/bucket_sets/{systemKey}/{deploymentName}/file/meta': get: operationId: GetBoxFilesMeta summary: FILES - Get a file's metadata in a box 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. name: ClearBlade-DevToken required: true type: string - in: query description: one of inbox, outbox or sandbox, defaults to 'inbox' if empty. name: box required: false type: string - in: query description: Query object used to filter the items. See query model at in the description for 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: Name of the deployment to retrieve name: deploymentName required: true type: string responses: '200': description: Returns metadata from a box file schema: $ref: '#/definitions/box_data' '/api/v/4/bucket_sets/{systemKey}/{deploymentName}/file/create': post: operationId: CreateBucketFile summary: FILES - Creates a new file in a bucket description: Creates a new file in bucket tags: - Files produces: - application/json parameters: - in: header description: Developer Token obtained through admin authentication. name: ClearBlade-DevToken required: true 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: Name of the deployment to retrieve name: deploymentName required: true type: string responses: '200': description: Returns metadata from the new box file schema: $ref: '#/definitions/box_data' '/api/v/4/bucket_sets/{systemKey}/{deploymentName}/file/copy': post: operationId: CopyBucketFile summary: FILES - Copies a file to a new location within buckets 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. name: ClearBlade-DevToken required: true type: string - in: body description: If either `from_box` or `to_box` is empty, then the corresponding path is considered a full path to the local file system. Both `from_box` and `to_box` cannot be simultaneously empty. name: Body schema: $ref: '#/definitions/copyFile' - in: path description: System Key that identifies the system. name: systemKey required: true type: string - in: path description: Name of the deployment to retrieve name: deploymentName required: true type: string responses: '200': description: File is copied. Returns empty. '/api/v/4/bucket_sets/{systemKey}/{deploymentName}/file/move': post: operationId: MoveBucketFile summary: FILES - Moves a file to a new location within buckets. 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. name: ClearBlade-DevToken required: true type: string - in: body description: If either `from_box` or `to_box` is empty, then the corresponding path is considered a full path to the local file system. Both `from_box` and `to_box` cannot be simultaneously empty. name: Body schema: $ref: '#/definitions/copyFile' - in: path description: System Key that identifies the system. name: systemKey required: true type: string - in: path description: Name of the deployment to retrieve name: deploymentName required: true type: string responses: '200': description: File is moved. Returns empty. '/api/v/4/bucket_sets/{systemKey}/{deploymentName}/file/delete': post: operationId: DeleteBucketFile summary: FILES - Deletes a file from the bucket. description: Deletes a file from the bucket. tags: - Files produces: - application/json parameters: - in: header description: Developer Token obtained through admin authentication. name: ClearBlade-DevToken required: true 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: Name of the deployment to retrieve name: deploymentName 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: Developer Id for the owner of the system 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 that will be running for the deploy command. example: "" logs_command: type: string description: A command or shell script that will be used to retrieve any logs printed out by the adapter while it is running. example: "" name: type: string description: Name of the adapter. example: example-adapter os: type: string description: The os this adapter is going to 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 would need to 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 status of the adapter on a specific ClearBlade Edge. A shell script that echoes the status of an adapter 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 would need to 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 default behavior of the ClearBlade platform is to remove the adapter files from the directory where 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 is going to run on. example: linux deploy_command: type: string description: The file name that will be 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 would need to 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 status of the adapter on a specific ClearBlade Edge. A shell script that echoes the status of an adapter should be supplied example: "./status.sh" 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 would need to 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 default behavior of the ClearBlade platform is to remove the adapter files from the directory where 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 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 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 currently using. example: status edges: type: string description: Name of edge(s) being used. example: ["edgeName"] newcollection: description: The information necessary to create a new collection required: - appID - name properties: appID: type: string example: 'c0f8e2c50bbeeaf87f5efa2eee301' description: This is 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: This is 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 id of system to generate new keys for 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 settings in individual roles 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: bieberboy new_password: type: string example: bieberluver devemail: description: email key of developer required: - email properties: email: type: string example: rob@clearblade.com rolesinfo: description: Information of 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: Information about the timer example: My 10 second timer frequency: type: integer description: Frequency (in seconds) between two consecutive invocations of a timer handler 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 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: Names of edges 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 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 deployment properties: adds: type: array items: type: string description: Names of edges to be added to the deployment example: - edge1 - edge2 - edge3 removes: type: array items: type: string description: Names of edges 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 collection 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 asset should be synced to all edges example: true sync_to_platform: type: boolean description: specifies whether asset should be synced to 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: Description of new shared cache 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 goes an example description. id: description: Unique ID of cache 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: list of caches 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: This is 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 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 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 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 invocations of a timer handler 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: Security Settings for 2FA 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: Credentials for all databases 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: [] 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 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 message body of the topic 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: List of rotating keys. 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 collection type: integer example: 2 indexArray: description: Type choices are unique index 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: ''] edge_storage: description: Edge storage type - local or google type: string example: local platform_config: description: Platform Config file type: array example: [root: ''] 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: Date of update 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 file is being copied/moved type: string example: inbox from_path: description: Relative File Path Name where file is being copied/moved type: string example: /relative/file/path to_box: description: Box Name of where file is being copied/moved to type: string example: inbox to_path: description: Relative File Path Name where file is being copied/moved to type: string example: /relative/file/path deleteFile: properties: box: description: Box Name of file being deleted type: string example: inbox path: description: Relative File Path Name of file being deleted type: string example: /relative/file/path