openapi: 3.2.0 info: title: /IOTCONNECT™ Firmware Module API description: 'Firmware REST API contains information of Device modules. It will give API methods to firmware communication and OTA. Headers Needed Headers for all the API. Authorization    Bearer + access_token (Generated From api/v1.1/auth/login API) Content-Type    application/json' version: '2.0' security: - Bearer: [] tags: - name: Module description: Module Api List paths: /api/v2/module-type/lookup: get: tags: - Module summary: Get module type lookup list description: This API endpoint gives you a module type lookup list for module. responses: '412': description: Indicates that a condition set for this request is failed, and the request cannot be carried out. '401': description: Indicates that authentication is failed because of the token is invalid or expired or missing. '500': description: Indicates that the request could not be carried out because of some technical error on the server. content: application/json: schema: $ref: '#/components/schemas/ErrorsResponse' '200': description: Indicates that the module type lookup received successfully. content: application/json: schema: $ref: '#/components/schemas/ModuleTypeLookupResponse' '409': description: 'Indicates that the request could not be carried out because of one of the below or other conflicts on the server. invalid logged user or company.' operationId: getApiV2ModuleTypeLookup x-operation-id-source: derived /api/v2/Module/lookup: get: tags: - Module summary: Get module lookup list description: This API endpoint gives you a module lookup list. responses: '412': description: Indicates that a condition set for this request is failed, and the request cannot be carried out. '401': description: Indicates that authentication is failed because of the token is invalid or expired or missing. '500': description: Indicates that the request could not be carried out because of some technical error on the server. content: application/json: schema: $ref: '#/components/schemas/ErrorsResponse' '200': description: Indicates that the module lookup received successfully. content: application/json: schema: $ref: '#/components/schemas/ModuleLookupResponse' '403': description: Indicates that the user is not authorized to access this section. '409': description: 'Indicates that the request could not be carried out because of one of the below or other conflicts on the server. invalid logged user or company.' operationId: getApiV2ModuleLookup x-operation-id-source: derived /api/v2/Module/{moduleGuid}: get: tags: - Module summary: Get module detail by moduleGuid description: This API endpoint gives you a detailed description of module details. parameters: - name: moduleGuid in: path description: moduleGuid required: true schema: type: string format: uuid responses: '412': description: Indicates that a condition set for this request is failed, and the request cannot be carried out. '401': description: Indicates that authentication is failed because of the token is invalid or expired or missing. '500': description: Indicates that the request could not be carried out because of some technical error on the server. content: application/json: schema: $ref: '#/components/schemas/ErrorsResponse' '200': description: Indicates that module details received successfully. content: application/json: schema: $ref: '#/components/schemas/ModuleDetailResponse' '403': description: Indicates that the user is not authorized to access this section. '409': description: 'Indicates that the request could not be carried out because of one of the below or other conflicts on the server. module not found and invalid logged user or company.' operationId: getApiV2ModuleByModuleGuid x-operation-id-source: derived put: tags: - Module summary: Update module by moduleGuid description: 'This API endpoint allows you to update the module. For that, you need to send moduleGuid in request url and updated module details in the request body. fileName is a module file name.version is a module version.' parameters: - name: moduleGuid in: path description: Module guid required: true schema: type: string format: uuid responses: '412': description: Indicates that a condition set for this request is failed, and the request cannot be carried out. '401': description: Indicates that authentication is failed because of the token is invalid or expired or missing. '500': description: Indicates that the request could not be carried out because of some technical error on the server. content: application/json: schema: $ref: '#/components/schemas/ErrorsResponse' '200': description: Indicates that module updated successfully. content: application/json: schema: $ref: '#/components/schemas/ModuleUpdateResponse' '403': description: Indicates that the user is not authorized to access this section. '409': description: 'Indicates that the request could not be carried out because of one of the below or other conflicts on the server. module not found and invalid logged user or company.' requestBody: content: application/json: schema: $ref: '#/components/schemas/ModuleUpdateRequest' description: Json object used as input operationId: putApiV2ModuleByModuleGuid x-operation-id-source: derived delete: tags: - Module summary: Delete module by moduleGuid description: This API endpoint allows you to delete the module. For that, you need to send moduleGuid in request url. parameters: - name: moduleGuid in: path description: Module guid required: true schema: type: string format: uuid responses: '412': description: Indicates that a condition set for this request is failed, and the request cannot be carried out. '401': description: Indicates that authentication is failed because of the token is invalid or expired or missing. '500': description: Indicates that the request could not be carried out because of some technical error on the server. content: application/json: schema: $ref: '#/components/schemas/ErrorsResponse' '200': description: Indicates that module deleted successfully. content: application/json: schema: $ref: '#/components/schemas/ModuleDeleteResponse' '403': description: Indicates that the user is not authorized to access this section. '409': description: 'Indicates that the request could not be carried out because of one of the below or other conflicts on the server. module not found and invalid logged user or company.' operationId: deleteApiV2ModuleByModuleGuid x-operation-id-source: derived /api/v2/Module: get: tags: - Module summary: Get module list description: 'This API endpoint provides you the list of module. You can also add the filters as given in the parameters. Though the filters are optional, to apply them, you need to send these filter parameters in a query string.' parameters: - name: pageNumber in: query description: 'To fetch specific page data. Eg: 2' schema: type: integer format: int32 - name: pageSize in: query description: 'To define number of records in single page. Eg: 25' schema: type: integer format: int32 - name: searchText in: query description: To search for specific texts in the list. schema: type: string - name: sortBy in: query description: To sort the list. To do that, Specify Field name to sort with and sorting order. Eg. version asc, version desc, version etc schema: type: string responses: '412': description: Indicates that a condition set for this request is failed, and the request cannot be carried out. '401': description: Indicates that authentication is failed because of the token is invalid or expired or missing. '500': description: Indicates that the request could not be carried out because of some technical error on the server. content: application/json: schema: $ref: '#/components/schemas/ErrorsResponse' '200': description: Indicates that module list received successfully. content: application/json: schema: $ref: '#/components/schemas/ModuleListResponse' '403': description: Indicates that the user is not authorized to access this section. '409': description: 'Indicates that the request could not be carried out because of one of the below or other conflicts on the server. invalid logged user or company.' operationId: getApiV2Module x-operation-id-source: derived post: tags: - Module summary: Add module description: 'Module on the devices connected to the IoT hub needs to be updated as per the requirements. For example, you may need to add new features to the module or make your AI stronger. You can update module remotely. This API endpoint allows you to create new module for your devices. Here, the moduleTypeGuid is a module type guid which you can get from module type lookup API endpoint. name is a module name. code is a module code.fileName is a module file name.version is a module version. Note : Once module created successfully, API returns moduleGuid and you must required to upload module file in file service API with moduleGuid.' responses: '412': description: Indicates that a condition set for this request is failed, and the request cannot be carried out. '401': description: Indicates that authentication is failed because of the token is invalid or expired or missing. '500': description: Indicates that the request could not be carried out because of some technical error on the server. content: application/json: schema: $ref: '#/components/schemas/ErrorsResponse' '200': description: Indicates that module created successfully. content: application/json: schema: $ref: '#/components/schemas/ModuleCreateResponse' '403': description: Indicates that the user is not authorized to access this section. '409': description: 'Indicates that the request could not be carried out because of one of the below or other conflicts on the server. module type not found, module code already exists and invalid logged user or company.' requestBody: content: application/json: schema: $ref: '#/components/schemas/ModuleCreateRequest' description: Json object used as input operationId: postApiV2Module x-operation-id-source: derived /api/v2/Module/push: post: tags: - Module summary: Push a module on multiple devices description: 'Push a module on multiple devices using this API endpoint. For that, you need to send either entityGuid or deviceGuid list along with moduleGuid in the request body. If you wish to send entityGuid, send value “1” in the applyTo parameter and entity guid in entityGuid parameter. This will push module to all the devices available in the given entity. With this entity devices you can also push this module to all devices which are exists in child entities. For that, you need to send value “true” in isRecursive parameter. If you wish to send deviceGuid list, send value “2” in the applyTo parameter and list of device guids in devices parameter. This will push module to selected devices only.' responses: '412': description: Indicates that a condition set for this request is failed, and the request cannot be carried out. '401': description: Indicates that authentication is failed because of the token is invalid or expired or missing. '500': description: Indicates that the request could not be carried out because of some technical error on the server. content: application/json: schema: $ref: '#/components/schemas/ErrorsResponse' '200': description: Indicates that module push process started successfully. content: application/json: schema: $ref: '#/components/schemas/ModulePushResponse' '403': description: Indicates that the user is not authorized to access this section. '409': description: 'Indicates that the request could not be carried out because of one of the below or other conflicts on the server. module not found, entity not found and invalid logged user or company.' requestBody: content: application/json: schema: $ref: '#/components/schemas/ModulePushRequestV2' description: Json object operationId: postApiV2ModulePush x-operation-id-source: derived get: tags: - Module summary: Get module push list parameters: - name: pageNumber in: query description: 'To fetch specific page data. Eg: 2' schema: type: integer format: int32 - name: pageSize in: query description: 'To define number of records in single page. Eg: 25' schema: type: integer format: int32 - name: searchText in: query description: To search for specific texts in the list. schema: type: string - name: sortBy in: query description: To sort the list. To do that, Specify Field name to sort with and sorting order. Eg. name asc, name desc, name etc schema: type: string responses: '412': description: Indicates that a condition set for this request is failed, and the request cannot be carried out. '401': description: Indicates that authentication is failed because of the token is invalid or expired or missing. '500': description: Indicates that the request could not be carried out because of some technical error on the server. content: application/json: schema: $ref: '#/components/schemas/ErrorsResponse' '200': description: Indicates that module push item list received successfully. content: application/json: schema: $ref: '#/components/schemas/ModulePushListResponse' '403': description: Indicates that the user is not authorized to access this section. '409': description: 'Indicates that the request could not be carried out because of one of the below or other conflicts on the server. invalid logged user or company.' operationId: getApiV2ModulePush x-operation-id-source: derived components: schemas: ModuleUpdateRequest: required: - fileName - version type: object properties: fileName: maxLength: 200 minLength: 1 type: string description: Module file name version: maxLength: 10 minLength: 1 type: string description: Module version additionalProperties: false ErrorModel: type: object properties: param: type: - string - 'null' message: type: - string - 'null' additionalProperties: false ModulePushListResponse: type: object properties: data: type: - array - 'null' items: $ref: '#/components/schemas/ModulePushList' status: enum: - 100 - 101 - 102 - 103 - 200 - 201 - 202 - 203 - 204 - 205 - 206 - 207 - 208 - 226 - 300 - 301 - 302 - 303 - 304 - 305 - 306 - 307 - 308 - 400 - 401 - 402 - 403 - 404 - 405 - 406 - 407 - 408 - 409 - 410 - 411 - 412 - 413 - 414 - 415 - 416 - 417 - 421 - 422 - 423 - 424 - 426 - 428 - 429 - 431 - 451 - 500 - 501 - 502 - 503 - 504 - 505 - 506 - 507 - 508 - 510 - 511 type: integer format: int32 message: type: - string - 'null' count: type: - integer - 'null' format: int64 additionalProperties: false ModulePushRequestV2: required: - applyTo - deviceTemplateGuid - moduleGuid type: object properties: deviceTemplateGuid: minLength: 1 type: string moduleGuid: minLength: 1 type: string description: Module Guid applyTo: type: integer description: 'Send 1 or 2. 1: for entity, 2: for device guid list' format: int32 devices: type: - array - 'null' items: type: string description: Device guid list. required if applyTo is 2 entityGuid: type: - string - 'null' description: Entity Guid. required if applyTo is 1 isRecursive: type: - boolean - 'null' description: Send true to include child entity devices. if applyTo is 1 additionalProperties: false ModuleCreateResponse: type: object properties: data: type: - array - 'null' items: $ref: '#/components/schemas/ModuleCreate' status: enum: - 100 - 101 - 102 - 103 - 200 - 201 - 202 - 203 - 204 - 205 - 206 - 207 - 208 - 226 - 300 - 301 - 302 - 303 - 304 - 305 - 306 - 307 - 308 - 400 - 401 - 402 - 403 - 404 - 405 - 406 - 407 - 408 - 409 - 410 - 411 - 412 - 413 - 414 - 415 - 416 - 417 - 421 - 422 - 423 - 424 - 426 - 428 - 429 - 431 - 451 - 500 - 501 - 502 - 503 - 504 - 505 - 506 - 507 - 508 - 510 - 511 type: integer format: int32 message: type: - string - 'null' count: type: - integer - 'null' format: int64 additionalProperties: false ModuleDeleteResponse: type: object properties: data: type: - array - 'null' items: type: - object - 'null' status: enum: - 100 - 101 - 102 - 103 - 200 - 201 - 202 - 203 - 204 - 205 - 206 - 207 - 208 - 226 - 300 - 301 - 302 - 303 - 304 - 305 - 306 - 307 - 308 - 400 - 401 - 402 - 403 - 404 - 405 - 406 - 407 - 408 - 409 - 410 - 411 - 412 - 413 - 414 - 415 - 416 - 417 - 421 - 422 - 423 - 424 - 426 - 428 - 429 - 431 - 451 - 500 - 501 - 502 - 503 - 504 - 505 - 506 - 507 - 508 - 510 - 511 type: integer format: int32 message: type: - string - 'null' count: type: - integer - 'null' format: int64 additionalProperties: false ModuleLookup: type: object properties: guidValue: type: - string - 'null' readOnly: true name: type: - string - 'null' code: type: - string - 'null' additionalProperties: false ModuleList: type: object properties: guid: type: - string - 'null' readOnly: true name: type: - string - 'null' code: type: - string - 'null' fileName: type: - string - 'null' version: type: - string - 'null' moduleType: type: - string - 'null' additionalProperties: false ModuleTypeLookupResponse: type: object properties: data: type: - array - 'null' items: $ref: '#/components/schemas/ModuleTypeLookup' status: enum: - 100 - 101 - 102 - 103 - 200 - 201 - 202 - 203 - 204 - 205 - 206 - 207 - 208 - 226 - 300 - 301 - 302 - 303 - 304 - 305 - 306 - 307 - 308 - 400 - 401 - 402 - 403 - 404 - 405 - 406 - 407 - 408 - 409 - 410 - 411 - 412 - 413 - 414 - 415 - 416 - 417 - 421 - 422 - 423 - 424 - 426 - 428 - 429 - 431 - 451 - 500 - 501 - 502 - 503 - 504 - 505 - 506 - 507 - 508 - 510 - 511 type: integer format: int32 message: type: - string - 'null' count: type: - integer - 'null' format: int64 additionalProperties: false ModuleCreate: type: object properties: newId: type: - string - 'null' additionalProperties: false ModuleUpdateResponse: type: object properties: data: type: - array - 'null' items: type: - object - 'null' status: enum: - 100 - 101 - 102 - 103 - 200 - 201 - 202 - 203 - 204 - 205 - 206 - 207 - 208 - 226 - 300 - 301 - 302 - 303 - 304 - 305 - 306 - 307 - 308 - 400 - 401 - 402 - 403 - 404 - 405 - 406 - 407 - 408 - 409 - 410 - 411 - 412 - 413 - 414 - 415 - 416 - 417 - 421 - 422 - 423 - 424 - 426 - 428 - 429 - 431 - 451 - 500 - 501 - 502 - 503 - 504 - 505 - 506 - 507 - 508 - 510 - 511 type: integer format: int32 message: type: - string - 'null' count: type: - integer - 'null' format: int64 additionalProperties: false ErrorsResponse: type: object properties: status: type: integer format: int32 message: type: - string - 'null' error: type: - array - 'null' items: $ref: '#/components/schemas/ErrorModel' additionalProperties: false ModuleDetailResponse: type: object properties: data: type: - array - 'null' items: $ref: '#/components/schemas/ModuleDetail' status: enum: - 100 - 101 - 102 - 103 - 200 - 201 - 202 - 203 - 204 - 205 - 206 - 207 - 208 - 226 - 300 - 301 - 302 - 303 - 304 - 305 - 306 - 307 - 308 - 400 - 401 - 402 - 403 - 404 - 405 - 406 - 407 - 408 - 409 - 410 - 411 - 412 - 413 - 414 - 415 - 416 - 417 - 421 - 422 - 423 - 424 - 426 - 428 - 429 - 431 - 451 - 500 - 501 - 502 - 503 - 504 - 505 - 506 - 507 - 508 - 510 - 511 type: integer format: int32 message: type: - string - 'null' count: type: - integer - 'null' format: int64 additionalProperties: false ModuleTypeLookup: type: object properties: guid: type: - string - 'null' readOnly: true name: type: - string - 'null' additionalProperties: false ModuleDetail: type: object properties: guid: type: - string - 'null' readOnly: true name: type: - string - 'null' code: type: - string - 'null' moduleTypeGuid: type: - string - 'null' readOnly: true moduleTypeName: type: - string - 'null' fileName: type: - string - 'null' additionalProperties: false ModulePushList: type: object properties: modulePushGuid: type: - string - 'null' readOnly: true name: type: - string - 'null' code: type: - string - 'null' fileName: type: - string - 'null' version: type: - string - 'null' moduleType: type: - string - 'null' uniqueId: type: - string - 'null' pushedBy: type: - string - 'null' pushedOn: type: string format: date-time additionalProperties: false ModulePushResponse: type: object properties: data: type: - array - 'null' items: type: - object - 'null' status: enum: - 100 - 101 - 102 - 103 - 200 - 201 - 202 - 203 - 204 - 205 - 206 - 207 - 208 - 226 - 300 - 301 - 302 - 303 - 304 - 305 - 306 - 307 - 308 - 400 - 401 - 402 - 403 - 404 - 405 - 406 - 407 - 408 - 409 - 410 - 411 - 412 - 413 - 414 - 415 - 416 - 417 - 421 - 422 - 423 - 424 - 426 - 428 - 429 - 431 - 451 - 500 - 501 - 502 - 503 - 504 - 505 - 506 - 507 - 508 - 510 - 511 type: integer format: int32 message: type: - string - 'null' count: type: - integer - 'null' format: int64 additionalProperties: false ModuleCreateRequest: required: - code - fileName - moduleTypeGuid - name - version type: object properties: moduleTypeGuid: minLength: 1 type: string description: Module type guid name: maxLength: 200 minLength: 1 type: string description: Module name code: maxLength: 10 minLength: 3 type: string description: Module code, should be alphanumeric fileName: maxLength: 200 minLength: 1 type: string description: Module file name version: maxLength: 10 minLength: 1 type: string description: Module version additionalProperties: false ModuleListResponse: type: object properties: data: type: - array - 'null' items: $ref: '#/components/schemas/ModuleList' status: enum: - 100 - 101 - 102 - 103 - 200 - 201 - 202 - 203 - 204 - 205 - 206 - 207 - 208 - 226 - 300 - 301 - 302 - 303 - 304 - 305 - 306 - 307 - 308 - 400 - 401 - 402 - 403 - 404 - 405 - 406 - 407 - 408 - 409 - 410 - 411 - 412 - 413 - 414 - 415 - 416 - 417 - 421 - 422 - 423 - 424 - 426 - 428 - 429 - 431 - 451 - 500 - 501 - 502 - 503 - 504 - 505 - 506 - 507 - 508 - 510 - 511 type: integer format: int32 message: type: - string - 'null' count: type: - integer - 'null' format: int64 additionalProperties: false ModuleLookupResponse: type: object properties: data: type: - array - 'null' items: $ref: '#/components/schemas/ModuleLookup' status: enum: - 100 - 101 - 102 - 103 - 200 - 201 - 202 - 203 - 204 - 205 - 206 - 207 - 208 - 226 - 300 - 301 - 302 - 303 - 304 - 305 - 306 - 307 - 308 - 400 - 401 - 402 - 403 - 404 - 405 - 406 - 407 - 408 - 409 - 410 - 411 - 412 - 413 - 414 - 415 - 416 - 417 - 421 - 422 - 423 - 424 - 426 - 428 - 429 - 431 - 451 - 500 - 501 - 502 - 503 - 504 - 505 - 506 - 507 - 508 - 510 - 511 type: integer format: int32 message: type: - string - 'null' count: type: - integer - 'null' format: int64 additionalProperties: false securitySchemes: Bearer: type: apiKey description: Please enter JWT with Bearer into field name: Authorization in: header