1E Core APIs
Below is the list of all the APIs exposed by 1E Core along with the details:
Sl. No. | API | Parameters | Return value | Functionality |
---|---|---|---|---|
1 | fetchInstruction | application, userName, password | boolean (true for a success and false for a failure) | Pull instruction definitions and their respective parameters from 1E server. Inserts/updates this data to appropriate ServiceNow tables. |
2 | executeInstruction | instructionDefinitionID, devices, parameterObj, taskId, userName, password, application | sys_is of triggered instruction record | Executes an instruction on 1E server. The device parameters will fetch its value from 1E end-user device(s) in an array format. Creates instruction record and inserts instruction execution ID and current status of instruction into it. |
3 | getStatus | triggeredInstruction, userName, password | int (current status of an instruction) | Hits 1E's status API to get current status of instruction. Update triggered instruction record for current status. |
4 | testConnection | userName, password | boolean (true for a success and false for a failure) | Hits a 1E API to test if we are able to establish a connection with 1E server. |
5 | getResponse | triggeredInstructionID, userName, password, startRange batchSize | JSON object | Hits 1E's response API for received instruction execution ID. |
6 | cancelInstruction | triggeredInstruction, userName, password | Success/failure code | Cancels execution of a running instruction on device(s) |
7 | getInstructionStatistics | triggeredInstructionRecord, userName, password | Statistics object of a running intruction | Hits 1E's API to get current statistics of a running instruction. |
8 | purgeInstruction | purge_month, application | undefined | Purges all the triggered instructions of the instruction calling application, those of which are older than the specified time. |