Instructions API documentation version v1
https://< >.ondemand.com/ain/services/api/v1
About Instructions
An instruction is a set of steps that help the user to carry out a specific task while handling an equipment. Instructions help the user to maintain the equipment better. An instruction can be of different types such as planned maintenance instruction, breakdown instruction, installation instruction, operations instruction and disposal instruction.
Purpose
This API allows you to create and update an instruction and retrieve and delete single/multiple instructions.
/instructions
This endpoint allows you to create an instruction.
This endpoint allows you to get single/multiple instructions.
This API allows you to update and get the instruction of a specified ID.
Delete Instructions according to instruction IDs provided in payload.
post /instructions
This endpoint allows you to create an instruction.
REST API supports Basic Authentication
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-4/schema",
"type": "object",
"additionalProperties": false,
"properties": {
"instructionHeader": {
"instructionType": {
"type": "string",
"maxLength": 10
},
"subClass": {
"type": "string",
"maxLength": 32
},
"status": {
"type": "string",
"maxLength": 1
},
"activityCode": {
"type": "string",
"maxLength": 2
},
"title": {
"type": "string",
"maxLength": 256
},
"instructionDescription": {
"type": "string"
},
"duration": {
"type": "number"
},
"durationUnit": {
"type": "string",
"maxLength": 1
},
"peopleRequired": {
"type": "integer"
},
"isWarrantyRelevant": {
"type": "integer"
},
"documentIDList": {
"type": "array",
"items": {
"documentID": {
"type": "string",
"maxLength": 100
}
}
},
"vdsDocumentIDList": {
"type": "array",
"items": {
"documentID": {
"type": "string",
"maxLength": 100
}
}
},
"failureModeCode": {
"type": "array",
"items": {
"failureCode": {
"type": "string"
}
}
},
"frequency": {
"type": "integer"
},
"frequencyUnit": {
"type": "string",
"maxLength": 1
},
"criticality": {
"type": "string",
"maxLength": 1
}
},
"postChecks": {
"type": "array",
"items": {
"postCheckDescription": {
"type": "string",
"maxLength": 5000
}
}
},
"preconditions": {
"type": "array",
"items": {
"preConditionDescription": {
"type": "string",
"maxLength": 5000
}
}
},
"safetyRules": {
"type": "array",
"items": {
"ruleCode": {
"type": "string"
}
}
},
"steps": {
"type": "array",
"items": {
"stepName": {
"type": "string"
},
"stepDescription": {
"type": "string"
},
"riskCategory": {
"type": "string"
},
"riskDescription": {
"type": "string"
},
"peopleRequired": {
"type": "integer"
},
"documentID": {
"type": "string"
},
"roles": {
"type": "array",
"items": {
"roleCode": {
"type": "integer"
},
"workUnit": {
"type": "string"
},
"expectedWork": {
"type": "number"
}
}
}
},
"spareParts": {
"type": "array",
"items": {
"sparePartID": {
"type": "string"
},
"quantity": {
"type": "integer"
}
}
},
"tools": {
"type": "array",
"items": {
"toolName": {
"type": "string"
}
}
},
"documentIDList": {
"type": "array",
"items": {
"documentID": {
"type": "string",
"maxLength": 100
}
}
}
},
"modelIDs": {
"type": "array",
"items": {
"additionalProperties": false,
"properties": {
"modelID": {
"type": "string",
"maxLength": 32
}
}
}
},
"equipmentIDs": {
"type": "array",
"items": {
"additionalProperties": false,
"properties": {
"equipmentID": {
"type": "string",
"maxLength": 32
}
}
}
},
"required": ["instructionType", "status", "title", "activityCode", "subClass"]
}
}Example:
{
"instructionHeader": {
"instructionType": "1",
"subClass": "2A408AF6FAC14EB2977DECE0FBF2B3F8",
"status": "1",
"activityCode": "1",
"title": "InstructionForAPI_7",
"instructionDescription": "this is instruction24 description",
"duration": "20",
"durationUnit": "1",
"peopleRequired": 20,
"frequency": 9,
"frequencyUnit": "1",
"criticality": "1",
"documentIDList": [{
"documentID": "RucMSTTyGIYoYlD7fDlG3KeDBOlN3xW14aYnnBhYj_g"
}]
},
"postChecks": [{
"postCheckDescription": "post check 1"
}],
"preconditions": [{
"preConditionDescription": "pre condition1 "
}],
"safetyRules": [{
"ruleCode": "3",
"source": "1"
}],
"steps": [{
"stepName": "step1",
"stepDescription": "this is step1 description",
"riskCategory": "1",
"sequence": 0,
"peopleRequired": 1,
"roles": [{
"roleCode": 1,
"workUnit": 1,
"expectedWork": "20"
}],
"spareParts": [{
"sparePartID": "5nbaXIDoWT04fbOdOkxMbIYgYFYUE555pl3nthylhVo",
"quantity": 10
}],
"tools": [{
"toolName": "tool1"
}],
"riskDescription": "risk category desciption",
"documentIDList": [{
"documentID": "afFwQuuTpImdAQyuoe0enThuFZSKN7zr_NPo_kT-3rQ"
}]
}],
"modelIDs": [{
"modelID": "F586C1042E23439DA226F5832F4C5AA1"
}],
"equipmentIDs": [{
"equipmentID": "9CBD94906757468C8763079D56E1C843"
}]
}HTTP status code 200
Successfully creates and returns details of created Instructions along with autogenerated ID
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-4/schema",
"type": "object",
"additionalProperties": false,
"properties": {
"instructionID": {
"type": "string",
"maxLength": 32
},
"instructionHeader": {
"instructionType": {
"type": "string",
"maxLength": 10
},
"internalID": {
"type": "string",
"description": "User specified Id. This would replace the 'title' field with the next release"
},
"instructionTypeDescription": {
"type": "string",
"maxLength": 10
},
"instructionVersion": {
"type": "string",
"maxLength": 10
},
"subClass": {
"type": "string",
"maxLength": 32
},
"component": {
"type": "string"
},
"status": {
"type": "string"
},
"source": {
"type": "string"
},
"hasInactiveVersion": {
"type": "string"
},
"activityCode": {
"type": "string"
},
"activityDescription": {
"type": "string"
},
"title": {
"type": "string",
"description": "Name of instruction. We recommend you to use 'internalID' field instead of 'title' since 'title' would be deprecated with next release."
},
"instructionDescription": {
"type": "string"
},
"duration": {
"type": "integer"
},
"durationUnit": {
"type": "string",
"maxLength": 1
},
"durationUnitDescription": {
"type": "string"
},
"peopleRequired": {
"type": "integer"
},
"statusDescription": {
"type": "integer"
},
"criticality": {
"type": "string"
},
"criticalityDescription": {
"type": "string"
},
"revision": {
"type": "string"
},
"publishedDate": {
"type": "string"
},
"failureModeCode": {
"type": "array",
"items": {
"failureCode": {
"type": "string"
},
"updateDeleteFlag": {
"enum": ["u", "d"]
}
}
},
"documentIDList": {
"type": "array",
"items": {
"documentID": {
"type": "string",
"maxLength": 100
},
"assignUnAssignFlag": {
"enum": ["a", "ua"]
},
"title": {
"type": "string",
"maxLength": 128
},
"phaseCode": {
"type": "string",
"maxLength": 10
},
"categoryCode": {
"type": "string",
"maxLength": 10
},
"categoryCodeDescription": {
"type": "string"
},
"source": {
"type": "string",
"maxLength": 70
},
"mimeType": {
"type": "string",
"maxLength": 75
},
"description": {
"type": "string",
"maxLength": 75
},
"URL": {
"type": "string",
"maxLength": 256
},
"assignedTo": {
"type": "string",
"maxLength": 32
},
"fileSize": {
"type": "string"
},
"fileSizeUnit": {
"type": "string",
"maxLength": 10
},
"canHotSpot": {
"type": "string",
"maxLength": 10
},
"isHotSpotAttachment": {
"type": "string"
}
}
},
"vdsDocumentIDList": {
"type": "array",
"items": {
"documentID": {
"type": "string",
"maxLength": 100
},
"assignUnAssignFlag": {
"enum": ["a", "ua"]
},
"title": {
"type": "string",
"maxLength": 128
},
"phaseCode": {
"type": "string",
"maxLength": 10
},
"categoryCode": {
"type": "string",
"maxLength": 10
},
"categoryCodeDescription": {
"type": "string"
},
"source": {
"type": "string",
"maxLength": 70
},
"mimeType": {
"type": "string",
"maxLength": 75
},
"description": {
"type": "string",
"maxLength": 75
},
"URL": {
"type": "string",
"maxLength": 256
},
"assignedTo": {
"type": "string",
"maxLength": 32
},
"fileSize": {
"type": "string"
},
"fileSizeUnit": {
"type": "string",
"maxLength": 10
},
"canHotSpot": {
"type": "string",
"maxLength": 10
},
"isHotSpotAttachment": {
"type": "string"
}
}
},
"frequency": {
"type": "integer"
},
"frequencyUnit": {
"type": "string",
"maxLength": 1
},
"repitionDurationUnitDescription": {
"type": "string"
}
},
"safetyRules": {
"type": "array",
"items": {
"ruleCode": {
"type": "string"
},
"ruleDescription": {
"type": "string"
},
"source": {
"type": "string"
},
"sourceDescription": {
"type": "string"
},
"updateDeleteFlag": {
"enum": ["u", "d"]
}
}
},
"preconditions": {
"type": "array",
"items": {
"preConditionID": {
"type": "string"
},
"preConditionDescription": {
"type": "string"
},
"updateDeleteFlag": {
"enum": ["u", "d"]
}
}
},
"steps": {
"type": "array",
"items": {
"instructionName": {
"type": "string"
},
"stepID": {
"type": "string"
},
"stepName": {
"type": "string"
},
"stepDescription": {
"type": "string"
},
"imagePreview": {
"type": "string"
},
"riskCategory": {
"type": "string"
},
"riskDescription": {
"type": "string"
},
"sequence": {
"type": "integer"
},
"riskCategoryDescription": {
"type": "string"
},
"noOfAttachements": {
"type": "string"
},
"documentID": {
"type": "string"
},
"peopleRequired": {
"type": "integer"
},
"roles": {
"type": "array",
"items": {
"roleCode": {
"type": "string"
},
"expectedWork": {
"type": "integer"
},
"workUnit": {
"type": "string"
},
"workUnitDescription": {
"type": "string"
},
"roleDescription": {
"type": "string"
},
"updateDeleteFlag": {
"enum": ["u", "d"]
}
}
},
"tools": {
"type": "array",
"items": {
"toolID": {
"type": "string"
},
"toolName": {
"type": "integer"
},
"updateDeleteFlag": {
"enum": ["u", "d"]
}
}
},
"spareParts": {
"type": "array",
"items": {
"sparePartID": {
"type": "string"
},
"sparePartName": {
"type": "string"
},
"sparePartNumber": {
"type": "string"
},
"quantity": {
"type": "integer"
},
"manufacturer": {
"type": "string"
},
"manufacturerPartID": {
"type": "string"
},
"sparePartDescription": {
"type": "string"
},
"eanNumber": {
"type": "string"
},
"uom": {
"type": "string"
}
}
},
"documentIDList": {
"type": "array",
"items": {
"documentID": {
"type": "string",
"maxLength": 100
},
"assignUnAssignFlag": {
"enum": ["a", "ua"]
},
"title": {
"type": "string",
"maxLength": 128
},
"phaseCode": {
"type": "string",
"maxLength": 10
},
"categoryCode": {
"type": "string",
"maxLength": 10
},
"categoryCodeDescription": {
"type": "string"
},
"source": {
"type": "string",
"maxLength": 70
},
"mimeType": {
"type": "string",
"maxLength": 75
},
"description": {
"type": "string",
"maxLength": 75
},
"URL": {
"type": "string",
"maxLength": 256
},
"assignedTo": {
"type": "string",
"maxLength": 32
},
"fileSize": {
"type": "string"
},
"fileSizeUnit": {
"type": "string",
"maxLength": 10
},
"canHotSpot": {
"type": "string",
"maxLength": 10
},
"isHotSpotAttachment": {
"type": "string"
}
}
},
"updateDeleteFlag": {
"enum": ["u", "d"]
}
},
"postChecks": {
"type": "array",
"items": {
"postCheckID": {
"type": "string"
},
"postCheckDescription": {
"type": "string"
},
"updateDeleteFlag": {
"enum": ["u", "d"]
}
}
},
"modelIDs": {
"type": "array",
"items": {
"additionalProperties": false,
"properties": {
"modelID": {
"type": "string",
"maxLength": 32
},
"assignUnAssignFlag": {
"enum": ["a", "ua"]
}
}
}
},
"updateDeleteFlag": {
"enum": ["u", "d"]
}
}
}
}Example:
{
"instructionID": "9600F8A02FFD49BD92DE53D411409D71",
"instructionHeader": {
"instructionType": "1",
"instructionTypeDescription": "Planned Maintenance",
"instructionVersion": 0,
"subClass": "SUBCLASS_API_AIN_5",
"status": "1",
"internalID": "INS.pref.164",
"source": "DevDefault",
"hasInactiveVersion": "0",
"activityCode": "1",
"activityDescription": "Modify",
"title": "InstructionForAPI_7",
"instructionDescription": "this is instruction24 description",
"duration": 20,
"durationUnit": "1",
"durationUnitDescription": "Minutes",
"peopleRequired": 20,
"statusDescription": "Published",
"failureModeCode": [],
"criticality": "1",
"criticalityDescription": "Low",
"revision": "1.0",
"publishedDate": "2016-02-09",
"documentIDList": [
{
"documentID": "RucMSTTyGIYoYlD7fDlG3KeDBOlN3xW14aYnnBhYj_g",
"title": "cartoon-character.jpg",
"mimeType": "image/jpeg",
"fileSize": "81 KB",
"canHotSpot": "1",
"isHotSpotAttachment": "0"
}
],
"vdsDocumentIDList": [],
"frequency": 9,
"frequencyUnit": "1",
"repitionDurationUnitDescription": "Minutes"
},
"safetyRules": [
{
"ruleCode": "3",
"ruleDescription": "Wear safety overalls",
"source": "1",
"sourceDescription": "Manufacturer"
}
],
"preconditions": [
{
"preConditionID": "2B952E6D017F47798D593347E5539AE9",
"preConditionDescription": "pre condition1 "
}
],
"steps": [
{
"stepID": "B744B226A9B242B6B9D6D3378505DDAB",
"stepName": "step1",
"stepDescription": "this is step1 description",
"riskCategory": "1",
"riskDescription": "risk category desciption",
"sequence": 0,
"riskCategoryDescription": "Low",
"noOfAttachements": "1",
"roles": [
{
"roleCode": "1",
"expectedWork": 20,
"workUnit": "1",
"workUnitDescription": "Minutes",
"roleDescription": "Heavy Equipment Technician"
}
],
"tools": [
{
"toolName": "tool1"
}
],
"spareParts": [
{
"sparePartID": "5nbaXIDoWT04fbOdOkxMbIYgYFYUE555pl3nthylhVo",
"sparePartName": "111223-VAL_GDE:1",
"sparePartNumber": "",
"quantity": 10,
"manufacturer": "Siemens",
"manufacturerPartID": "SapLabs",
"sparePartDescription": "",
"eanNumber": "123456",
"uom": "12"
}
],
"documentIDList": []
}
],
"postChecks": [
{
"postCheckID": "D1DB2BE5EB42463981F73B32D53D8266",
"postCheckDescription": "post check 1"
}
],
"modelIDs": [
{
"modelID": "F586C1042E23439DA226F5832F4C5AA1"
}
],
"equipmentIDs": [
{
"equipmentID": "9CBD94906757468C8763079D56E1C843"
}
]
}HTTP status code 400
Validation error while creating Instructions.Check the error messages and provide valid inputs.The following example is showing error message for providing duplicate instruction title.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-4/schema",
"type": "object",
"additionalProperties": false,
"properties": {
"statusCode": {
"type": "integer"
},
"errorMessages": {
"type": "array",
"items": {
"errorMessage": {
"type": "string"
},
"repeatedEntities": {
"type": "array",
"items": {
"id": {
"type": "string"
},
"name": {
"type": "string"
}
}
},
"EntitiesNotFound": {
"type": "array",
"items": {
"id": {
"type": "string"
},
"name": {
"type": "string"
}
}
}
}
}
}
}Example:
{
"statusCode": 400,
"errorMessages": [{
"errorMessage": "You have entered an instruction name that already exists. Please enter a different name.",
"repeatedEntities": [],
"EntitiesNotFound": []
}]
}HTTP status code 403
User is not authorized to execute this service.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-4/schema",
"type": "object",
"additionalProperties": false,
"properties": {
"statusCode": {
"type": "integer"
},
"errorMessages": {
"type": "array",
"items": {
"severity": {
"type": "string",
"enum": [
"ERROR",
"SUCCESS",
"WARNING",
"INFO"
]
},
"errorMessage": {
"type": "string"
},
"repeatedEntities": {
"type": "array",
"items": {
"id": {
"type": "string"
},
"name": {
"type": "string"
}
}
},
"EntitiesNotFound": {
"type": "array",
"items": {
"id": {
"type": "string"
},
"name": {
"type": "string"
}
}
}
}
}
}
}Example:
{
"statusCode": 403,
"errorMessages": {
"severity": "ERROR",
"errorMessage": "You are not authorized to access the application. Please contact your system administrator for further support.",
"repeatedEntities": [],
"EntitiesNotFound": []
}
}get /instructions
This endpoint allows you to get single/multiple instructions.
REST API supports Basic Authentication
Query Parameters
- filter: (string)
To apply search on retrieved data using ODATA $filter syntax. Example: $filter = "Title" eq 'instruction'
- count: (string)
To get count of records fetched
HTTP status code 200
Returns the instruction details according to the filter.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-4/schema",
"type": "object",
"additionalProperties": false,
"properties": {
"type": "array",
"items": {
"id": {
"type": "string"
},
"title": {
"type": "string",
"description": "Name of announcement. We recommend you to use 'internalID' field instead of 'title' since 'title' would be deprecated with next release."
},
"internalID": {
"type": "string",
"description": "User specified Id. This would replace the 'title' field with the next release"
},
"status": {
"type": "string"
},
"publishedDate": {
"type": "string"
},
"instructionVersion": {
"type": "integer"
},
"numberOfAssignedModels": {
"type": "integer"
},
"lastChangeDateTime": {
"type": "string"
},
"creationDateTime": {
"type": "string"
},
"duration": {
"type": "string"
},
"activityDescription": {
"type": "string"
},
"instructionStatusDescription": {
"type": "string"
},
"instructionTypeDescription": {
"type": "string"
},
"source": {
"type": "string"
},
"subClass": {
"type": "string"
},
"numberOfAnnouncementsAssigned": {
"type": "integer"
},
"numberOfEquipmentsAssigned": {
"type": "integer"
}
}
}
}Example:
[{
"id": "66C4ED770ADE40D2A33622743D54422A",
"instructionType": "1",
"status": "2",
"publishedDate": "2016-01-27T18:30:00.000+0000",
"instructionVersion": 1,
"numberOfAssignedModels": 1,
"lastChangeDateTime": "2016-01-27T21:09:40.000+0000",
"creationDateTime": "2016-01-27T21:09:40.000+0000",
"title": "InstructionForAPI_1",
"duration": "20 Minutes",
"activityDescription": "Modify",
"instructionStatusDescription": "Published",
"instructionTypeDescription": "Planned Maintenance",
"source": "DevDefault",
"subClass": "SUBCLASS_API_AIN_5",
"numberOfAnnouncementsAssigned": 0,
"numberOfEquipmentsAssigned": 0
}, {
"id": "55D5B30344C445539401EBE8F7433655",
"instructionType": "1",
"status": "2",
"publishedDate": "2016-01-26T18:30:00.000+0000",
"instructionVersion": 0,
"numberOfAssignedModels": 1,
"lastChangeDateTime": "2016-01-27T06:58:37.000+0000",
"creationDateTime": "2016-01-27T02:59:55.000+0000",
"title": "instruction24",
"duration": "20 Minutes",
"activityDescription": "Modify",
"instructionStatusDescription": "Published",
"instructionTypeDescription": "Planned Maintenance",
"source": "Ubuntu",
"subClass": "SUBCLASS_API_AIN_5",
"numberOfAnnouncementsAssigned": 0,
"numberOfEquipmentsAssigned": 0
}, {
"id": "24788DEA072D4D6C852E818D0B832297",
"instructionType": "1",
"status": "2",
"publishedDate": "2016-01-26T18:30:00.000+0000",
"instructionVersion": 0,
"numberOfAssignedModels": 1,
"lastChangeDateTime": "2016-01-26T23:21:51.000+0000",
"creationDateTime": "2016-01-26T23:21:51.000+0000",
"title": "instruction30",
"duration": "20 Minutes",
"activityDescription": "Modify",
"instructionStatusDescription": "Published",
"instructionTypeDescription": "Planned Maintenance",
"source": "DevDefault",
"subClass": "SUBCLASS_API_AIN_5",
"numberOfAnnouncementsAssigned": 0,
"numberOfEquipmentsAssigned": 0
}]HTTP status code 404
For invalid filter HTTP status 404 use to be came as response.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-4/schema",
"type": "object",
"additionalProperties": false,
"properties": {
"statusCode": {
"type": "integer"
},
"errorMessages": {
"type": "array",
"items": {
"severity": {
"type": "string",
"enum": [
"ERROR",
"SUCCESS",
"WARNING",
"INFO"
]
},
"errorMessage": {
"type": "string"
},
"repeatedEntities": {
"type": "array",
"items": {
"id": {
"type": "string"
},
"name": {
"type": "string"
}
}
},
"EntitiesNotFound": {
"type": "array",
"items": {
"id": {
"type": "string"
},
"name": {
"type": "string"
}
}
}
}
}
}
}Example:
{
"statusCode": 404,
"errorMessages": [
{
"severity": "ERROR",
"errorMessage": "HTTP 404 Not Found",
"repeatedEntities": [],
"EntitiesNotFound": []
}
]
}put /instructions
This API allows you to update and get the instruction of a specified ID.
REST API supports Basic Authentication
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-4/schema",
"type": "object",
"additionalProperties": false,
"properties": {
"instructionID": {
"type": "string",
"maxLength": 32
},
"instructionHeader": {
"instructionType": {
"type": "string",
"maxLength": 10
},
"internalID": {
"type": "string",
"description": "User specified Id. This would replace the 'title' field with the next release"
},
"subClass": {
"type": "string",
"maxLength": 32
},
"status": {
"type": "string"
},
"activityCode": {
"type": "string"
},
"title": {
"type": "string",
"description": "Name of instruction"
},
"instructionDescription": {
"type": "string"
},
"duration": {
"type": "number"
},
"durationUnit": {
"type": "string",
"maxLength": 1
},
"peopleRequired": {
"type": "integer"
},
"criticality": {
"type": "string"
},
"failureModeCode": {
"type": "array",
"items": {
"failureCode": {
"type": "string"
},
"updateDeleteFlag": {
"enum": ["u", "d"]
}
}
},
"documentIDList": {
"type": "array",
"items": {
"documentID": {
"type": "string",
"maxLength": 100
}
}
},
"vdsDocumentIDList": {
"type": "array",
"items": {
"documentID": {
"type": "string",
"maxLength": 100
}
}
},
"frequency": {
"type": "integer"
},
"frequencyUnit": {
"type": "string",
"maxLength": 1
}
},
"safetyRules": {
"type": "array",
"items": {
"ruleCode": {
"type": "string"
},
"updateDeleteFlag": {
"enum": ["u", "d"]
}
}
},
"preconditions": {
"type": "array",
"items": {
"preConditionID": {
"type": "string"
},
"preConditionDescription": {
"type": "string"
},
"updateDeleteFlag": {
"enum": ["u", "d"]
}
}
},
"steps": {
"type": "array",
"items": {
"stepID": {
"type": "string"
},
"stepName": {
"type": "string"
},
"stepDescription": {
"type": "string"
},
"riskCategory": {
"type": "string"
},
"documentID": {
"type": "string"
},
"peopleRequired": {
"type": "integer"
},
"roles": {
"type": "array",
"items": {
"roleCode": {
"type": "string"
},
"expectedWork": {
"type": "number"
},
"workUnit": {
"type": "string"
},
"updateDeleteFlag": {
"enum": ["u", "d"]
}
}
},
"tools": {
"type": "array",
"items": {
"toolID": {
"type": "string"
},
"toolName": {
"type": "integer"
},
"updateDeleteFlag": {
"enum": ["u", "d"]
}
}
},
"spareParts": {
"type": "array",
"items": {
"sparePartID": {
"type": "string"
},
"quantity": {
"type": "integer"
}
}
},
"documentIDList": {
"type": "array",
"items": {
"documentID": {
"type": "string",
"maxLength": 100
}
}
},
"assignUnAssignFlag": {
"enum": ["a", "ua"]
}
},
"postChecks": {
"type": "array",
"items": {
"postCheckID": {
"type": "string"
},
"postCheckDescription": {
"type": "string"
},
"updateDeleteFlag": {
"enum": ["u", "d"]
}
}
}
},
"modelIDs": {
"type": "array",
"items": {
"additionalProperties": false,
"properties": {
"modelID": {
"type": "string",
"maxLength": 32
},
"assignUnAssignFlag": {
"enum": ["a", "ua"]
}
}
}
},
"equipmentIDs": {
"type": "array",
"items": {
"additionalProperties": false,
"properties": {
"equipmentID": {
"type": "string",
"maxLength": 32
},
"assignUnAssignFlag": {
"enum": ["a", "ua"]
}
}
}
}
}
}Example:
{
"instructionID": "9D034629CBCB4DDE9EDD4FFEF04ED119",
"instructionHeader": {
"instructionType": "1",
"subClass": "2A408AF6FAC14EB2977DECE0FBF2B3F8",
"status": "2",
"internalID": "INS.pref.164",
"activityCode": "1",
"title": "InstructionForAPI_4",
"instructionDescription": "this is instruction for API example",
"duration": "20",
"durationUnit": "1",
"peopleRequired": 20,
"frequency": 9,
"frequencyUnit": "1",
"criticality": "1",
"documentIDList": [{
"documentID": "ZIHjgkzafrMNzouRkIDYj3MDHvzUKbE6jfXPDRVl3EA"
}]
},
"postChecks": [{
"postCheckDescription": "post check 1 "
}],
"preconditions": [{
"preConditionID": "AC974689267A4D03956507A3E65F6417",
"preConditionDescription": "pre condition1 is updated"
}],
"safetyRules": [{
"ruleCode": "3"
}],
"steps": [{
"stepID": "CD9B5E19980A4AA0A49437871D778BD9",
"stepName": "step is updated",
"stepDescription": "this is step1 description",
"riskCategory": "1",
"peopleRequired": 1,
"roles": [{
"roleCode": 1,
"workUnit": 1,
"expectedWork": "20"
}],
"spareParts": [{
"sparePartID": "5nbaXIDoWT04fbOdOkxMbIYgYFYUE555pl3nthylhVo",
"quantity": 10
}],
"tools": [{
"toolName": "tool1"
}],
"riskDescription": "risk category desciption",
"documentIDList": [{
"documentID": "aRIcaqgqfwYmNj3EksyRxYhccPD64UixDUIdUQYrMB4"
}],
"updateDeleteFlag": "u"
}],
"modelIDs": [{
"modelID": "F586C1042E23439DA226F5832F4C5AA1"
}],
"equipmentIDs": [{
"equipmentID": "9CBD94906757468C8763079D56E1C843"
}]
}HTTP status code 200
Sucessfully updates the details of the provivided Instructions and returns Instructions the updated details.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-4/schema",
"type": "object",
"additionalProperties": false,
"properties": {
"instructionID": {
"type": "string",
"maxLength": 32
},
"instructionHeader": {
"instructionType": {
"type": "string",
"maxLength": 10
},
"internalID": {
"type": "string",
"description": "User specified Id. This would replace the 'title' field with the next release"
},
"instructionTypeDescription": {
"type": "string",
"maxLength": 10
},
"instructionVersion": {
"type": "string",
"maxLength": 10
},
"subClass": {
"type": "string",
"maxLength": 32
},
"component": {
"type": "string"
},
"status": {
"type": "string"
},
"source": {
"type": "string"
},
"hasInactiveVersion": {
"type": "string"
},
"activityCode": {
"type": "string"
},
"activityDescription": {
"type": "string"
},
"title": {
"type": "string",
"description": "Name of instruction. We recommend you to use 'internalID' field instead of 'title' since 'title' would be deprecated with next release."
},
"instructionDescription": {
"type": "string"
},
"duration": {
"type": "integer"
},
"durationUnit": {
"type": "string",
"maxLength": 1
},
"durationUnitDescription": {
"type": "string"
},
"peopleRequired": {
"type": "integer"
},
"statusDescription": {
"type": "integer"
},
"criticality": {
"type": "string"
},
"criticalityDescription": {
"type": "string"
},
"revision": {
"type": "string"
},
"publishedDate": {
"type": "string"
},
"failureModeCode": {
"type": "array",
"items": {
"failureCode": {
"type": "string"
},
"updateDeleteFlag": {
"enum": ["u", "d"]
}
}
},
"documentIDList": {
"type": "array",
"items": {
"documentID": {
"type": "string",
"maxLength": 100
},
"assignUnAssignFlag": {
"enum": ["a", "ua"]
},
"title": {
"type": "string",
"maxLength": 128
},
"phaseCode": {
"type": "string",
"maxLength": 10
},
"categoryCode": {
"type": "string",
"maxLength": 10
},
"categoryCodeDescription": {
"type": "string"
},
"source": {
"type": "string",
"maxLength": 70
},
"mimeType": {
"type": "string",
"maxLength": 75
},
"description": {
"type": "string",
"maxLength": 75
},
"URL": {
"type": "string",
"maxLength": 256
},
"assignedTo": {
"type": "string",
"maxLength": 32
},
"fileSize": {
"type": "string"
},
"fileSizeUnit": {
"type": "string",
"maxLength": 10
},
"canHotSpot": {
"type": "string",
"maxLength": 10
},
"isHotSpotAttachment": {
"type": "string"
}
}
},
"vdsDocumentIDList": {
"type": "array",
"items": {
"documentID": {
"type": "string",
"maxLength": 100
},
"assignUnAssignFlag": {
"enum": ["a", "ua"]
},
"title": {
"type": "string",
"maxLength": 128
},
"phaseCode": {
"type": "string",
"maxLength": 10
},
"categoryCode": {
"type": "string",
"maxLength": 10
},
"categoryCodeDescription": {
"type": "string"
},
"source": {
"type": "string",
"maxLength": 70
},
"mimeType": {
"type": "string",
"maxLength": 75
},
"description": {
"type": "string",
"maxLength": 75
},
"URL": {
"type": "string",
"maxLength": 256
},
"assignedTo": {
"type": "string",
"maxLength": 32
},
"fileSize": {
"type": "string"
},
"fileSizeUnit": {
"type": "string",
"maxLength": 10
},
"canHotSpot": {
"type": "string",
"maxLength": 10
},
"isHotSpotAttachment": {
"type": "string"
}
}
},
"frequency": {
"type": "integer"
},
"frequencyUnit": {
"type": "string",
"maxLength": 1
},
"repitionDurationUnitDescription": {
"type": "string"
}
},
"safetyRules": {
"type": "array",
"items": {
"ruleCode": {
"type": "string"
},
"ruleDescription": {
"type": "string"
},
"source": {
"type": "string"
},
"sourceDescription": {
"type": "string"
},
"updateDeleteFlag": {
"enum": ["u", "d"]
}
}
},
"preconditions": {
"type": "array",
"items": {
"preConditionID": {
"type": "string"
},
"preConditionDescription": {
"type": "string"
},
"updateDeleteFlag": {
"enum": ["u", "d"]
}
}
},
"steps": {
"type": "array",
"items": {
"instructionName": {
"type": "string"
},
"stepID": {
"type": "string"
},
"stepName": {
"type": "string"
},
"stepDescription": {
"type": "string"
},
"imagePreview": {
"type": "string"
},
"riskCategory": {
"type": "string"
},
"riskDescription": {
"type": "string"
},
"sequence": {
"type": "integer"
},
"riskCategoryDescription": {
"type": "string"
},
"noOfAttachements": {
"type": "string"
},
"documentID": {
"type": "string"
},
"peopleRequired": {
"type": "integer"
},
"roles": {
"type": "array",
"items": {
"roleCode": {
"type": "string"
},
"expectedWork": {
"type": "integer"
},
"workUnit": {
"type": "string"
},
"workUnitDescription": {
"type": "string"
},
"roleDescription": {
"type": "string"
},
"updateDeleteFlag": {
"enum": ["u", "d"]
}
}
},
"tools": {
"type": "array",
"items": {
"toolID": {
"type": "string"
},
"toolName": {
"type": "integer"
},
"updateDeleteFlag": {
"enum": ["u", "d"]
}
}
},
"spareParts": {
"type": "array",
"items": {
"sparePartID": {
"type": "string"
},
"sparePartName": {
"type": "string"
},
"sparePartNumber": {
"type": "string"
},
"quantity": {
"type": "integer"
},
"manufacturer": {
"type": "string"
},
"manufacturerPartID": {
"type": "string"
},
"sparePartDescription": {
"type": "string"
},
"eanNumber": {
"type": "string"
},
"uom": {
"type": "string"
}
}
},
"documentIDList": {
"type": "array",
"items": {
"documentID": {
"type": "string",
"maxLength": 100
},
"assignUnAssignFlag": {
"enum": ["a", "ua"]
},
"title": {
"type": "string",
"maxLength": 128
},
"phaseCode": {
"type": "string",
"maxLength": 10
},
"categoryCode": {
"type": "string",
"maxLength": 10
},
"categoryCodeDescription": {
"type": "string"
},
"source": {
"type": "string",
"maxLength": 70
},
"mimeType": {
"type": "string",
"maxLength": 75
},
"description": {
"type": "string",
"maxLength": 75
},
"URL": {
"type": "string",
"maxLength": 256
},
"assignedTo": {
"type": "string",
"maxLength": 32
},
"fileSize": {
"type": "string"
},
"fileSizeUnit": {
"type": "string",
"maxLength": 10
},
"canHotSpot": {
"type": "string",
"maxLength": 10
},
"isHotSpotAttachment": {
"type": "string"
}
}
},
"updateDeleteFlag": {
"enum": ["u", "d"]
}
},
"postChecks": {
"type": "array",
"items": {
"postCheckID": {
"type": "string"
},
"postCheckDescription": {
"type": "string"
},
"updateDeleteFlag": {
"enum": ["u", "d"]
}
}
},
"modelIDs": {
"type": "array",
"items": {
"additionalProperties": false,
"properties": {
"modelID": {
"type": "string",
"maxLength": 32
},
"assignUnAssignFlag": {
"enum": ["a", "ua"]
}
}
}
},
"updateDeleteFlag": {
"enum": ["u", "d"]
}
}
}
}Example:
{
"instructionID": "9D034629CBCB4DDE9EDD4FFEF04ED119",
"instructionHeader": {
"instructionType": "1",
"instructionTypeDescription": "Planned Maintenance",
"instructionVersion": 1,
"subClass": "SUBCLASS_API_AIN_5",
"status": "2",
"internalID": "INS.pref.164",
"source": "DevDefault",
"hasInactiveVersion": "0",
"activityCode": "1",
"activityDescription": "Modify",
"title": "InstructionForAPI_4",
"instructionDescription": "this is instruction for API example",
"duration": 20,
"durationUnit": "1",
"durationUnitDescription": "Minutes",
"peopleRequired": 20,
"statusDescription": "Published",
"failureModeCode": [],
"criticality": "1",
"criticalityDescription": "Low",
"revision": "1.0",
"publishedDate": "2016-02-01",
"documentIDList": [],
"vdsDocumentIDList": [],
"frequency": 9,
"frequencyUnit": "1",
"repitionDurationUnitDescription": "Minutes"
},
"safetyRules": [{
"ruleCode": "3",
"ruleDescription": "Wear safety overalls"
}],
"preconditions": [{
"preConditionID": "7DB72F77C6FA46D9AE30C1C0CC3C7753",
"preConditionDescription": "pre condition1 is updated"
}],
"steps": [{
"stepID": "7E8023135134451F936BC34DA908AB8B",
"stepName": "step is updated",
"stepDescription": "this is step1 description",
"riskCategory": "1",
"riskDescription": "risk category desciption",
"riskCategoryDescription": "Low",
"noOfAttachements": "1",
"roles": [{
"roleCode": "1",
"expectedWork": 20,
"workUnit": "1",
"workUnitDescription": "Minutes",
"roleDescription": "Heavy Equipment Technician"
}],
"tools": [{
"toolName": "tool1"
}],
"spareParts": [{
"sparePartID": "5nbaXIDoWT04fbOdOkxMbIYgYFYUE555pl3nthylhVo",
"sparePartName": "111223-VAL_GDE:1",
"sparePartNumber": "",
"quantity": 10,
"manufacturer": "Siemens",
"manufacturerPartID": "SapLabs",
"sparePartDescription": "",
"eanNumber": "123456",
"uom": "12"
}],
"documentIDList": []
}],
"postChecks": [{
"postCheckID": "B7B1C7C77FB54E53A3A85B33D777912E",
"postCheckDescription": "post check 1 "
}],
"modelIDs": [{
"modelID": "F586C1042E23439DA226F5832F4C5AA1"
}],
"equipmentIDs": [{
"equipmentID": "9CBD94906757468C8763079D56E1C843"
}]
}HTTP status code 400
Validation error while updating Instructions.Check the error messages and provide valid inputs.The following example is showing error message for providing invalid instruction ID.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-4/schema",
"type": "object",
"additionalProperties": false,
"properties": {
"statusCode": {
"type": "integer"
},
"errorMessages": {
"type": "array",
"items": {
"errorMessage": {
"type": "string"
},
"repeatedEntities": {
"type": "array",
"items": {
"id": {
"type": "string"
},
"name": {
"type": "string"
}
}
},
"EntitiesNotFound": {
"type": "array",
"items": {
"id": {
"type": "string"
},
"name": {
"type": "string"
}
}
}
}
}
}
}Example:
{
"statusCode": 400,
"errorMessages": [
{
"errorMessage": "Please provide a valid instruction ID.",
"repeatedEntities": [],
"EntitiesNotFound": []
}
]
}HTTP status code 403
User is not authorized to execute this service.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-4/schema",
"type": "object",
"additionalProperties": false,
"properties": {
"statusCode": {
"type": "integer"
},
"errorMessages": {
"type": "array",
"items": {
"severity": {
"type": "string",
"enum": [
"ERROR",
"SUCCESS",
"WARNING",
"INFO"
]
},
"errorMessage": {
"type": "string"
},
"repeatedEntities": {
"type": "array",
"items": {
"id": {
"type": "string"
},
"name": {
"type": "string"
}
}
},
"EntitiesNotFound": {
"type": "array",
"items": {
"id": {
"type": "string"
},
"name": {
"type": "string"
}
}
}
}
}
}
}Example:
{
"statusCode": 403,
"errorMessages": {
"severity": "ERROR",
"errorMessage": "You are not authorized to access the application. Please contact your system administrator for further support.",
"repeatedEntities": [],
"EntitiesNotFound": []
}
}delete /instructions
Delete Instructions according to instruction IDs provided in payload.
REST API supports Basic Authentication
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-4/schema",
"type": "object",
"additionalProperties": false,
"properties": {
"instructionIDList": {
"type": "array",
"items": {
"additionalProperties": false,
"properties": {
"instructionID": {
"type": "string"
}
}
}
}
}
}Example:
{
"instructionIDList": [{
"instructionID": "9D034629CBCB4DDE9EDD4FFEF04ED119"
}]
}HTTP status code 204
NO CONTENT
HTTP status code 400
For invalid instruction IDs in request payload, it throws Bad Reqeust response with error message.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-4/schema",
"type": "object",
"additionalProperties": false,
"properties": {
"statusCode": {
"type": "integer"
},
"errorMessages": {
"type": "array",
"items": {
"errorMessage": {
"type": "string"
},
"repeatedEntities": {
"type": "array",
"items": {
"id": {
"type": "string"
},
"name": {
"type": "string"
}
}
},
"EntitiesNotFound": {
"type": "array",
"items": {
"id": {
"type": "string"
},
"name": {
"type": "string"
}
}
}
}
}
}
}Example:
{
"statusCode": 400,
"errorMessages": {
"errorMessage": "Please provide a valid instruction ID.",
"repeatedEntities": [],
"EntitiesNotFound": []
}
}HTTP status code 403
User is not authorized to execute this service.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-4/schema",
"type": "object",
"additionalProperties": false,
"properties": {
"statusCode": {
"type": "integer"
},
"errorMessages": {
"type": "array",
"items": {
"severity": {
"type": "string",
"enum": [
"ERROR",
"SUCCESS",
"WARNING",
"INFO"
]
},
"errorMessage": {
"type": "string"
},
"repeatedEntities": {
"type": "array",
"items": {
"id": {
"type": "string"
},
"name": {
"type": "string"
}
}
},
"EntitiesNotFound": {
"type": "array",
"items": {
"id": {
"type": "string"
},
"name": {
"type": "string"
}
}
}
}
}
}
}Example:
{
"statusCode": 403,
"errorMessages": {
"severity": "ERROR",
"errorMessage": "You are not authorized to access the application. Please contact your system administrator for further support.",
"repeatedEntities": [],
"EntitiesNotFound": []
}
}This endpoint allows you get number of instructions based on filter query parameters.
get /instructions/$count
This endpoint allows you get number of instructions based on filter query parameters.
REST API supports Basic Authentication
Query Parameters
- filter: (string)
Retrieves number of instructions based on the value provided. This parameter follows ODATA URL covention. For eg $filter=(substringof('Instruction', Name) eq true)
HTTP status code 200
Returns the number of instructions based on query parameters
Body
Type: application/json
Example:
141HTTP status code 404
Bad request, when trying to search using invalid uri
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-4/schema",
"type": "object",
"additionalProperties": false,
"properties": {
"statusCode": {
"type": "integer"
},
"errorMessages": {
"type": "array",
"items": {
"errorMessage": {
"type": "string"
},
"repeatedEntities": {
"type": "array",
"items": {
"id": {
"type": "string"
},
"name": {
"type": "string"
}
}
},
"EntitiesNotFound": {
"type": "array",
"items": {
"id": {
"type": "string"
},
"name": {
"type": "string"
}
}
}
}
}
}
}Example:
{
"statusCode": 404,
"errorMessages": [
{
"severity": "ERROR",
"errorMessage": "HTTP 404 Not Found",
"repeatedEntities": [],
"EntitiesNotFound": []
}
]
}This endpoint allows you to mass publish instructions.
put /instructions/publish
This endpoint allows you to mass publish instructions.
REST API supports Basic Authentication
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-4/schema",
"type": "object",
"additionalProperties": false,
"properties": {
"ids": {
"type": "array",
"items": {
"additionalProperties": false,
"properties": {
"id": {
"type": "string"
}
}
}
}
}
}
Example:
{
"ids":[
{
"id":"E2460F6AD8574F30A2687D3CC2CF33BA"
},
{
"id":"6ED1F7F4BAD74719B3E967DFC35DF9A6"
}
]
}HTTP status code 204
No Content
HTTP status code 400
Error message will be thorwn for invalid Instruction IDs.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-4/schema",
"type": "object",
"additionalProperties": false,
"properties": {
"statusCode": {
"type": "integer"
},
"errorMessages": {
"type": "array",
"items": {
"errorMessage": {
"type": "string"
},
"repeatedEntities": {
"type": "array",
"items": {
"id": {
"type": "string"
},
"name": {
"type": "string"
}
}
},
"EntitiesNotFound": {
"type": "array",
"items": {
"id": {
"type": "string"
},
"name": {
"type": "string"
}
}
}
}
}
}
}Example:
{
"statusCode": 400,
"errorMessages": [
{
"errorMessage": "Please provide a valid Instruction ID.",
"repeatedEntities": [],
"EntitiesNotFound": []
}
]
}
Get all enumerations associated with instructions
get /instructions/enumerations
Get all enumerations associated with instructions
REST API supports Basic Authentication
Query Parameters
- instructionType: (string)
Retrieves the enumerations associated with associated instruction types. For eg :instructionType = 1 retrieves the enumeartions associated with that instruction type.
HTTP status code 200
Search result based on query parameters
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-4/schema",
"type": "object",
"additionalProperties": false,
"properties": {
"type": {
"type": "string"
},
"code": {
"type": "string"
},
"description": {
"type": "string",
"maxLength": 5000
},
"languageISOCode": {
"type": "string",
"maxLength": 2
}
}
}Example:
{
"durationUnit": [{
"code": "3",
"description": "Days"
}, {
"code": "2",
"description": "Hours"
}, {
"code": "1",
"description": "Minutes"
}, {
"code": "5",
"description": "Months"
}, {
"code": "4",
"description": "Weeks"
}, {
"code": "6",
"description": "Years"
}],
"instructionStatus": [{
"code": "3",
"description": "In Revision"
}, {
"code": "2",
"description": "Published"
}, {
"code": "4",
"description": "Retired"
}, {
"code": "1",
"description": "Unpublished"
}],
"riskCategory": [{
"code": "3",
"description": "High"
}, {
"code": "1",
"description": "Low"
}, {
"code": "2",
"description": "Medium"
}]
}HTTP status code 400
Bad request, when trying to search using invalid endpoint
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-4/schema",
"type": "object",
"additionalProperties": false,
"properties": {
"statusCode": {
"type": "integer"
},
"errorMessages": {
"type": "array",
"items": {
"errorMessage": {
"type": "string"
},
"repeatedEntities": {
"type": "array",
"items": {
"id": {
"type": "string"
},
"name": {
"type": "string"
}
}
},
"EntitiesNotFound": {
"type": "array",
"items": {
"id": {
"type": "string"
},
"name": {
"type": "string"
}
}
}
}
}
}
}Example:
{
"statusCode": 400,
"errorMessages": [
{
"errorMessage": "Please provide a valid Instruction ID.",
"repeatedEntities": [],
"EntitiesNotFound": []
}
]
}
/instructions({instructionId})
Gets Instruction details for a given ID
get /instructions({instructionId})
Gets Instruction details for a given ID
REST API supports Basic Authentication
URI Parameters
- instructionId: required (string)
Query Parameters
- status: required (string)
Retrieve instruction based on the status provided. Possible values are - 1, 2 or 3 where 1 - Unpublished, 2 - Published and 3 - Inrevision.
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-4/schema",
"type": "object",
"additionalProperties": false,
"properties": {
"instructionID": {
"type": "string",
"maxLength": 32
},
"instructionHeader": {
"instructionType": {
"type": "string",
"maxLength": 10
},
"internalID": {
"type": "string",
"description": "User specified Id. This would replace the 'title' field with the next release"
},
"instructionTypeDescription": {
"type": "string",
"maxLength": 10
},
"instructionVersion": {
"type": "string",
"maxLength": 10
},
"subClass": {
"type": "string",
"maxLength": 32
},
"component": {
"type": "string"
},
"status": {
"type": "string"
},
"source": {
"type": "string"
},
"hasInactiveVersion": {
"type": "string"
},
"activityCode": {
"type": "string"
},
"activityDescription": {
"type": "string"
},
"title": {
"type": "string",
"description": "Name of instruction. We recommend you to use 'internalID' field instead of 'title' since 'title' would be deprecated with next release."
},
"instructionDescription": {
"type": "string"
},
"duration": {
"type": "integer"
},
"durationUnit": {
"type": "string",
"maxLength": 1
},
"durationUnitDescription": {
"type": "string"
},
"peopleRequired": {
"type": "integer"
},
"statusDescription": {
"type": "integer"
},
"criticality": {
"type": "string"
},
"criticalityDescription": {
"type": "string"
},
"revision": {
"type": "string"
},
"publishedDate": {
"type": "string"
},
"failureModeCode": {
"type": "array",
"items": {
"failureCode": {
"type": "string"
},
"updateDeleteFlag": {
"enum": ["u", "d"]
}
}
},
"documentIDList": {
"type": "array",
"items": {
"documentID": {
"type": "string",
"maxLength": 100
},
"assignUnAssignFlag": {
"enum": ["a", "ua"]
},
"title": {
"type": "string",
"maxLength": 128
},
"phaseCode": {
"type": "string",
"maxLength": 10
},
"categoryCode": {
"type": "string",
"maxLength": 10
},
"categoryCodeDescription": {
"type": "string"
},
"source": {
"type": "string",
"maxLength": 70
},
"mimeType": {
"type": "string",
"maxLength": 75
},
"description": {
"type": "string",
"maxLength": 75
},
"URL": {
"type": "string",
"maxLength": 256
},
"assignedTo": {
"type": "string",
"maxLength": 32
},
"fileSize": {
"type": "string"
},
"fileSizeUnit": {
"type": "string",
"maxLength": 10
},
"canHotSpot": {
"type": "string",
"maxLength": 10
},
"isHotSpotAttachment": {
"type": "string"
}
}
},
"vdsDocumentIDList": {
"type": "array",
"items": {
"documentID": {
"type": "string",
"maxLength": 100
},
"assignUnAssignFlag": {
"enum": ["a", "ua"]
},
"title": {
"type": "string",
"maxLength": 128
},
"phaseCode": {
"type": "string",
"maxLength": 10
},
"categoryCode": {
"type": "string",
"maxLength": 10
},
"categoryCodeDescription": {
"type": "string"
},
"source": {
"type": "string",
"maxLength": 70
},
"mimeType": {
"type": "string",
"maxLength": 75
},
"description": {
"type": "string",
"maxLength": 75
},
"URL": {
"type": "string",
"maxLength": 256
},
"assignedTo": {
"type": "string",
"maxLength": 32
},
"fileSize": {
"type": "string"
},
"fileSizeUnit": {
"type": "string",
"maxLength": 10
},
"canHotSpot": {
"type": "string",
"maxLength": 10
},
"isHotSpotAttachment": {
"type": "string"
}
}
},
"frequency": {
"type": "integer"
},
"frequencyUnit": {
"type": "string",
"maxLength": 1
},
"repitionDurationUnitDescription": {
"type": "string"
}
},
"safetyRules": {
"type": "array",
"items": {
"ruleCode": {
"type": "string"
},
"ruleDescription": {
"type": "string"
},
"source": {
"type": "string"
},
"sourceDescription": {
"type": "string"
},
"updateDeleteFlag": {
"enum": ["u", "d"]
}
}
},
"preconditions": {
"type": "array",
"items": {
"preConditionID": {
"type": "string"
},
"preConditionDescription": {
"type": "string"
},
"updateDeleteFlag": {
"enum": ["u", "d"]
}
}
},
"steps": {
"type": "array",
"items": {
"instructionName": {
"type": "string"
},
"stepID": {
"type": "string"
},
"stepName": {
"type": "string"
},
"stepDescription": {
"type": "string"
},
"imagePreview": {
"type": "string"
},
"riskCategory": {
"type": "string"
},
"riskDescription": {
"type": "string"
},
"sequence": {
"type": "integer"
},
"riskCategoryDescription": {
"type": "string"
},
"noOfAttachements": {
"type": "string"
},
"documentID": {
"type": "string"
},
"peopleRequired": {
"type": "integer"
},
"roles": {
"type": "array",
"items": {
"roleCode": {
"type": "string"
},
"expectedWork": {
"type": "integer"
},
"workUnit": {
"type": "string"
},
"workUnitDescription": {
"type": "string"
},
"roleDescription": {
"type": "string"
},
"updateDeleteFlag": {
"enum": ["u", "d"]
}
}
},
"tools": {
"type": "array",
"items": {
"toolID": {
"type": "string"
},
"toolName": {
"type": "integer"
},
"updateDeleteFlag": {
"enum": ["u", "d"]
}
}
},
"spareParts": {
"type": "array",
"items": {
"sparePartID": {
"type": "string"
},
"sparePartName": {
"type": "string"
},
"sparePartNumber": {
"type": "string"
},
"quantity": {
"type": "integer"
},
"manufacturer": {
"type": "string"
},
"manufacturerPartID": {
"type": "string"
},
"sparePartDescription": {
"type": "string"
},
"eanNumber": {
"type": "string"
},
"uom": {
"type": "string"
}
}
},
"documentIDList": {
"type": "array",
"items": {
"documentID": {
"type": "string",
"maxLength": 100
},
"assignUnAssignFlag": {
"enum": ["a", "ua"]
},
"title": {
"type": "string",
"maxLength": 128
},
"phaseCode": {
"type": "string",
"maxLength": 10
},
"categoryCode": {
"type": "string",
"maxLength": 10
},
"categoryCodeDescription": {
"type": "string"
},
"source": {
"type": "string",
"maxLength": 70
},
"mimeType": {
"type": "string",
"maxLength": 75
},
"description": {
"type": "string",
"maxLength": 75
},
"URL": {
"type": "string",
"maxLength": 256
},
"assignedTo": {
"type": "string",
"maxLength": 32
},
"fileSize": {
"type": "string"
},
"fileSizeUnit": {
"type": "string",
"maxLength": 10
},
"canHotSpot": {
"type": "string",
"maxLength": 10
},
"isHotSpotAttachment": {
"type": "string"
}
}
},
"updateDeleteFlag": {
"enum": ["u", "d"]
}
},
"postChecks": {
"type": "array",
"items": {
"postCheckID": {
"type": "string"
},
"postCheckDescription": {
"type": "string"
},
"updateDeleteFlag": {
"enum": ["u", "d"]
}
}
},
"modelIDs": {
"type": "array",
"items": {
"additionalProperties": false,
"properties": {
"modelID": {
"type": "string",
"maxLength": 32
},
"assignUnAssignFlag": {
"enum": ["a", "ua"]
}
}
}
},
"updateDeleteFlag": {
"enum": ["u", "d"]
}
}
}
}Example:
{
"instructionID": "9D034629CBCB4DDE9EDD4FFEF04ED119",
"instructionHeader": {
"instructionType": "1",
"instructionTypeDescription": "Planned Maintenance",
"instructionVersion": 1,
"internalID": "INS.pref.164",
"subClass": "SUBCLASS_API_AIN_5",
"status": "2",
"source": "DevDefault",
"hasInactiveVersion": "0",
"activityCode": "1",
"activityDescription": "Modify",
"title": "InstructionForAPI_4",
"instructionDescription": "this is instruction for API example",
"duration": 20,
"durationUnit": "1",
"durationUnitDescription": "Minutes",
"peopleRequired": 20,
"statusDescription": "Published",
"failureModeCode": [],
"criticality": "1",
"criticalityDescription": "Low",
"revision": "1.0",
"publishedDate": "2016-02-01",
"documentIDList": [],
"vdsDocumentIDList": [],
"frequency": 9,
"frequencyUnit": "1",
"repitionDurationUnitDescription": "Minutes",
"isWarrantyRelevant":"0"
},
"safetyRules": [
{
"ruleCode": "3",
"ruleDescription": "Wear safety overalls"
}
],
"preconditions": [
{
"preConditionID": "7DB72F77C6FA46D9AE30C1C0CC3C7753",
"preConditionDescription": "pre condition1 is updated"
}
],
"steps": [
{
"stepID": "7E8023135134451F936BC34DA908AB8B",
"stepName": "step is updated",
"stepDescription": "this is step1 description",
"riskCategory": "1",
"riskDescription": "risk category desciption",
"riskCategoryDescription": "Low",
"noOfAttachements": "1",
"roles": [
{
"roleCode": "1",
"expectedWork": 20,
"workUnit": "1",
"workUnitDescription": "Minutes",
"roleDescription": "Heavy Equipment Technician"
}
],
"tools": [
{
"toolName": "tool1"
}
],
"spareParts": [
{
"sparePartID": "5nbaXIDoWT04fbOdOkxMbIYgYFYUE555pl3nthylhVo",
"sparePartName": "111223-VAL_GDE:1",
"sparePartNumber": "",
"quantity": 10,
"manufacturer": "Siemens",
"manufacturerPartID": "SapLabs",
"sparePartDescription": "",
"eanNumber": "123456",
"uom": "12"
}
],
"documentIDList": []
}
],
"postChecks": [
{
"postCheckID": "B7B1C7C77FB54E53A3A85B33D777912E",
"postCheckDescription": "post check 1 "
}
],
"modelIDs": [
{
"modelID": "F586C1042E23439DA226F5832F4C5AA1"
}
]
}HTTP status code 400
NOT FOUND
Get all announcements assigned to a particular instruction
get /instructions({instructionId})/announcements
Get all announcements assigned to a particular instruction
REST API supports Basic Authentication
URI Parameters
- instructionId: required (string)
HTTP status code 200
Search result based on query parameters
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-4/schema",
"type": "object",
"additionalProperties": false,
"properties": {
"announcementID": {
"type": "string",
"maxLength": 32
},
"annoucementName": {
"type": "string",
"maxLength": 255,
"description": "Name of announcement. We recommend you to use 'internalId' field instead of 'name' since 'name' would be deprecated with next release."
},
"internalId": {
"type": "string",
"maxLength": 255,
"description": "User specified Id. This would replace the 'name' field with the next release"
},
"annoucementDescription": {
"type": "string",
"maxLength": 5000
},
"languageISOCode": {
"type": "string",
"maxLength": 2
},
"announcementTypeCode": {
"type": "string",
"maxLength": 4
},
"announcementTypeCodeDescription": {
"type": "string"
},
"revision": {
"type": "string"
},
"announcementVersion": {
"type": "string"
},
"hasInactiveVersion": {
"type": "string"
},
"priorityCode": {
"type": "string",
"maxLength": 10
},
"priorityCodeDescription": {
"type": "string"
},
"source": {
"type": "string"
},
"publishedDate": {
"type": "string"
},
"statusCode": {
"type": "string"
},
"statusCodeDescription": {
"type": "string"
},
"isMarkedForDeletion": {
"type": "string",
"maxLength": 1
}
}
}Example:
[{
"announcementID": "42CD776799C544F5A22814B5835CA629",
"annoucementName": "this is ann",
"internalId": "A.TEDX.546",
"annoucementDescription": "descriptiom",
"languageISOCode": "en",
"announcementTypeCode": "1",
"announcementTypeCodeDescription": "Instruction Change",
"announcementVersion": "0.0",
"priorityCode": "2",
"priorityCodeDescription": "Medium",
"source": "GEUbur",
"statusCode": "2",
"statusCodeDescription": "Published"
}, {
"announcementID": "13377A08B64540EDAB5C80C441059CAF",
"annoucementName": "this will be the announcement",
"internalId": "A.TEDX.550",
"annoucementDescription": "this is announcement description",
"languageISOCode": "en",
"announcementTypeCode": "1",
"announcementTypeCodeDescription": "Instruction Change",
"announcementVersion": "0.0",
"priorityCode": "3",
"priorityCodeDescription": "High",
"source": "GEUbur",
"statusCode": "2",
"statusCodeDescription": "Published"
}]HTTP status code 400
Bad request, when trying to search using invalid InstructionID
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-4/schema",
"type": "object",
"additionalProperties": false,
"properties": {
"statusCode": {
"type": "integer"
},
"errorMessages": {
"type": "array",
"items": {
"errorMessage": {
"type": "string"
},
"repeatedEntities": {
"type": "array",
"items": {
"id": {
"type": "string"
},
"name": {
"type": "string"
}
}
},
"EntitiesNotFound": {
"type": "array",
"items": {
"id": {
"type": "string"
},
"name": {
"type": "string"
}
}
}
}
}
}
}Example:
{
"statusCode": 400,
"errorMessages": [
{
"errorMessage": "Please provide a valid Instruction ID.",
"repeatedEntities": [],
"EntitiesNotFound": []
}
]
}
This endpoint allows you to get all models that are assigned to a particular instruction
get /instructions({instructionId})/models
This endpoint allows you to get all models that are assigned to a particular instruction
REST API supports Basic Authentication
URI Parameters
- instructionId: required (string)
HTTP status code 200
Search result based on query parameters
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-4/schema",
"type": "array",
"additionalProperties": false,
"properties": {
"items": {
"additionalProperties": false,
"properties": {
"modelID": {
"type": "string",
"maxLength": 32
},
"modelName": {
"type": "string",
"description": "Name of model. We recommend you to use 'internalId' field instead of 'modelName' since 'modelName' would be deprecated with next release."
},
"internalId": {
"type": "string",
"maxLength": 32,
"description": "User specified Id. This would replace the 'modelName' field with the next release"
},
"modelClass": {
"type": "string"
},
"modelSubClass": {
"type": "string"
},
"modelType": {
"type": "string"
},
"modelVersion": {
"type": "string"
},
"categoryID": {
"type": "string"
},
"modelGeneration": {
"type": "string"
},
"status": {
"type": "string"
},
"source": {
"type": "string"
},
"manufacturer": {
"type": "string"
},
"imageURL": {
"type": "string"
},
"languageISOCode": {
"type": "string"
},
"modelShortDescription": {
"type": "string"
}
}
}
}
}Example:
[{
"modelID": "0B54723B8A204CB7B13DF01F648782B1",
"modelName": "SAN_DEV_MODEL_HEADER",
"internalId": "SAN_DEV_MODEL_HEADER",
"modelClass": "SAN_DEV_TEMPLATE_CLASS",
"modelSubClass": "SAN_DEV_TEMPLATE_SUBCLASS",
"modelType": "SAN_DEV_TEMPLATE_SUBCLASS",
"modelVersion": "2.0",
"categoryID": "6FC8E4AB7BA743BF945188B7DD4FA609",
"modelGeneration": "3",
"status": "2",
"source": "GEUbur",
"manufacturer": "GEUbur",
"imageURL": "ZM45ulFIepCf_B4HrN8bED4n5AQRQ2z1n_NMzBE_0S4",
"languageISOCode": "en",
"modelShortDescription": "shortDescription"
}, {
"modelID": "AA68BCB7D9444928AA71238FF663353A",
"modelName": "testforbug1",
"internalId": "testforbug1",
"modelClass": "Combustion_Engines",
"modelSubClass": "Diesel_Engine ",
"modelType": "Diesel_Engine ",
"modelVersion": "0.0",
"categoryID": "F4E6535A5EA8496499C99B11CD2992BF",
"modelGeneration": "",
"status": "2",
"source": "GEUbur",
"manufacturer": "AINDEV",
"imageURL": "",
"languageISOCode": "en",
"modelShortDescription": "shortDescription"
}, {
"modelID": "0D2DF2FF85BF437AA85FC7D389B22BDA",
"modelName": "Newmodel",
"internalId": "Newmodel",
"modelClass": "Combustion_Engines",
"modelSubClass": "Diesel_Engine ",
"modelType": "Diesel_Engine ",
"modelVersion": "0.0",
"categoryID": "8D268FEEF9104469B2BCE6D667812178",
"status": "2",
"source": "GEUbur",
"manufacturer": "DevDefault",
"languageISOCode": "en",
"modelShortDescription": "shortDescription"
}]HTTP status code 400
Bad request, when trying to search using invalid InstructionID
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-4/schema",
"type": "object",
"additionalProperties": false,
"properties": {
"statusCode": {
"type": "integer"
},
"errorMessages": {
"type": "array",
"items": {
"errorMessage": {
"type": "string"
},
"repeatedEntities": {
"type": "array",
"items": {
"id": {
"type": "string"
},
"name": {
"type": "string"
}
}
},
"EntitiesNotFound": {
"type": "array",
"items": {
"id": {
"type": "string"
},
"name": {
"type": "string"
}
}
}
}
}
}
}Example:
{
"statusCode": 400,
"errorMessages": [
{
"errorMessage": "Please provide a valid Instruction ID.",
"repeatedEntities": [],
"EntitiesNotFound": []
}
]
}
This endpoint allows you to get all equipments that are assigned to a particular instruction
get /instructions({instructionId})/equipments
This endpoint allows you to get all equipments that are assigned to a particular instruction
REST API supports Basic Authentication
URI Parameters
- instructionId: required (string)
HTTP status code 200
Search result based on query parameters
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-4/schema",
"type": "object",
"additionalProperties": false,
"properties": {
"equipmentID": {
"type": "string"
},
"equipmentName": {
"type": "string",
"description": "Name of equipment. We recommend you to use 'internalId' field instead of 'equipmentName' since 'equipmentName' would be deprecated with next release."
},
"internalId": {
"type": "string",
"description": "User specified Id. This would replace the 'equipmentName' field with the next release"
},
"equipmentVersion": {
"type": "string"
},
"status": {
"type": "string"
},
"equipmentStatusDescription": {
"type": "string"
},
"source": {
"type": "string"
},
"manufacturer": {
"type": "string"
},
"templateID": {
"type": "string"
},
"modelID": {
"type": "string"
},
"modelVersion": {
"type": "string"
},
"modelStatus": {
"type": "string"
}
}
}Example:
[{
"equipmentID": "8B557CAE69C347F4AD0CB981F1DFF95E",
"equipmentName": "Equipment6",
"internalId": "Equipment6",
"equipmentVersion": "0.0",
"status": "2",
"equipmentStatusDescription": "Published",
"source": "Ubuntu",
"manufacturer": "AINDEV",
"templateID": "4DD637388DEE4D1F962F7BE256D729C1",
"modelID": "695102D29F074608A8D2748AFA82500C",
"modelVersion": "0.0",
"modelStatus": "2"
}]HTTP status code 400
Bad request, when trying to search using invalid InstructionID
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-4/schema",
"type": "object",
"additionalProperties": false,
"properties": {
"statusCode": {
"type": "integer"
},
"errorMessages": {
"type": "array",
"items": {
"errorMessage": {
"type": "string"
},
"repeatedEntities": {
"type": "array",
"items": {
"id": {
"type": "string"
},
"name": {
"type": "string"
}
}
},
"EntitiesNotFound": {
"type": "array",
"items": {
"id": {
"type": "string"
},
"name": {
"type": "string"
}
}
}
}
}
}
}Example:
{
"statusCode": 400,
"errorMessages": [
{
"errorMessage": "Please provide a valid Instruction ID.",
"repeatedEntities": [],
"EntitiesNotFound": []
}
]
}
/instructions/models
This endpoint allows you to assign multiple models to multiple instructions
post /instructions/models/assign
This endpoint allows you to assign multiple models to multiple instructions
REST API supports Basic Authentication
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-4/schema",
"type": "object",
"additionalProperties": false,
"properties": {
"instructionModelIDList": {
"type": "array",
"items": {
"additionalProperties": false,
"properties": {
"instructionID": {
"type": "string",
"maxLength": 32
},
"modelID": {
"type": "string",
"maxLength": 32
}
}
}
}
}
}Example:
{
"instructionModelIDList": [{
"instructionID": "91F1ED78D1004098AE3D851D53EB95C8",
"modelID": "68119601D6C8471C99009A179A69475A"
}]
}HTTP status code 204
No Content
HTTP status code 400
Bad request, when trying to search using invalid InstructionID
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-4/schema",
"type": "object",
"additionalProperties": false,
"properties": {
"statusCode": {
"type": "integer"
},
"errorMessages": {
"type": "array",
"items": {
"errorMessage": {
"type": "string"
},
"repeatedEntities": {
"type": "array",
"items": {
"id": {
"type": "string"
},
"name": {
"type": "string"
}
}
},
"EntitiesNotFound": {
"type": "array",
"items": {
"id": {
"type": "string"
},
"name": {
"type": "string"
}
}
}
}
}
}
}Example:
{
"statusCode": 400,
"errorMessages": [
{
"errorMessage": "Please provide a valid Instruction ID.",
"repeatedEntities": [],
"EntitiesNotFound": []
}
]
}
/instructions/equipments
This endpoint allows you to assign multiple equipments to multiple instructions
post /instructions/equipments/assign
This endpoint allows you to assign multiple equipments to multiple instructions
REST API supports Basic Authentication
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-4/schema",
"type": "object",
"additionalProperties": false,
"properties": {
"instructionEquipmentIDList": {
"type": "array",
"items": {
"additionalProperties": false,
"properties": {
"instructionID": {
"type": "string",
"maxLength": 32
},
"equipmentID": {
"type": "string",
"maxLength": 32
}
}
}
}
}
}Example:
{
"instructionEquipmentIDList": [{
"instructionID": "91F1ED78D1004098AE3D851D53EB95C8",
"equipmentID": "E0EDDBBCCD644DEEA7CD2303930D3F89"
}]
}