Models API documentation version v1
Application_URL/services/api/v1
About Model
Model is an instance of a template which is used create equipment. A model consists of model header and model details.The model header stores basic information like Template, Status, Generation and Manufacturer to name a few.
Purpose
This API allows you to create, update, retrieve, delete a model and get announcements, instructions and documents assigned to a Model using Model ID.
/models
This endpoint allows you to post a model.
This endpoint allows you to search for model based on filter query parameter.
post /models
This endpoint allows you to post a model.
REST API supports Basic Authentication
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"javaType": "com.sap.iot.ain.gen.model.ModelHeader",
"type": "object",
"properties": {
"internalId": {
"type": "string",
"maxLength": 255,
"description": "User specified Id. This replaces the 'name' field in the next release."
},
"name": {
"type": "string",
"maxLength": 255,
"description": "Name of model. We recommend you to use 'internalId' field instead of 'name' since 'name' would be deprecated with next release."
},
"templateId": {
"type": "string",
"maxLength": 32,
"description": "Template to which model belongs to."
},
"organizationID": {
"type": "string",
"maxLength": 32,
"description": "Business partner ID of model manufacturer. Use the /organizations or /organizations/byrole API to get the ID for the manufacturer."
},
"generation": {
"type": "string",
"maxLength": 255
},
"releaseDate": {
"type": "string",
"format": "YYYY-MM-DD",
"description": "Release date as string format : YYYY-MM-DD"
},
"serviceExpirationDate": {
"type": "string",
"format": "YYYY-MM-DD",
"description": "Service expiration date as string format : YYYY-MM-DD"
},
"calibrationDate": {
"type": "string",
"format": "YYYY-MM-DD",
"description": "Calibration date as string format : YYYY-MM-DD"
},
"orderStopDate": {
"type": "string",
"format": "YYYY-MM-DD",
"description": "Order stop date as string format : YYYY-MM-DD"
},
"noSparePartsDate": {
"type": "string",
"format": "YYYY-MM-DD",
"description": "No spare part date as string format : YYYY-MM-DD"
},
"globalId": {
"type": "string",
"maxLength": 50
},
"safetyRiskCode": {
"type": "string",
"enum": [
"1",
"2",
"3",
"4"
],
"description": "The safety risk enum value. 1 - Minor, 2 - Moderate, 3 - Severe and 4 - Catastrophic. Use /enumeration API with the type as 'EquipmentSafetyRisk' to get the enumeration."
},
"image": {
"type": "string",
"maxLength": 100,
"description": "This is the documentid of the image/logo which you get from the document upload service."
},
"description": {
"type": "object",
"properties": {
"short": {
"type": "string",
"maxLength": 255,
"description": "Short description"
},
"long": {
"type": "string",
"maxLength": 5000,
"description": "Long description"
}
},
"required": ["short"]
},
"equipmentTracking": {
"type": "string",
"enum": [
"1",
"2",
"3"
],
"description": "The equipment tracking enum value. 1 - Serial Number Tracking at Model Level, 2 - Serial Number Tracking at Manufacturer Level and 3 - Batch Number Tracking at Batch Level. Use /enumeration API with the type as 'EquipmentTracking' to get the enumeration."
}
},
"required": ["internalId", "templateId", "organizationID", "description", "equipmentTracking"]
}Example:
{
"internalId": "Sub Sea Pump",
"templateId": "576E537B623F4D06ADC9DAA0C3E22680",
"organizationID": "B7A4D0C253294D5D93E881123B2B9B4F",
"generation": "1",
"releaseDate": "2016-05-02",
"serviceExpirationDate": "2016-05-27",
"calibrationDate": "2016-05-27",
"orderStopDate": "2016-05-27",
"noSparePartsDate": "2016-05-27",
"globalId": "1",
"image": "UJ2VRTz_ASgIuIGzmtsgwHYtoPKkGkSBgF9oE-lKVxc",
"safetyRiskCode": "1",
"description": {
"language": "en",
"short": "Sub Sea Pump",
"long": "desc"
},
"equipmentTracking": "1"
}HTTP status code 200
Successfully creates a model
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"javaType": "com.sap.iot.ain.gen.model.ModelHeader",
"type": "object",
"properties": {
"modelId": {
"type": "string",
"maxLength": 32,
"description": "Model ID. Generated by server, used as read-only."
},
"name": {
"type": "string",
"maxLength": 255,
"description": "Name of model"
},
"templateId": {
"type": "string",
"maxLength": 32,
"description": "Template to which model belongs to"
},
"completeness": {
"type": "integer"
},
"class": {
"type": "string",
"maxLength": 255,
"description": "Name of the Class template"
},
"subclass": {
"type": "string",
"maxLength": 255,
"description": "Name of the Subclass template"
},
"modelTemplate": {
"type": "string",
"maxLength": 255,
"description": "Name of the Model template"
},
"adminData": {
"type": "object",
"properties": {
"createdBy": {
"type": "string"
},
"createdOn": {
"type": "string",
"format": "YYYY-MM-DD"
},
"changedBy": {
"type": "string"
},
"changedOn": {
"type": "string",
"format": "YYYY-MM-DD"
}
}
},
"hasInRevision": {
"type": "boolean",
"description": "The flag denotes is there a draft version of the model exists or not. Possible values are : 'true' - draft version exists, 'false' - draft version does not exists."
},
"status": {
"type": "string",
"enum": [
"1",
"2",
"3"
],
"description": "The revision status of the model. Possible values are: 1 - Unpublished, 2 - Published and 3 - In-revision."
},
"version": {
"type": "double",
"description": "Version of the model"
},
"publishedOn": {
"type": "string",
"description": "Published On date as string format : YYYY-MM-DD"
},
"sectionCompleteness": {
"type": "object",
"additionalProperties": false,
"properties": {
"headerPercentage": {
"type": "double",
"description": "The completeness of header section of the model."
},
"attachmentPercentage": {
"type": "double",
"description": "The completeness of attachments section of the model."
},
"instructionPercentage": {
"type": "double",
"description": "The completeness of instructions section of the model."
},
"valuePercentage": {
"type": "double",
"description": "The completeness of model attributes section."
}
}
},
"manufacturer": {
"type": "string",
"maxLength": 255,
"description": "Name of the model manufacturer"
},
"isManufacturerValid": {
"type": "boolean",
"description": "The flag denotes is manufacturer is active on the AIN network or not. Possible values: 'true' - Active, 'false' - Inactive"
},
"organizationID": {
"type": "string",
"maxLength": 32,
"description": "The business partner ID of model manufacturer"
},
"generation": {
"type": "string",
"maxLength": 255
},
"releaseDate": {
"type": "string",
"format": "YYYY-MM-DD",
"description": "Release date as string format : YYYY-MM-DD"
},
"serviceExpirationDate": {
"type": "string",
"format": "YYYY-MM-DD",
"description": "Service expiration date as string format : YYYY-MM-DD"
},
"calibrationDate": {
"type": "string",
"format": "YYYY-MM-DD",
"description": "Calibration date as string format : YYYY-MM-DD"
},
"orderStopDate": {
"type": "string",
"format": "YYYY-MM-DD",
"description": "Order stop date as string format : YYYY-MM-DD"
},
"noSparePartsDate": {
"type": "string",
"format": "YYYY-MM-DD",
"description": "No spare part date as string format : YYYY-MM-DD"
},
"globalId": {
"type": "string",
"maxLength": 50
},
"safetyRiskCode": {
"type": "string",
"maxLength": 10,
"description": "The safety risk enum value. 1 - Minor, 2 - Moderate, 3 - Severe and 4 - Catastrophic."
},
"image": {
"type": "string",
"maxLength": 100,
"description": "This is the documentid of the image/logo which you get from the document upload service."
},
"description": {
"type": "object",
"properties": {
"language": {
"type": "string",
"maxLength": 32,
"description": "Language in which description is present."
},
"short": {
"type": "string",
"maxLength": 255,
"description": "Short description"
},
"long": {
"type": "string",
"maxLength": 5000,
"description": "Long description"
}
}
},
"equipmentTracking": {
"type": "string",
"enum": [
"1",
"2",
"3"
],
"description": "The equipment tracking enum value. 1 - Serial Number Tracking at Model Level, 2 - Serial Number Tracking at Manufacturer Level and 3 - Batch Number Tracking at Batch Level"
}
}
}Example:
{
"organizationID": "B7A4D0C253294D5D93E881123B2B9B4F",
"generation": "1",
"releaseDate": "2016-05-02",
"serviceExpirationDate": "2016-05-27",
"calibrationDate": "2016-05-27",
"orderStopDate": "2016-05-27",
"noSparePartsDate": "2016-05-27",
"globalId": "1",
"image": "UJ2VRTz_ASgIuIGzmtsgwHYtoPKkGkSBgF9oE-lKVxc",
"safetyRiskCode": "1",
"description": {
"language": "en",
"short": "Sub Sea Pump",
"long": "desc"
},
"equipmentTracking": "1",
"modelId": "08C09303B95D4F8D8DCC98AC7089CB3F",
"name": "Sub Sea Pump",
"internalId": "Sub Sea Pump",
"templateId": "576E537B623F4D06ADC9DAA0C3E22680",
"completeness": 83,
"class": "Pump Class",
"subclass": "Pump Subclass",
"modelTemplate": "Pump Model Template",
"adminData": {
"createdBy": "1615CE8762EC4C81808B863E7EECD95A",
"createdOn": "2016-05-17",
"changedBy": "9149C46CB9F94A218CB3A8782E69873F",
"changedOn": "2016-05-17"
},
"hasInRevision": false,
"status": "2",
"version": 8.0,
"publishedOn": "2016-05-17",
"sectionCompleteness": {
"headerPercentage": 100.0,
"attachmentPercentage": 42.0,
"modelValuePercentage": 100.0,
"instructionPercentage": 100.0
},
"manufacturer": "KSB",
"isManufacturerValid": false
}get /models
This endpoint allows you to search for model based on filter query parameter.
REST API supports Basic Authentication
Query Parameters
- $filter: (string)
Retrieve models based on the value provided. This parameter follows ODATA URL covention. For eg $filter=(substringof('CombustionEngine', Name) eq true)
- $top: (string)
Number of models from top in the list. This parameter follows ODATA URL covention. You must use this query parameter with $skip, $top alone will not work. For eg $top=10.
- $skip: (string)
Number of models to be skipped in the list. This parameter follows ODATA URL covention. You must use this query parameter with $top, $top alone will not work. For eg $skip=20
- $orderby: (string)
Order the list of models based on the fields. This parameter follows ODATA URL covention. For eg $orderby=internalId asc
HTTP status code 200
Search result based on query parameters
Body
Type: application/json
Example:
[{
"modelId": "3491FD57C1344F8A80FA085A271E5DDD",
"name": "Pump Model",
"status": "2",
"version": 0.0,
"hasInRevision": "1",
"templateId": "8C8AA68CD8D64E52A60EBE840946E9D9",
"modelTemplate": "Pump Model Template",
"subclass": "Pump Subclass",
"generation": 1,
"manufacturer": "E&H",
"shortDescription": "This is a model",
"longDescription": "This is a model",
"completeness": 8.0,
"createdOn": "2016-05-26",
"changedOn": "2016-05-26",
"imageURL": "Ou0hibM2xkZ1tTD6pvTsEYH2kinRsGMpeK_yHcfZ1F8",
"publishedOn": "2016-05-26",
"source": "E&H",
"equipmentTracking": "1",
"serviceExpirationDate": "2017-01-01",
"modelExpirationDate": "2017-01-01",
"releaseDate": "2016-01-01",
"isManufacturerValid": "true",
"class": "Pump Class",
"image": null,
"isClientValid": "true",
"consume": "1"
}, {
"modelId": "3491FD57C1344F8A80FA085A271E5DDD",
"name": "Pump Model",
"status": "2",
"version": 0.0,
"hasInRevision": "1",
"templateId": "8C8AA68CD8D64E52A60EBE840946E9D9",
"modelTemplate": "Pump Model Template",
"subclass": "Pump Subclass",
"generation": 1,
"manufacturer": "E&H",
"shortDescription": "This is a model",
"longDescription": "This is a model",
"completeness": 8.0,
"createdOn": "2016-05-26",
"changedOn": "2016-05-26",
"imageURL": "Ou0hibM2xkZ1tTD6pvTsEYH2kinRsGMpeK_yHcfZ1F8",
"publishedOn": "2016-05-26",
"source": "E&H",
"equipmentTracking": "1",
"serviceExpirationDate": "2017-01-01",
"modelExpirationDate": "2017-01-01",
"releaseDate": "2016-01-01",
"isManufacturerValid": "true",
"class": "Pump Class",
"image": null,
"isClientValid": "true",
"consume": "0"
}, {
"modelId": "3491FD57C1344F8A80FA085A271E5DDD",
"name": "Pump Model",
"status": "2",
"version": 0.0,
"hasInRevision": "1",
"templateId": "8C8AA68CD8D64E52A60EBE840946E9D9",
"modelTemplate": "Pump Model Template",
"subclass": "Pump Subclass",
"generation": 1,
"manufacturer": "E&H",
"shortDescription": "This is a model",
"longDescription": "This is a model",
"completeness": 8.0,
"createdOn": "2016-05-26",
"changedOn": "2016-05-26",
"imageURL": "Ou0hibM2xkZ1tTD6pvTsEYH2kinRsGMpeK_yHcfZ1F8",
"publishedOn": "2016-05-26",
"source": "E&H",
"equipmentTracking": "1",
"serviceExpirationDate": "2017-01-01",
"modelExpirationDate": "2017-01-01",
"releaseDate": "2016-01-01",
"isManufacturerValid": "true",
"class": "Pump Class",
"image": null,
"isClientValid": "true",
"consume": "1"
}]HTTP status code 400
The request could not be understood by the server due to malformed syntax.You SHOULD NOT repeat the request without modifications.
Body
Type: application/json
Schema:
{
"statusCode": { "type": "integer" },
"errorMessage": { "type": "string" }
}Example:
{
"statusCode": 400,
"errorMessage": "No property "Desc" exists "
}This endpoint allows you to get count of model based on filter query
get /models/$count
This endpoint allows you to get count of model based on filter query
REST API supports Basic Authentication
Query Parameters
- $filter: (string)
Retrieve number of models based on the value provided. This parameter follows ODATA URL covention. For eg $filter=(substringof('CombustionEngine', Name) eq true)
HTTP status code 200
Search result based on query parameters
Body
Type: application/json
Example:
20HTTP status code 400
The request could not be understood by the server due to malformed syntax.You SHOULD NOT repeat the request without modifications.
Body
Type: application/json
Schema:
{
"statusCode": { "type": "integer" },
"errorMessage": { "type": "string" }
}Example:
{
"statusCode": 400,
"errorMessage": "No property "Desc" exists "
}/models({modelId})/header
This endpoint allows get a model header based on the ID and status you specify.
Update the model header information and get the updated information.
get /models({modelId})/header
This endpoint allows get a model header based on the ID and status you specify.
REST API supports Basic Authentication
URI Parameters
- modelId: required (string)
Query Parameters
- status: (string)
Retrieve model 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-04/schema#",
"javaType": "com.sap.iot.ain.gen.model.ModelHeader",
"type": "object",
"properties": {
"modelId": {
"type": "string",
"maxLength": 32,
"description": "Model ID. Generated by server, used as read-only."
},
"name": {
"type": "string",
"maxLength": 255,
"description": "Name of model"
},
"templateId": {
"type": "string",
"maxLength": 32,
"description": "Template to which model belongs to"
},
"completeness": {
"type": "integer"
},
"class": {
"type": "string",
"maxLength": 255,
"description": "Name of the Class template"
},
"subclass": {
"type": "string",
"maxLength": 255,
"description": "Name of the Subclass template"
},
"modelTemplate": {
"type": "string",
"maxLength": 255,
"description": "Name of the Model template"
},
"adminData": {
"type": "object",
"properties": {
"createdBy": {
"type": "string"
},
"createdOn": {
"type": "string",
"format": "YYYY-MM-DD"
},
"changedBy": {
"type": "string"
},
"changedOn": {
"type": "string",
"format": "YYYY-MM-DD"
}
}
},
"hasInRevision": {
"type": "boolean",
"description": "The flag denotes is there a draft version of the model exists or not. Possible values are : 'true' - draft version exists, 'false' - draft version does not exists."
},
"status": {
"type": "string",
"enum": [
"1",
"2",
"3"
],
"description": "The revision status of the model. Possible values are: 1 - Unpublished, 2 - Published and 3 - In-revision."
},
"version": {
"type": "double",
"description": "Version of the model"
},
"publishedOn": {
"type": "string",
"description": "Published On date as string format : YYYY-MM-DD"
},
"sectionCompleteness": {
"type": "object",
"additionalProperties": false,
"properties": {
"headerPercentage": {
"type": "double",
"description": "The completeness of header section of the model."
},
"attachmentPercentage": {
"type": "double",
"description": "The completeness of attachments section of the model."
},
"instructionPercentage": {
"type": "double",
"description": "The completeness of instructions section of the model."
},
"valuePercentage": {
"type": "double",
"description": "The completeness of model attributes section."
}
}
},
"manufacturer": {
"type": "string",
"maxLength": 255,
"description": "Name of the model manufacturer"
},
"isManufacturerValid": {
"type": "boolean",
"description": "The flag denotes is manufacturer is active on the AIN network or not. Possible values: 'true' - Active, 'false' - Inactive"
},
"organizationID": {
"type": "string",
"maxLength": 32,
"description": "The business partner ID of model manufacturer"
},
"generation": {
"type": "string",
"maxLength": 255
},
"releaseDate": {
"type": "string",
"format": "YYYY-MM-DD",
"description": "Release date as string format : YYYY-MM-DD"
},
"serviceExpirationDate": {
"type": "string",
"format": "YYYY-MM-DD",
"description": "Service expiration date as string format : YYYY-MM-DD"
},
"calibrationDate": {
"type": "string",
"format": "YYYY-MM-DD",
"description": "Calibration date as string format : YYYY-MM-DD"
},
"orderStopDate": {
"type": "string",
"format": "YYYY-MM-DD",
"description": "Order stop date as string format : YYYY-MM-DD"
},
"noSparePartsDate": {
"type": "string",
"format": "YYYY-MM-DD",
"description": "No spare part date as string format : YYYY-MM-DD"
},
"globalId": {
"type": "string",
"maxLength": 50
},
"safetyRiskCode": {
"type": "string",
"maxLength": 10,
"description": "The safety risk enum value. 1 - Minor, 2 - Moderate, 3 - Severe and 4 - Catastrophic."
},
"image": {
"type": "string",
"maxLength": 100,
"description": "This is the documentid of the image/logo which you get from the document upload service."
},
"description": {
"type": "object",
"properties": {
"language": {
"type": "string",
"maxLength": 32,
"description": "Language in which description is present."
},
"short": {
"type": "string",
"maxLength": 255,
"description": "Short description"
},
"long": {
"type": "string",
"maxLength": 5000,
"description": "Long description"
}
}
},
"equipmentTracking": {
"type": "string",
"enum": [
"1",
"2",
"3"
],
"description": "The equipment tracking enum value. 1 - Serial Number Tracking at Model Level, 2 - Serial Number Tracking at Manufacturer Level and 3 - Batch Number Tracking at Batch Level"
}
}
}Example:
{
"organizationID": "B7A4D0C253294D5D93E881123B2B9B4F",
"generation": "1",
"releaseDate": "2016-05-02",
"serviceExpirationDate": "2016-05-27",
"calibrationDate": "2016-05-27",
"orderStopDate": "2016-05-27",
"noSparePartsDate": "2016-05-27",
"globalId": "1",
"image": "UJ2VRTz_ASgIuIGzmtsgwHYtoPKkGkSBgF9oE-lKVxc",
"safetyRiskCode": "1",
"description": {
"language": "en",
"short": "Sub Sea Pump",
"long": "desc"
},
"equipmentTracking": "1",
"modelId": "08C09303B95D4F8D8DCC98AC7089CB3F",
"name": "Sub Sea Pump",
"internalId": "Sub Sea Pump",
"templateId": "576E537B623F4D06ADC9DAA0C3E22680",
"completeness": 83,
"class": "Pump Class",
"subclass": "Pump Subclass",
"modelTemplate": "Pump Model Template",
"adminData": {
"createdBy": "1615CE8762EC4C81808B863E7EECD95A",
"createdOn": "2016-05-17",
"changedBy": "9149C46CB9F94A218CB3A8782E69873F",
"changedOn": "2016-05-17"
},
"hasInRevision": false,
"status": "2",
"version": 8.0,
"publishedOn": "2016-05-17",
"sectionCompleteness": {
"headerPercentage": 100.0,
"attachmentPercentage": 42.0,
"modelValuePercentage": 100.0,
"instructionPercentage": 100.0
},
"manufacturer": "KSB",
"isManufacturerValid": false
}HTTP status code 400
The request could not be understood by the server due to malformed syntax.You SHOULD NOT repeat the request without modifications.
HTTP status code 403
User is not authorized to access the model
HTTP status code 500
Internal Server Error, something unexpected happened.
put /models({modelId})/header
Update the model header information and get the updated information.
REST API supports Basic Authentication
URI Parameters
- modelId: required (string)
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"javaType": "com.sap.iot.ain.gen.model.ModelHeader",
"type": "object",
"properties": {
"internalId": {
"type": "string",
"maxLength": 255,
"description": "User specified Id. This would replace the 'name' field with the next release"
},
"name": {
"type": "string",
"maxLength": 255,
"description": "Name of model. We recommend you to use 'internalId' field instead of 'name' since 'name' would be deprecated with next release."
},
"organizationID": {
"type": "string",
"maxLength": 32,
"description": "Business partner ID of model manufacturer. Use the /organizations or /organizations/byrole API to get the ID for the manufacturer."
},
"generation": {
"type": "string",
"maxLength": 255
},
"releaseDate": {
"type": "string",
"format": "YYYY-MM-DD",
"description": "Release date as string format : YYYY-MM-DD"
},
"serviceExpirationDate": {
"type": "string",
"format": "YYYY-MM-DD",
"description": "Service expiration date as string format : YYYY-MM-DD"
},
"calibrationDate": {
"type": "string",
"format": "YYYY-MM-DD",
"description": "Calibration date as string format : YYYY-MM-DD"
},
"orderStopDate": {
"type": "string",
"format": "YYYY-MM-DD",
"description": "Order stop date as string format : YYYY-MM-DD"
},
"noSparePartsDate": {
"type": "string",
"format": "YYYY-MM-DD",
"description": "No spare part date as string format : YYYY-MM-DD"
},
"globalId": {
"type": "string",
"maxLength": 50
},
"safetyRiskCode": {
"type": "string",
"enum": [
"1",
"2",
"3",
"4"
],
"description": "The safety risk enum value. 1 - Minor, 2 - Moderate, 3 - Severe and 4 - Catastrophic. Use /enumeration API with the type as 'EquipmentSafetyRisk' to get the enumeration."
},
"image": {
"type": "string",
"maxLength": 100,
"description": "This is the documentid of the image/logo which you get from the document upload service."
},
"description": {
"type": "object",
"properties": {
"short": {
"type": "string",
"maxLength": 255,
"description": "Short description"
},
"long": {
"type": "string",
"maxLength": 5000,
"description": "Long description"
}
},
"required": ["short"]
},
"equipmentTracking": {
"type": "string",
"enum": [
"1",
"2",
"3"
],
"description": "The equipment tracking enum value. 1 - Serial Number Tracking at Model Level, 2 - Serial Number Tracking at Manufacturer Level and 3 - Batch Number Tracking at Batch Level. Use /enumeration API with the type as 'EquipmentTracking' to get the enumeration."
}
},
"required": ["internalId", "organizationID", "description", "equipmentTracking"]
}Example:
{
"internalId": "Sub Sea Pump",
"organizationID": "B7A4D0C253294D5D93E881123B2B9B4F",
"generation": "1",
"releaseDate": "2016-05-02",
"serviceExpirationDate": "2016-05-27",
"calibrationDate": "2016-05-27",
"orderStopDate": "2016-05-27",
"noSparePartsDate": "2016-05-27",
"globalId": "1",
"image": "UJ2VRTz_ASgIuIGzmtsgwHYtoPKkGkSBgF9oE-lKVxc",
"safetyRiskCode": "1",
"description": {
"language": "en",
"short": "Sub Sea Pump",
"long": "desc"
},
"equipmentTracking": "1"
}HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"javaType": "com.sap.iot.ain.gen.model.ModelHeader",
"type": "object",
"properties": {
"modelId": {
"type": "string",
"maxLength": 32,
"description": "Model ID. Generated by server, used as read-only."
},
"name": {
"type": "string",
"maxLength": 255,
"description": "Name of model"
},
"templateId": {
"type": "string",
"maxLength": 32,
"description": "Template to which model belongs to"
},
"completeness": {
"type": "integer"
},
"class": {
"type": "string",
"maxLength": 255,
"description": "Name of the Class template"
},
"subclass": {
"type": "string",
"maxLength": 255,
"description": "Name of the Subclass template"
},
"modelTemplate": {
"type": "string",
"maxLength": 255,
"description": "Name of the Model template"
},
"adminData": {
"type": "object",
"properties": {
"createdBy": {
"type": "string"
},
"createdOn": {
"type": "string",
"format": "YYYY-MM-DD"
},
"changedBy": {
"type": "string"
},
"changedOn": {
"type": "string",
"format": "YYYY-MM-DD"
}
}
},
"hasInRevision": {
"type": "boolean",
"description": "The flag denotes is there a draft version of the model exists or not. Possible values are : 'true' - draft version exists, 'false' - draft version does not exists."
},
"status": {
"type": "string",
"enum": [
"1",
"2",
"3"
],
"description": "The revision status of the model. Possible values are: 1 - Unpublished, 2 - Published and 3 - In-revision."
},
"version": {
"type": "double",
"description": "Version of the model"
},
"publishedOn": {
"type": "string",
"description": "Published On date as string format : YYYY-MM-DD"
},
"sectionCompleteness": {
"type": "object",
"additionalProperties": false,
"properties": {
"headerPercentage": {
"type": "double",
"description": "The completeness of header section of the model."
},
"attachmentPercentage": {
"type": "double",
"description": "The completeness of attachments section of the model."
},
"instructionPercentage": {
"type": "double",
"description": "The completeness of instructions section of the model."
},
"valuePercentage": {
"type": "double",
"description": "The completeness of model attributes section."
}
}
},
"manufacturer": {
"type": "string",
"maxLength": 255,
"description": "Name of the model manufacturer"
},
"isManufacturerValid": {
"type": "boolean",
"description": "The flag denotes is manufacturer is active on the AIN network or not. Possible values: 'true' - Active, 'false' - Inactive"
},
"organizationID": {
"type": "string",
"maxLength": 32,
"description": "The business partner ID of model manufacturer"
},
"generation": {
"type": "string",
"maxLength": 255
},
"releaseDate": {
"type": "string",
"format": "YYYY-MM-DD",
"description": "Release date as string format : YYYY-MM-DD"
},
"serviceExpirationDate": {
"type": "string",
"format": "YYYY-MM-DD",
"description": "Service expiration date as string format : YYYY-MM-DD"
},
"calibrationDate": {
"type": "string",
"format": "YYYY-MM-DD",
"description": "Calibration date as string format : YYYY-MM-DD"
},
"orderStopDate": {
"type": "string",
"format": "YYYY-MM-DD",
"description": "Order stop date as string format : YYYY-MM-DD"
},
"noSparePartsDate": {
"type": "string",
"format": "YYYY-MM-DD",
"description": "No spare part date as string format : YYYY-MM-DD"
},
"globalId": {
"type": "string",
"maxLength": 50
},
"safetyRiskCode": {
"type": "string",
"maxLength": 10,
"description": "The safety risk enum value. 1 - Minor, 2 - Moderate, 3 - Severe and 4 - Catastrophic."
},
"image": {
"type": "string",
"maxLength": 100,
"description": "This is the documentid of the image/logo which you get from the document upload service."
},
"description": {
"type": "object",
"properties": {
"language": {
"type": "string",
"maxLength": 32,
"description": "Language in which description is present."
},
"short": {
"type": "string",
"maxLength": 255,
"description": "Short description"
},
"long": {
"type": "string",
"maxLength": 5000,
"description": "Long description"
}
}
},
"equipmentTracking": {
"type": "string",
"enum": [
"1",
"2",
"3"
],
"description": "The equipment tracking enum value. 1 - Serial Number Tracking at Model Level, 2 - Serial Number Tracking at Manufacturer Level and 3 - Batch Number Tracking at Batch Level"
}
}
}Example:
{
"name": "Sub Sea Pump",
"internalId": "Sub Sea Pump",
"organizationID": "B7A4D0C253294D5D93E881123B2B9B4F",
"generation": "1",
"releaseDate": "2016-05-02",
"serviceExpirationDate": "2016-05-27",
"calibrationDate": "2016-05-27",
"orderStopDate": "2016-05-27",
"noSparePartsDate": "2016-05-27",
"globalId": "1",
"image": "UJ2VRTz_ASgIuIGzmtsgwHYtoPKkGkSBgF9oE-lKVxc",
"safetyRiskCode": "1",
"description": {
"language": "en",
"short": "Sub Sea Pump",
"long": "desc"
},
"equipmentTracking": "1",
"modelId": "3491FD57C1344F8A80FA085A271E5DDD",
"templateId": "8C8AA68CD8D64E52A60EBE840946E9D9",
"completeness": 63,
"subclass": "GSL_Subclass_0010",
"modelTemplate": "GSK_MODEL_0010",
"adminData": {
"createdBy": "56EE521CF6494A7B8ABD5FF127A6DAA0",
"createdOn": "2016-06-03",
"changedBy": "512DAF3466A44A1B8E908A4491810627",
"changedOn": "2016-10-16"
},
"hasInRevision": true,
"status": "3",
"version": 3.0,
"publishedOn": "2016-09-26",
"sectionCompleteness": {
"headerPercentage": 100.0,
"attachmentPercentage": 12.0,
"modelValuePercentage": 40.0,
"instructionPercentage": 100.0
},
"manufacturer": "KSB",
"isManufacturerValid": false,
"class": "GSK_CLASS_0010"
}HTTP status code 400
The request could not be understood by the server due to malformed syntax.You SHOULD NOT repeat the request without modifications.
HTTP status code 403
User is not authorized to update the model
HTTP status code 500
Internal Server Error, something unexpected happened.
/models({modelId})
This endpoint allows you to delete model with specified id.
delete /models({modelId})
This endpoint allows you to delete model with specified id.
REST API supports Basic Authentication
URI Parameters
- modelId: required (string)
HTTP status code 204
model with specified id has been succesfully deleted.
HTTP status code 400
Bad request, when model doesn't exists.
HTTP status code 403
User is not authorized to delete the model
HTTP status code 500
Internal Server Error, something unexpected happened.
/models/publish
This endpoint is used to publish multiple models.
put /models/publish
This endpoint is used to publish multiple models.
REST API supports Basic Authentication
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "array",
"items": [{
"type": "object",
"properties": {
"id": {
"type": "string",
"length": 32,
"description": "Equipment ID"
}
}
}]
}Example:
[{
"id": "12345678912345678912345678912345"
}, {
"id": "1049EE8BFACE4B09AACD109695B4DA64"
}]HTTP status code 200
Successfully publishes the list of model mentioned in the request.
/models({modelId})/revise
This endpoint allows to create new revision of a model.
put /models({modelId})/revise
This endpoint allows to create new revision of a model.
REST API supports Basic Authentication
URI Parameters
- modelId: required (string)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"javaType": "com.sap.iot.ain.gen.model.ModelHeader",
"type": "object",
"properties": {
"modelId": {
"type": "string",
"maxLength": 32,
"description": "Model ID. Generated by server, used as read-only."
},
"name": {
"type": "string",
"maxLength": 255,
"description": "Name of model"
},
"templateId": {
"type": "string",
"maxLength": 32,
"description": "Template to which model belongs to"
},
"completeness": {
"type": "integer"
},
"class": {
"type": "string",
"maxLength": 255,
"description": "Name of the Class template"
},
"subclass": {
"type": "string",
"maxLength": 255,
"description": "Name of the Subclass template"
},
"modelTemplate": {
"type": "string",
"maxLength": 255,
"description": "Name of the Model template"
},
"adminData": {
"type": "object",
"properties": {
"createdBy": {
"type": "string"
},
"createdOn": {
"type": "string",
"format": "YYYY-MM-DD"
},
"changedBy": {
"type": "string"
},
"changedOn": {
"type": "string",
"format": "YYYY-MM-DD"
}
}
},
"hasInRevision": {
"type": "boolean",
"description": "The flag denotes is there a draft version of the model exists or not. Possible values are : 'true' - draft version exists, 'false' - draft version does not exists."
},
"status": {
"type": "string",
"enum": [
"1",
"2",
"3"
],
"description": "The revision status of the model. Possible values are: 1 - Unpublished, 2 - Published and 3 - In-revision."
},
"version": {
"type": "double",
"description": "Version of the model"
},
"publishedOn": {
"type": "string",
"description": "Published On date as string format : YYYY-MM-DD"
},
"sectionCompleteness": {
"type": "object",
"additionalProperties": false,
"properties": {
"headerPercentage": {
"type": "double",
"description": "The completeness of header section of the model."
},
"attachmentPercentage": {
"type": "double",
"description": "The completeness of attachments section of the model."
},
"instructionPercentage": {
"type": "double",
"description": "The completeness of instructions section of the model."
},
"valuePercentage": {
"type": "double",
"description": "The completeness of model attributes section."
}
}
},
"manufacturer": {
"type": "string",
"maxLength": 255,
"description": "Name of the model manufacturer"
},
"isManufacturerValid": {
"type": "boolean",
"description": "The flag denotes is manufacturer is active on the AIN network or not. Possible values: 'true' - Active, 'false' - Inactive"
},
"organizationID": {
"type": "string",
"maxLength": 32,
"description": "The business partner ID of model manufacturer"
},
"generation": {
"type": "string",
"maxLength": 255
},
"releaseDate": {
"type": "string",
"format": "YYYY-MM-DD",
"description": "Release date as string format : YYYY-MM-DD"
},
"serviceExpirationDate": {
"type": "string",
"format": "YYYY-MM-DD",
"description": "Service expiration date as string format : YYYY-MM-DD"
},
"calibrationDate": {
"type": "string",
"format": "YYYY-MM-DD",
"description": "Calibration date as string format : YYYY-MM-DD"
},
"orderStopDate": {
"type": "string",
"format": "YYYY-MM-DD",
"description": "Order stop date as string format : YYYY-MM-DD"
},
"noSparePartsDate": {
"type": "string",
"format": "YYYY-MM-DD",
"description": "No spare part date as string format : YYYY-MM-DD"
},
"globalId": {
"type": "string",
"maxLength": 50
},
"safetyRiskCode": {
"type": "string",
"maxLength": 10,
"description": "The safety risk enum value. 1 - Minor, 2 - Moderate, 3 - Severe and 4 - Catastrophic."
},
"image": {
"type": "string",
"maxLength": 100,
"description": "This is the documentid of the image/logo which you get from the document upload service."
},
"description": {
"type": "object",
"properties": {
"language": {
"type": "string",
"maxLength": 32,
"description": "Language in which description is present."
},
"short": {
"type": "string",
"maxLength": 255,
"description": "Short description"
},
"long": {
"type": "string",
"maxLength": 5000,
"description": "Long description"
}
}
},
"equipmentTracking": {
"type": "string",
"enum": [
"1",
"2",
"3"
],
"description": "The equipment tracking enum value. 1 - Serial Number Tracking at Model Level, 2 - Serial Number Tracking at Manufacturer Level and 3 - Batch Number Tracking at Batch Level"
}
}
}Example:
{
"name": "Sub Sea Pump",
"internalId": "Sub Sea Pump",
"organizationID": "B7A4D0C253294D5D93E881123B2B9B4F",
"generation": "1",
"releaseDate": "2016-05-02",
"serviceExpirationDate": "2016-05-27",
"calibrationDate": "2016-05-27",
"orderStopDate": "2016-05-27",
"noSparePartsDate": "2016-05-27",
"globalId": "1",
"image": "UJ2VRTz_ASgIuIGzmtsgwHYtoPKkGkSBgF9oE-lKVxc",
"safetyRiskCode": "1",
"description": {
"language": "en",
"short": "Sub Sea Pump",
"long": "desc"
},
"equipmentTracking": "1",
"modelId": "3491FD57C1344F8A80FA085A271E5DDD",
"templateId": "8C8AA68CD8D64E52A60EBE840946E9D9",
"completeness": 63,
"subclass": "GSL_Subclass_0010",
"modelTemplate": "GSK_MODEL_0010",
"adminData": {
"createdBy": "56EE521CF6494A7B8ABD5FF127A6DAA0",
"createdOn": "2016-06-03",
"changedBy": "512DAF3466A44A1B8E908A4491810627",
"changedOn": "2016-10-16"
},
"hasInRevision": true,
"status": "3",
"version": 3.0,
"publishedOn": "2016-09-26",
"sectionCompleteness": {
"headerPercentage": 100.0,
"attachmentPercentage": 12.0,
"modelValuePercentage": 40.0,
"instructionPercentage": 100.0
},
"manufacturer": "KSB",
"isManufacturerValid": false,
"class": "GSK_CLASS_0010"
}HTTP status code 400
The request could not be understood by the server due to malformed syntax.You SHOULD NOT repeat the request without modifications.
Body
Type: application/json
Schema:
{
"statusCode": { "type": "integer" },
"errorMessage": { "type": "string" }
}Example:
{
"statusCode": 400,
"errorMessage": "No property "Desc" exists "
}HTTP status code 403
User is not authorized to update the model
HTTP status code 500
Internal Server Error, something unexpected happened.
/models({modelId})/publish
This endpoint allows to publish a model.
put /models({modelId})/publish
This endpoint allows to publish a model.
REST API supports Basic Authentication
URI Parameters
- modelId: required (string)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"javaType": "com.sap.iot.ain.gen.model.ModelHeader",
"type": "object",
"properties": {
"modelId": {
"type": "string",
"maxLength": 32,
"description": "Model ID. Generated by server, used as read-only."
},
"name": {
"type": "string",
"maxLength": 255,
"description": "Name of model"
},
"templateId": {
"type": "string",
"maxLength": 32,
"description": "Template to which model belongs to"
},
"completeness": {
"type": "integer"
},
"class": {
"type": "string",
"maxLength": 255,
"description": "Name of the Class template"
},
"subclass": {
"type": "string",
"maxLength": 255,
"description": "Name of the Subclass template"
},
"modelTemplate": {
"type": "string",
"maxLength": 255,
"description": "Name of the Model template"
},
"adminData": {
"type": "object",
"properties": {
"createdBy": {
"type": "string"
},
"createdOn": {
"type": "string",
"format": "YYYY-MM-DD"
},
"changedBy": {
"type": "string"
},
"changedOn": {
"type": "string",
"format": "YYYY-MM-DD"
}
}
},
"hasInRevision": {
"type": "boolean",
"description": "The flag denotes is there a draft version of the model exists or not. Possible values are : 'true' - draft version exists, 'false' - draft version does not exists."
},
"status": {
"type": "string",
"enum": [
"1",
"2",
"3"
],
"description": "The revision status of the model. Possible values are: 1 - Unpublished, 2 - Published and 3 - In-revision."
},
"version": {
"type": "double",
"description": "Version of the model"
},
"publishedOn": {
"type": "string",
"description": "Published On date as string format : YYYY-MM-DD"
},
"sectionCompleteness": {
"type": "object",
"additionalProperties": false,
"properties": {
"headerPercentage": {
"type": "double",
"description": "The completeness of header section of the model."
},
"attachmentPercentage": {
"type": "double",
"description": "The completeness of attachments section of the model."
},
"instructionPercentage": {
"type": "double",
"description": "The completeness of instructions section of the model."
},
"valuePercentage": {
"type": "double",
"description": "The completeness of model attributes section."
}
}
},
"manufacturer": {
"type": "string",
"maxLength": 255,
"description": "Name of the model manufacturer"
},
"isManufacturerValid": {
"type": "boolean",
"description": "The flag denotes is manufacturer is active on the AIN network or not. Possible values: 'true' - Active, 'false' - Inactive"
},
"organizationID": {
"type": "string",
"maxLength": 32,
"description": "The business partner ID of model manufacturer"
},
"generation": {
"type": "string",
"maxLength": 255
},
"releaseDate": {
"type": "string",
"format": "YYYY-MM-DD",
"description": "Release date as string format : YYYY-MM-DD"
},
"serviceExpirationDate": {
"type": "string",
"format": "YYYY-MM-DD",
"description": "Service expiration date as string format : YYYY-MM-DD"
},
"calibrationDate": {
"type": "string",
"format": "YYYY-MM-DD",
"description": "Calibration date as string format : YYYY-MM-DD"
},
"orderStopDate": {
"type": "string",
"format": "YYYY-MM-DD",
"description": "Order stop date as string format : YYYY-MM-DD"
},
"noSparePartsDate": {
"type": "string",
"format": "YYYY-MM-DD",
"description": "No spare part date as string format : YYYY-MM-DD"
},
"globalId": {
"type": "string",
"maxLength": 50
},
"safetyRiskCode": {
"type": "string",
"maxLength": 10,
"description": "The safety risk enum value. 1 - Minor, 2 - Moderate, 3 - Severe and 4 - Catastrophic."
},
"image": {
"type": "string",
"maxLength": 100,
"description": "This is the documentid of the image/logo which you get from the document upload service."
},
"description": {
"type": "object",
"properties": {
"language": {
"type": "string",
"maxLength": 32,
"description": "Language in which description is present."
},
"short": {
"type": "string",
"maxLength": 255,
"description": "Short description"
},
"long": {
"type": "string",
"maxLength": 5000,
"description": "Long description"
}
}
},
"equipmentTracking": {
"type": "string",
"enum": [
"1",
"2",
"3"
],
"description": "The equipment tracking enum value. 1 - Serial Number Tracking at Model Level, 2 - Serial Number Tracking at Manufacturer Level and 3 - Batch Number Tracking at Batch Level"
}
}
}Example:
{
"name": "Sub Sea Pump",
"organizationID": "B7A4D0C253294D5D93E881123B2B9B4F",
"generation": "1",
"releaseDate": "2016-05-02",
"serviceExpirationDate": "2016-05-27",
"calibrationDate": "2016-05-27",
"orderStopDate": "2016-05-27",
"noSparePartsDate": "2016-05-27",
"globalId": "1",
"image": "UJ2VRTz_ASgIuIGzmtsgwHYtoPKkGkSBgF9oE-lKVxc",
"safetyRiskCode": "1",
"description": {
"language": "en",
"short": "Sub Sea Pump",
"long": "desc"
},
"equipmentTracking": "1",
"modelId": "3491FD57C1344F8A80FA085A271E5DDD",
"templateId": "8C8AA68CD8D64E52A60EBE840946E9D9",
"completeness": 63,
"subclass": "GSL_Subclass_0010",
"modelTemplate": "GSK_MODEL_0010",
"adminData": {
"createdBy": "56EE521CF6494A7B8ABD5FF127A6DAA0",
"createdOn": "2016-06-03",
"changedBy": "512DAF3466A44A1B8E908A4491810627",
"changedOn": "2016-10-16"
},
"hasInRevision": true,
"status": "3",
"version": 3.0,
"publishedOn": "2016-09-26",
"sectionCompleteness": {
"headerPercentage": 100.0,
"attachmentPercentage": 12.0,
"modelValuePercentage": 40.0,
"instructionPercentage": 100.0
},
"manufacturer": "KSB",
"isManufacturerValid": false,
"class": "GSK_CLASS_0010"
}HTTP status code 400
The request could not be understood by the server due to malformed syntax.You SHOULD NOT repeat the request without modifications.
Body
Type: application/json
Schema:
{
"statusCode": { "type": "integer" },
"errorMessage": { "type": "string" }
}Example:
{
"statusCode": 400,
"errorMessage": "No property "Desc" exists "
}HTTP status code 403
User is not authorized to update the model
HTTP status code 500
Internal Server Error, something unexpected happened.
/models({modelId})/values
This API will read the attribute values of the model.
Updates attribute values of the model.
get /models({modelId})/values
This API will read the attribute values of the model.
REST API supports Basic Authentication
URI Parameters
- modelId: required (string)
Query Parameters
- status: (string)
Retrieve model 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": {
"id": {
"type": "string",
"maxLength": 32,
"description": "Generated by server, used as read-only"
},
"templates": {
"type": "array",
"description": "Current templates and its parent templates, along with their values",
"items": {
"type": "object",
"properties": {
"templateId": {
"type": "string",
"maxLength": 32,
"description": "One of the template in inheritance chain."
},
"attributeGroups": {
"type": "array",
"items": {
"type": "object",
"properties": {
"attributeGroupId": {
"type": "string",
"maxLength": 32
},
"attributes": {
"type": "array",
"items": {
"type": "object",
"properties": {
"object": {
"type": "object",
"oneOf": [{
"attributeId": {
"type": "string",
"maxLength": 32
},
"name": {
"type": "string"
},
"value1": {
"type": "string"
}
}, {
"attributeId": {
"type": "string",
"maxLength": 32
},
"name": {
"type": "string"
},
"minValue1": {
"type": "string"
},
"value1": {
"type": "string"
},
"maxValue1": {
"type": "string"
},
"minValue2": {
"type": "string"
},
"value2": {
"type": "string"
},
"maxValue2": {
"type": "string"
},
"uom1": {
"type": "string"
},
"uom2": {
"type": "string"
}
}, {
"attributeId": {
"type": "string",
"maxLength": 32
},
"name": {
"type": "string"
},
"value1": {
"type": "array",
"items": {
"type": "string"
}
}
}, {
"attributeId": {
"type": "string",
"maxLength": 32
},
"name": {
"type": "string"
},
"minValue1": {
"type": "string"
},
"maxValue1": {
"type": "string"
},
"uom1": {
"type": "string"
}
}, {
"attributeId": {
"type": "string",
"maxLength": 32
},
"name": {
"type": "string"
},
"minValue1": {
"type": "string"
},
"value1": {
"type": "string"
},
"maxValue1": {
"type": "string"
},
"uom1": {
"type": "string"
}
}, {
"attributeId": {
"type": "string",
"maxLength": 32
},
"name": {
"type": "string"
},
"value1": {
"type": "string"
},
"value2": {
"type": "string"
},
"uom1": {
"type": "string"
},
"uom2": {
"type": "string"
}
}]
}
}
},
"required": [
"attributeId"
]
}
}
},
"required": [
"attributeGroupId"
]
}
}
},
"required": [
"templateId"
]
}
},
"required": [
"id"
]
}Example:
{
"id": "1D3B9C6FF28F4C90BC39D480CD05681C",
"templates": [{
"templateId": "37C1831052CD49BA83C6BD61DCA449D9",
"attributeGroups": [{
"attributeGroupId": "66A48786C0704503A4F74A0648CB515A",
"attributes": [{
"attributeId": "0D152B665CAB41E6ACC7EEBDD3C8FE44",
"value1": [],
"name": "enumtest1",
"dataType": "enum",
}, {
"attributeId": "1014CCF0025B4863B685ECB1B347D1BF",
"value1": "false",
"name": "ATT2",
"dataType": "boolean",
}]
}, {
"attributeGroupId": "AC2791787ED840D8876364A56C5C2A97",
"attributes": [{
"attributeId": "27A4BC8DA4414C22A7C817A9D5355255",
"value1": [],
"name": "Asian",
"dataType": "enum",
}, {
"attributeId": "C430982F4F3142DCACCF8F0070ECE855",
"value1": "a",
"name": "Jamaican",
"dataType": "enum",
}]
}, {
"attributeGroupId": "D25AAB15969D49B7A7C6222D5C8F6475",
"attributes": [{
"attributeId": "2F96D11911B7463B8B0B11745873A3AB",
"value1": "false",
"name": "efe",
"dataType": "boolean",
}]
}]
}, {
"templateId": "3918B79E52BC4C34801AD36355A4758A",
"attributeGroups": [{
"attributeGroupId": "865A39C0BF8A4708868C8940954F8B9E",
"attributes": [{
"attributeId": "D5AA27F4756E432199F5A65CD7D65265",
"value1": [],
"name": "Enum Multi",
"dataType": "enum",
}, {
"attributeId": "E22B494DECC74DEE9A3BF53F1F9F2993",
"value1": "false",
"name": "eight",
"dataType": "boolean",
}]
}]
}]
}HTTP status code 400
The request could not be understood by the server due to malformed syntax.You SHOULD NOT repeat the request without modifications.
HTTP status code 403
User is not authorized to access the model
HTTP status code 500
Internal Server Error, something unexpected happened.
put /models({modelId})/values
Updates attribute values of the model.
REST API supports Basic Authentication
URI Parameters
- modelId: required (string)
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-4/schema",
"type": "object",
"additionalProperties": false,
"properties": {
"templates": {
"type": "array",
"description": "Current templates and its parent templates, along with their values",
"items": {
"type": "object",
"properties": {
"templateId": {
"type": "string",
"maxLength": 32,
"description": "One of the template in inheritance chain."
},
"attributeGroups": {
"type": "array",
"items": {
"type": "object",
"properties": {
"attributeGroupId": {
"type": "string",
"maxLength": 32
},
"attributes": {
"type": "array",
"items": {
"type": "object",
"properties": {
"object": {
"type": "object",
"oneOf": [{
"attributeId": {
"type": "string",
"maxLength": 32
},
"value1": {
"type": "string"
}
}, {
"attributeId": {
"type": "string",
"maxLength": 32
},
"minvalue1": {
"type": "string"
},
"value1": {
"type": "string"
},
"maxvalue1": {
"type": "string"
},
"minvalue2": {
"type": "string"
},
"value2": {
"type": "string"
},
"maxvalue2": {
"type": "string"
},
"uom1": {
"type": "string"
},
"uom2": {
"type": "string"
}
}, {
"attributeId": {
"type": "string",
"maxLength": 32
},
"value1": {
"type": "array",
"items": {
"type": "string"
}
}
}, {
"attributeId": {
"type": "string",
"maxLength": 32
},
"minvalue1": {
"type": "string"
},
"maxvalue1": {
"type": "string"
},
"uom1": {
"type": "string"
}
}, {
"attributeId": {
"type": "string",
"maxLength": 32
},
"minvalue1": {
"type": "string"
},
"value1": {
"type": "string"
},
"maxvalue1": {
"type": "string"
},
"uom1": {
"type": "string"
}
}, {
"attributeId": {
"type": "string",
"maxLength": 32
},
"value1": {
"type": "string"
},
"value2": {
"type": "string"
},
"uom1": {
"type": "string"
},
"uom2": {
"type": "string"
}
}]
}
}
},
"required": [
"attributeId"
]
}
}
},
"required": [
"attributeGroupId"
]
}
}
},
"required": [
"templateId"
]
}
},
"required": [
"id"
]
}Example:
{
"templates": [{
"templateId": "37C1831052CD49BA83C6BD61DCA449D9",
"attributeGroups": [{
"attributeGroupId": "66A48786C0704503A4F74A0648CB515A",
"attributes": [{
"attributeId": "0D152B665CAB41E6ACC7EEBDD3C8FE44",
"value1": "1"
}, {
"attributeId": "1014CCF0025B4863B685ECB1B347D1BF",
"minvalue1": 10,
"value1": 15,
"maxvalue1": 20,
"uom1": "KM"
}]
}, {
"attributeGroupId": "AC2791787ED840D8876364A56C5C2A97",
"attributes": [{
"attributeId": "27A4BC8DA4414C22A7C817A9D5355255",
"minvalue1": 10,
"value1": 15,
"maxvalue1": 20,
"uom1": "KM",
"minvalue2": 10,
"value2": 15,
"maxvalue2": 20,
"uom2": "H"
}, {
"attributeId": "C430982F4F3142DCACCF8F0070ECE855",
"value1": "a"
}]
}, {
"attributeGroupId": "D25AAB15969D49B7A7C6222D5C8F6475",
"attributes": [{
"attributeId": "2F96D11911B7463B8B0B11745873A3AB",
"value1": "false"
}]
}]
}, {
"templateId": "3918B79E52BC4C34801AD36355A4758A",
"attributeGroups": [{
"attributeGroupId": "865A39C0BF8A4708868C8940954F8B9E",
"attributes": [{
"attributeId": "D5AA27F4756E432199F5A65CD7D65265",
"value1": ["1", "2"]
}, {
"attributeId": "E22B494DECC74DEE9A3BF53F1F9F2993",
"value1": "false"
}, {
"attributeId": "E22B494DECC74DEE9A3BF53F1F9F2993",
"value1": 10.4
}]
}]
}]
}HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-4/schema",
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"type": "string",
"maxLength": 32,
"description": "Generated by server, used as read-only"
},
"templates": {
"type": "array",
"description": "Current templates and its parent templates, along with their values",
"items": {
"type": "object",
"properties": {
"templateId": {
"type": "string",
"maxLength": 32,
"description": "One of the template in inheritance chain."
},
"attributeGroups": {
"type": "array",
"items": {
"type": "object",
"properties": {
"attributeGroupId": {
"type": "string",
"maxLength": 32
},
"attributes": {
"type": "array",
"items": {
"type": "object",
"properties": {
"object": {
"type": "object",
"oneOf": [{
"attributeId": {
"type": "string",
"maxLength": 32
},
"name": {
"type": "string"
},
"value1": {
"type": "string"
}
}, {
"attributeId": {
"type": "string",
"maxLength": 32
},
"name": {
"type": "string"
},
"minValue1": {
"type": "string"
},
"value1": {
"type": "string"
},
"maxValue1": {
"type": "string"
},
"minValue2": {
"type": "string"
},
"value2": {
"type": "string"
},
"maxValue2": {
"type": "string"
},
"uom1": {
"type": "string"
},
"uom2": {
"type": "string"
}
}, {
"attributeId": {
"type": "string",
"maxLength": 32
},
"name": {
"type": "string"
},
"value1": {
"type": "array",
"items": {
"type": "string"
}
}
}, {
"attributeId": {
"type": "string",
"maxLength": 32
},
"name": {
"type": "string"
},
"minValue1": {
"type": "string"
},
"maxValue1": {
"type": "string"
},
"uom1": {
"type": "string"
}
}, {
"attributeId": {
"type": "string",
"maxLength": 32
},
"name": {
"type": "string"
},
"minValue1": {
"type": "string"
},
"value1": {
"type": "string"
},
"maxValue1": {
"type": "string"
},
"uom1": {
"type": "string"
}
}, {
"attributeId": {
"type": "string",
"maxLength": 32
},
"name": {
"type": "string"
},
"value1": {
"type": "string"
},
"value2": {
"type": "string"
},
"uom1": {
"type": "string"
},
"uom2": {
"type": "string"
}
}]
}
}
},
"required": [
"attributeId"
]
}
}
},
"required": [
"attributeGroupId"
]
}
}
},
"required": [
"templateId"
]
}
},
"required": [
"id"
]
}Example:
{
"id": "1D3B9C6FF28F4C90BC39D480CD05681C",
"templates": [{
"templateId": "37C1831052CD49BA83C6BD61DCA449D9",
"attributeGroups": [{
"attributeGroupId": "66A48786C0704503A4F74A0648CB515A",
"attributes": [{
"attributeId": "0D152B665CAB41E6ACC7EEBDD3C8FE44",
"value1": [],
"name": "enumtest1",
"dataType": "enum",
}, {
"attributeId": "1014CCF0025B4863B685ECB1B347D1BF",
"value1": "false",
"name": "ATT2",
"dataType": "boolean",
}]
}, {
"attributeGroupId": "AC2791787ED840D8876364A56C5C2A97",
"attributes": [{
"attributeId": "27A4BC8DA4414C22A7C817A9D5355255",
"value1": [],
"name": "Asian",
"dataType": "enum",
}, {
"attributeId": "C430982F4F3142DCACCF8F0070ECE855",
"value1": "a",
"name": "Jamaican",
"dataType": "enum",
}]
}, {
"attributeGroupId": "D25AAB15969D49B7A7C6222D5C8F6475",
"attributes": [{
"attributeId": "2F96D11911B7463B8B0B11745873A3AB",
"value1": "false",
"name": "efe",
"dataType": "boolean",
}]
}]
}, {
"templateId": "3918B79E52BC4C34801AD36355A4758A",
"attributeGroups": [{
"attributeGroupId": "865A39C0BF8A4708868C8940954F8B9E",
"attributes": [{
"attributeId": "D5AA27F4756E432199F5A65CD7D65265",
"value1": [],
"name": "Enum Multi",
"dataType": "enum",
}, {
"attributeId": "E22B494DECC74DEE9A3BF53F1F9F2993",
"value1": "false",
"name": "eight",
"dataType": "boolean",
}]
}]
}]
}HTTP status code 400
The request could not be understood by the server due to malformed syntax.You SHOULD NOT repeat the request without modifications.
HTTP status code 403
User is not authorized to update the model
HTTP status code 500
Internal Server Error, something unexpected happened.
/models({modelId})/documents
Gets all the documents assigned to the model of specified id and status.
This end point allows you to assign documents to a model.
get /models({modelId})/documents
Gets all the documents assigned to the model of specified id and status.
REST API supports Basic Authentication
URI Parameters
- modelId: required (string)
Query Parameters
- status: (string)
Retrieve models 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": {
"documentList": {
"type": "array",
"items": {
"additionalProperties": false,
"properties": {
"documentID": {
"type": "string",
"maxLength": 100,
"description": "The ID of the document which you get from the document upload service."
},
"name": {
"type": "string",
"maxLength": 255,
"description": "Name of document. 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"
},
"description": {
"type": "string",
"maxLength": 255,
"description": "Document description."
},
"phaseCode": {
"type": "string",
"maxLength": 1,
"enum": ["1", "2", "3", "4", "5", "6", "7", "8"],
"description": "Phase code enum value."
},
"categoryCode": {
"type": "string",
"maxLength": 2,
"enum": ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18"],
"description": "Category code enum value."
},
"phase": {
"type": "string",
"maxLength": 255
},
"category": {
"type": "string",
"maxLength": 255
},
"source": {
"type": "string",
"maxLength": 255,
"description": "Name of the organization who owns the document."
},
"fileSize": {
"type": "string",
"maxLength": 255
},
"mimeType": {
"type": "string",
"maxLength": 255
}
}
}
}
}
}Example:
[
{
"documentID": "02B50CB8C4C44E2AA52BD667A6C7C0E7",
"name": "rotor.png",
"internalId": "D.TEDX.490",
"description": "Messages ",
"phaseCode": "8",
"categoryCode": "8",
"phase": "Disposal",
"category": "StartupResults",
"source": "Manufacturer",
"fileSize": "9 KB",
"uRL": "ZiUKj5OoTMNgNWjjYrIfwfZHfafDNdRUIihOQAvB9sE",
"mimeType": "image/png"
},
{
"documentID": "749E499CF898433294B27ABB3F4F0DFE",
"name": "test.txt",
"internalId": "D.TEDX.492",
"description": "Testing file upload 2",
"phaseCode": "4",
"categoryCode": "4",
"phase": "Operation",
"category": "InstallationPlan",
"source": "Manufacturer",
"fileSize": "0 KB",
"uRL": "ZiUKj5OoTMNgNWjjYrIfwfZHfafDNdRUIihOQAvB9sE",
"mimeType": "text/plain"
}
]HTTP status code 400
The request could not be understood by the server due to malformed syntax.You SHOULD NOT repeat the request without modifications.
Body
Type: application/json
Schema:
{
"statusCode": { "type": "integer" },
"errorMessage": { "type": "string" }
}Example:
{
"statusCode": 400,
"errorMessage": "No property "Desc" exists "
}HTTP status code 403
User is not authorized to access the model
HTTP status code 500
Internal Server Error, something unexpected happened.
post /models({modelId})/documents
This end point allows you to assign documents to a model.
URI Parameters
- modelId: required (string)
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-4/schema",
"type": "object",
"additionalProperties": false,
"properties": {
"documentList": {
"type": "array",
"items": {
"additionalProperties": false,
"properties": {
"documentID": {
"type": "string",
"maxLength": 100,
"description": "This is the ID of the document which you get from the document upload service."
}
}
}
}
}
}Example:
{
"documentList": [{
"documentID": "AFC95C0F472341BFA9D78ABB2898A734"
}, {
"documentID": "860474BAE08C427BB46F399FEAE61862"
}]
}HTTP status code 200
Successfully publishes the list of model mentioned in the request.
/models({modelId})/instructions
This end point gives the instructions assigned to the given model Id.
get /models({modelId})/instructions
This end point gives the instructions assigned to the given model Id.
REST API supports Basic Authentication
URI Parameters
- modelId: required (string)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "array",
"items": {
"type": "object",
"properties": {
"instructionID": {
"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."
},
"internalId": {
"type": "string",
"description": "User specified Id. This would replace the 'title' field with the next release"
},
"status": {
"type": "string"
},
"activityCode": {
"type": "string"
},
"duration": {
"type": "string"
},
"description": {
"type": "string"
},
"statusDescription": {
"type": "string"
},
"activityCodeDescription": {
"type": "string"
},
"period": {
"type": "string"
},
"subclass": {
"type": "string"
},
"source": {
"type": "string"
},
"failureModeCode": {
"type": "null"
},
"failureModeCodeDescription": {
"type": "null"
},
"instructionType": {
"type": "string"
},
"instructionTypeDescription": {
"type": "string"
},
"sourceSearchTerms": {
"type": "string"
}
}
}
}Example:
[{
"instructionID": "80BEFD6F2BCD4022925CF96ACE3F1B62",
"status": "2",
"activityCode": "11",
"duration": null,
"title": "testranjith123",
"description": "",
"statusDescription": "Published",
"activityCodeDescription": "Deinstallation",
"period": null,
"subclass": "Adsorber",
"source": "ubuntu123",
"failureModeCode": null,
"failureModeCodeDescription": null,
"instructionType": "5",
"instructionTypeDescription": "Disposal",
"sourceSearchTerms": "Ubuntu12,ubuntu123,abc,abctest",
"internalID": "I.TEDX.490"
}, {
"instructionID": "553D6B21E6BC4A6C971768F727180A7C",
"status": "3",
"activityCode": "10",
"duration": null,
"title": "this is ins",
"description": "",
"statusDescription": "In Revision",
"activityCodeDescription": "Installation",
"period": null,
"subclass": "ACL_CAT_02UY8TG8LehRYZGLjTHBlXRz",
"source": "BASF1",
"failureModeCode": null,
"failureModeCodeDescription": null,
"instructionType": "3",
"instructionTypeDescription": "Installation",
"sourceSearchTerms": "BASF1,BASF1",
"internalID": "I.TEDX.491"
}]HTTP status code 400
The request could not be understood by the server due to malformed syntax.You SHOULD NOT repeat the request without modifications.
Body
Type: application/json
Schema:
{
"statusCode": { "type": "integer" },
"errorMessage": { "type": "string" }
}Example:
{
"statusCode": 400,
"errorMessage": "No property "Desc" exists "
}HTTP status code 403
User is not authorized to access the model
HTTP status code 500
Internal Server Error, something unexpected happened.
/errorcode({objectId})/{objectType}/create
This endpoint allows you to post aerror Code.
post /errorcode({objectId})/{objectType}/create
This endpoint allows you to post aerror Code.
REST API supports Basic Authentication
URI Parameters
- objectId: required (string)
- objectType: required (string)
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"errorCode": {
"type": "string",
"maxLength": 32,
"description": "User specified errorCode Id."
},
"information": {
"type": "string",
"description": "User provide the information related to errorCode."
},
"failureModeCode": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"errorCode"
]
}Example:
{
"errorCode": "mant_test",
"information": "error code creation",
"failureModeCode": [
"DOP",
"ERO"
]
}HTTP status code 200
Successfully create an error code.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"errorCode": {
"type": "string",
"maxLength": 32,
"description": "User specified errorCode Id."
},
"information": {
"type": "string",
"description": "User provide the information related to errorCode."
},
"failureModeCode": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"errorCode"
]
}Example:
{
"errorCode": "mant_test",
"information": "error code creation",
"failureModeCode": [
"DOP",
"ERO"
]
}/errorcode/update
This endpoint is used to update the errorCode.
put /errorcode/update
This endpoint is used to update the errorCode.
REST API supports Basic Authentication
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"id": {
"type": "string",
"maxLength": 32,
"description": " ErrorCodeID for a model."
},
"errorCode": {
"type": "string",
"maxLength": 32,
"description": " ErrorCode for a model."
},
"information": {
"type": "string",
"maxLength": 32,
"description": " information related to errorCode for a model."
},
"failureMode": {
"type": "array",
"items": {
"type": "object",
"properties": {
"failureModeKey": {
"type": "string"
},
"flag": {
"type": "string"
}
},
"required": [
"failureModeKey",
"flag"
]
}
}
},
"required": [
"id",
"errorCode"
]
}Example:
{
"id": "4723C0ACC2A84927B2A10127EE3996D8",
"errorCode": "mjk",
"information": "",
"failureMode": [
{
"failureModeKey": "FTF",
"flag": "a"
},
{
"failureModeKey": "FTO",
"flag": "a"
},
{
"failureModeKey": "INL",
"flag": "a"
},
{
"failureModeKey": "ERO",
"flag": "ua"
}
]
}HTTP status code 204
Successfully update the error code.
HTTP status code 400
Bad request, when errorcodes mentioned in payload doesn't exists.
/errorCode({objectId})
This end point gives the error codes assigned to the given model Id.
get /errorCode({objectId})
This end point gives the error codes assigned to the given model Id.
REST API supports Basic Authentication
URI Parameters
- objectId: required (string)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"language": {
"type": "string"
},
"errorCode": {
"type": "string"
},
"information": {
"type": "string"
},
"failureModeCode": {
"type": "array",
"items": {}
}
},
"required": [
"id",
"language",
"errorCode",
"information",
"failureModeCode"
]
}
}Example:
[
{
"id": "C4A800DF68274BDDA552B8D0D81D89A6",
"language": "en",
"errorCode": "ER001",
"information": "test",
"failureModeCode": []
},
{
"id": "B29BE3164DB5453A9CA4D31E46CD0B4D",
"language": "en",
"errorCode": "1235324",
"information": "Test Info",
"failureModeCode": [
"HIO",
"LOO",
"SPO"
]
},
{
"id": "476C55D79A754F6591E6EB9F2245B1A0",
"language": "en",
"errorCode": "ER02",
"information": "test",
"failureModeCode": []
},
{
"id": "1B9BD8CCA9C744C08981282570682A59",
"language": "en",
"errorCode": "Er01",
"information": "",
"failureModeCode": [
"DOP",
"ERO",
"ELP"
]
}
]
HTTP status code 400
The request could not be understood by the server due to malformed syntax.You SHOULD NOT repeat the request without modifications.
Body
Type: application/json
Schema:
{
"statusCode": { "type": "integer" },
"errorMessage": { "type": "string" }
}Example:
{
"statusCode": 400,
"errorMessage": "No property "Desc" exists "
}HTTP status code 403
User is not authorized to access the model
HTTP status code 500
Internal Server Error, something unexpected happened.
/errorcode/delete
This endpoint allows you delet the errorCode.
post /errorcode/delete
This endpoint allows you delet the errorCode.
REST API supports Basic Authentication
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"id": {
"type": "array",
"items": {
"type": "object",
"properties": {
"errorCodeID": {
"type": "string"
}
},
"required": [
"errorCodeID"
]
}
}
},
"required": [
"id"
]
}Example:
{
"id": [
{
"errorCodeID": "E1CDCE962F6A46C6A823D2FDEEA7F387"
},
{
"errorCodeID": "FF7CA1EA596F4167A526170DF44328B4"
}
]
}HTTP status code 200
Successfully delete an error code.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"id": {
"type": "array",
"items": {
"type": "object",
"properties": {
"errorCodeID": {
"type": "string"
}
},
"required": [
"errorCodeID"
]
}
}
},
"required": [
"id"
]
}Example:
{
"id": [
{
"errorCodeID": "E1CDCE962F6A46C6A823D2FDEEA7F387"
},
{
"errorCodeID": "FF7CA1EA596F4167A526170DF44328B4"
}
]
}/models/instructions
This endpoint is used to add or remove multiple intructions to or from multiple models.
put /models/instructions
This endpoint is used to add or remove multiple intructions to or from multiple models.
REST API supports Basic Authentication
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-4/schema",
"type": "object",
"additionalProperties": false,
"properties": {
"operation": {
"type": "string",
"enum": [
"add",
"rmv"
],
"description": "The opeation to be performed."
},
"instructionModelIDList": {
"type": "array",
"items": {
"additionalProperties": false,
"properties": {
"instructionID": {
"type": "string",
"maxLength": 32
},
"modelID": {
"type": "string",
"maxLength": 32
}
}
}
}
}
}Example:
{
"operation": "add",
"instructionModelIDList": [{
"instructionID": "91F1ED78D1004098AE3D851D53EB95C8",
"modelID": "68119601D6C8471C99009A179A69475A"
}]
}HTTP status code 204
Successfully publishes the list of model mentioned in the request.
HTTP status code 400
Bad request, when model or intrction mentioned in payload doesn't exists.
/models({modelId})/announcements
Gets all the announcements assigned to the model of specified id.
get /models({modelId})/announcements
Gets all the announcements assigned to the model of specified id.
REST API supports Basic Authentication
URI Parameters
- modelId: required (string)
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-4/schema",
"additionalProperties": false,
"type": "array",
"properties": {
"items": {
"additionalProperties": false,
"properties": {
"announcementID": {
"type": "string",
"maxLength": 32
},
"name": {
"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"
},
"announcementVersion": {
"type": "string"
},
"type": {
"type": "string",
"description": "Announcement type"
},
"priority": {
"type": "string"
},
"status": {
"type": "string"
},
"revision": {
"type": "string"
},
"publishDate": {
"type": "string",
"format": "YYYY-MM-DD"
},
"announcementTypeDescription": {
"type": "string"
},
"priorityDescription": {
"type": "string"
},
"statusDescription": {
"type": "string"
},
"description": {
"type": "string"
}
}
}
}
}Example:
[{
"announcementID": "6B3151F141C24B53A0E7F373AEEBBF7E",
"announcementVersion": "0.0",
"name": "New revision of Sub sea pump model is created",
"internalId": "A.TEDX.490",
"type": "8",
"priority": "1",
"status": "2",
"revision": "null",
"publishDate": "2016-10-17",
"announcementTypeDescription": "Model Information Change",
"priorityDescription": "Low",
"statusDescription": "Published",
"description": "New revision of Sub sea pump model is created"
}]HTTP status code 400
The request could not be understood by the server due to malformed syntax.You SHOULD NOT repeat the request without modifications.
Body
Type: application/json
Schema:
{
"statusCode": { "type": "integer" },
"errorMessage": { "type": "string" }
}Example:
{
"statusCode": 400,
"errorMessage": "No property "Desc" exists "
}HTTP status code 403
User is not authorized to access the model
HTTP status code 500
Internal Server Error, something unexpected happened.
/models({modelId})/spareparts
Gets all the spareparts assigned to the model of specified id.
get /models({modelId})/spareparts
Gets all the spareparts assigned to the model of specified id.
REST API supports Basic Authentication
URI Parameters
- modelId: required (string)
Query Parameters
- status: (string)
Retrieve spareparts based on the status of the model 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-04/schema#",
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"sparepartName": {
"type": "string",
"description": "Name of sparepart. We recommend you to use 'sparepartInternalID' field instead of 'sparepartName' since 'sparepartName' would be deprecated with next release."
},
"sparepartInternalID": {
"type": "string",
"description": "User specified Id. This would replace the 'sparepartName' field with the next release"
},
"manufacturerPartNumber": {
"type": "string"
},
"sparepartDescription": {
"type": "string"
},
"subClass": {
"type": "string"
},
"eanNumber": {
"type": "string"
},
"source": {
"type": "string"
},
"manufacturer": {
"type": "string"
},
"unitOfMeasure": {
"type": "string"
},
"sourceSearchTerms": {
"type": "string"
},
"manufacturerSearchTerms": {
"type": "string"
},
"subClassID": {
"type": "string"
},
"commissioningQuantity": {
"type": "double"
},
"initialQuantity": {
"type": "double"
},
"operationQuantity": {
"type": "double"
},
"quantity": {
"type": "double"
},
"advisedStockQuantity": {
"type": "double"
},
"noOfInstructions": {
"type": "string"
},
"noOfVEDocs": {
"type": "string"
},
"primaryExternalID": {
"type": "string"
},
"sparepartSearchTerms": {
"type": "string"
}
}
}
}Example:
[
{
"id": "57BDE1720A833D6AE10000000A442868",
"sparepartName": "tyre-312fg",
"manufacturerPartNumber": "SP-csv-21",
"sparepartDescription": "sd-new123",
"subClass": "subClassAC",
"eanNumber": "1",
"source": "ubuntu",
"manufacturer": "1112",
"unitOfMeasure": "Mole per cubic meter",
"preview": null,
"sourceSearchTerms": "Ubuntu271,ubuntu,test34,123",
"manufacturerSearchTerms": "1112",
"isSourceActive": 1,
"isManufacturerActive": 1,
"subClassID": "97A6424F9C2D4F38B18CCB671E63BADB",
"commissioningQuantity": "15",
"initialQuantity": "23",
"operationQuantity": "4",
"quantity": "11",
"advisedStockQuantity": "21",
"noOfInstructions": "0",
"noOfVEDocs": "0",
"sparepartInternalID": "tyre-312fg"
},
{
"id": "57B57396725F3D6AE10000000A442868",
"sparepartName": "nutnew",
"manufacturerPartNumber": "SP-new",
"sparepartDescription": "ghjj",
"subClass": "subClassAC",
"eanNumber": "1",
"source": "ubuntu",
"manufacturer": "local",
"unitOfMeasure": "Mole per cubic meter",
"preview": null,
"sourceSearchTerms": "Ubuntu271,ubuntu,test34,123",
"manufacturerSearchTerms": "orgnamemnemo,local,tag003,hello,I1",
"isSourceActive": 1,
"isManufacturerActive": 1,
"subClassID": "97A6424F9C2D4F38B18CCB671E63BADB",
"commissioningQuantity": "15",
"initialQuantity": "9",
"operationQuantity": "10",
"quantity": "12",
"advisedStockQuantity": "2",
"noOfInstructions": "0",
"noOfVEDocs": "0",
"sparepartInternalID": "nutnew"
},
{
"id": "C2BCE717B3A44DD69672E53BDC5ABB16",
"sparepartName": "Part1",
"manufacturerPartNumber": "evev",
"sparepartDescription": "dcd",
"subClass": "Subclass1",
"eanNumber": "",
"source": "ubuntu",
"manufacturer": "1235667",
"unitOfMeasure": "Milligram per liter",
"preview": null,
"sourceSearchTerms": "Ubuntu271,ubuntu,test34,123",
"manufacturerSearchTerms": "1235667",
"isSourceActive": 1,
"isManufacturerActive": 0,
"subClassID": "FFA387A74BAF4049B8FA68A9106B82EC",
"commissioningQuantity": "15",
"initialQuantity": "23",
"operationQuantity": "4",
"quantity": "11",
"advisedStockQuantity": "21",
"noOfInstructions": "0",
"noOfVEDocs": "0",
"sparepartInternalID": "Part1"
}
] HTTP status code 400
The request could not be understood by the server due to malformed syntax.You SHOULD NOT repeat the request without modifications.
Body
Type: application/json
Schema:
{
"statusCode": { "type": "integer" },
"errorMessage": { "type": "string" }
}Example:
{
"statusCode": 400,
"errorMessage": "No property "Desc" exists "
}HTTP status code 403
User is not authorized to access the model
HTTP status code 500
Internal Server Error, something unexpected happened.
/models/spareparts
This endpoint is used to add or remove multiple parts to or from a model.
put /models/spareparts
This endpoint is used to add or remove multiple parts to or from a model.
REST API supports Basic Authentication
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"assigneeID": {
"type": "string",
"description": "Model Id to add/remove the parts."
},
"operation": {
"type": "string",
"enum": ["add", "rmv", "upd"]
},
"partAssignments": {
"type": "array",
"items": {
"type": "object",
"properties": {
"partID": {
"type": "string"
},
"quantity": {
"type": "string"
},
"operationQuantity": {
"type": "string"
},
"commissioningQuantity": {
"type": "string"
},
"initialQuantity": {
"type": "string"
},
"advisedStockQuantity": {
"type": "string"
}
}
}
}
}
}Example:
{
"assigneeID": "4275E0CD8DBA4DAD9E115C8CADD1E79A",
"operation": "add",
"partAssignments": [{
"partID": "85FD564CB51A424A98F0CD742E12E4DE",
"quantity": "3",
"operationQuantity": "0",
"commissioningQuantity": "0",
"initialQuantity": "0",
"advisedStockQuantity": "4"
}]
}HTTP status code 204
Successfully adds the list of parts mentioned in the request.
HTTP status code 400
Bad request, when model or part mentioned in payload doesn't exists.
/models({modelId})/components
Gets list of components attached to model of specified Id.
Updates list of model components.
get /models({modelId})/components
Gets list of components attached to model of specified Id.
REST API supports Basic Authentication
URI Parameters
- modelId: required (string)
Query Parameters
- version: (string)
The model version to retrieve it's components.
- immediate: (string)
Boolean flag. If 'true' will fetch only immediate children and if the value is specfied as 'false' it will fetch all the children.
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-4/schema",
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"type": "string",
"maxLength": 32
},
"name": {
"type": "string",
"maxLength": 256
},
"description": {
"type": "object",
"properties": {
"short": {
"type": "string",
"maxLength": 255,
"description": "Short description"
}
}
},
"status": {
"type": "integer",
"description": "The revision status of the model. Possible values are: 1 - Unpublished, 2 - Published and 3 - In-revision."
},
"version": {
"type": "integer",
"description": "Version of the model."
},
"image": {
"type": "string",
"mediaType": "image/png",
"contentEncoding": "base64"
},
"objectType": {
"type": "string",
"maxLength": 10,
"description": "The object type, MOD - model and PRT - part."
},
"source": {
"type": "string",
"maxLength": 256,
"description": "Name of the organization who owns this object."
},
"hasInrevision": {
"type": "boolean",
"description": "The flag denotes is there a draft version of the model exists or not. Possible values are : 'true' - draft version exists, 'false' - draft version does not exists."
},
"cardinality": {
"type": "integer"
},
"childNodes": {
"type": "array",
"items": {
"$ref": "#"
}
},
"leafNode": {
"type": "boolean",
"description": "This flag indicates that is this model is leaf model in the hierarchy or not."
}
}
}Example:
{
"id": "30254344DCE14F98B38C5E74E695384D",
"name": "Car",
"description": "Car",
"status": 2,
"version": 0.0,
"image": null,
"objectType": "EQU",
"source": "Honda",
"hasInrevision": false,
"cardinality": 0,
"childNodes": [{
"id": "68119601D6C8471C99009A179A69475A",
"name": "Engine",
"description": "Engine",
"status": 2,
"version": 0.0,
"image": null,
"objectType": "EQU",
"source": "Honda",
"hasInrevision": false,
"cardinality": 0,
"childNodes": [{
"id": "4F0FFD42EB6849238F5ECF177AFA0961",
"name": "Cylinder",
"description": "Cylinder",
"status": 2,
"version": 1.0,
"image": null,
"objectType": "EQU",
"source": "Honda",
"hasInrevision": false,
"cardinality": 0,
"childNodes": [],
"leafNode": true
}],
"leafNode": false
}, {
"id": "68119601D6C8471C99009A179A69475A",
"name": "Front wheel",
"description": "Front wheel",
"status": 2,
"version": 0.0,
"image": null,
"objectType": "EQU",
"source": "MRF",
"hasInrevision": false,
"cardinality": 0,
"childNodes": [],
"leafNode": true
}],
"leafNode": false
}HTTP status code 400
The request could not be understood by the server due to malformed syntax.You SHOULD NOT repeat the request without modifications.
HTTP status code 403
User is not authorized to access the model
HTTP status code 500
Internal Server Error, something unexpected happened.
put /models({modelId})/components
Updates list of model components.
REST API supports Basic Authentication
URI Parameters
- modelId: required (string)
Query Parameters
- type: (string)
The object type which need to be assigned to the model. The allowed values are 'MOD', 'PRT', where 'MOD' is model and 'PRT' is part.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-4/schema",
"type": "object",
"additionalProperties": false,
"properties": {
"children": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"type": "string",
"maxLength": 32
},
"cardinality": {
"type": "integer"
}
}
}
}
}
}Example:
{
"children": [{
"id": "68119601D6C8471C99009A179A69475A",
"cardinality": 2
}, {
"id": "4F0FFD42EB6849238F5ECF177AFA0961",
"cardinality": 1
}]
}HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-4/schema",
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"type": "string",
"maxLength": 32
},
"name": {
"type": "string",
"maxLength": 256
},
"description": {
"type": "object",
"properties": {
"short": {
"type": "string",
"maxLength": 255,
"description": "Short description"
}
}
},
"status": {
"type": "integer",
"description": "The revision status of the model. Possible values are: 1 - Unpublished, 2 - Published and 3 - In-revision."
},
"version": {
"type": "integer",
"description": "Version of the model."
},
"image": {
"type": "string",
"mediaType": "image/png",
"contentEncoding": "base64"
},
"objectType": {
"type": "string",
"maxLength": 10,
"description": "The object type, MOD - model and PRT - part."
},
"source": {
"type": "string",
"maxLength": 256,
"description": "Name of the organization who owns this object."
},
"hasInrevision": {
"type": "boolean",
"description": "The flag denotes is there a draft version of the model exists or not. Possible values are : 'true' - draft version exists, 'false' - draft version does not exists."
},
"cardinality": {
"type": "integer"
},
"childNodes": {
"type": "array",
"items": {
"$ref": "#"
}
},
"leafNode": {
"type": "boolean",
"description": "This flag indicates that is this model is leaf model in the hierarchy or not."
}
}
}Example:
{
"id": "30254344DCE14F98B38C5E74E695384D",
"name": "Car",
"description": "Car",
"status": 2,
"version": 0.0,
"image": null,
"objectType": "EQU",
"source": "Honda",
"hasInrevision": false,
"cardinality": 0,
"childNodes": [{
"id": "68119601D6C8471C99009A179A69475A",
"name": "Engine",
"description": "Engine",
"status": 2,
"version": 0.0,
"image": null,
"objectType": "EQU",
"source": "Honda",
"hasInrevision": false,
"cardinality": 0,
"childNodes": [{
"id": "4F0FFD42EB6849238F5ECF177AFA0961",
"name": "Cylinder",
"description": "Cylinder",
"status": 2,
"version": 1.0,
"image": null,
"objectType": "EQU",
"source": "Honda",
"hasInrevision": false,
"cardinality": 0,
"childNodes": [],
"leafNode": true
}],
"leafNode": false
}, {
"id": "68119601D6C8471C99009A179A69475A",
"name": "Front wheel",
"description": "Front wheel",
"status": 2,
"version": 0.0,
"image": null,
"objectType": "EQU",
"source": "MRF",
"hasInrevision": false,
"cardinality": 0,
"childNodes": [],
"leafNode": true
}],
"leafNode": false
}HTTP status code 400
The request could not be understood by the server due to malformed syntax.You SHOULD NOT repeat the request without modifications.
HTTP status code 403
User is not authorized to update the model
HTTP status code 500
Internal Server Error, something unexpected happened.
/organizations
This endpoint will get all organizations in the system.
get /organizations
This endpoint will get all organizations in the system.
REST API supports Basic Authentication
Query Parameters
- $filter: (string)
You can filter the organizations based on the name to get specific organization. For example - /organizations?$filter=substringof('SAP', name ) eq true
HTTP status code 200
Successfully retrieves list of organizations.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"javaType": "com.sap.iot.ain.gen.equipments.EquipmentHeader",
"type": "object",
"properties": {
"id": {
"type": "string",
"maxLength": 32,
"description": "ID of the organization"
},
"name": {
"type": "string",
"maxLength": 255,
"description": "Name of the organization"
},
"image": {
"type": "string",
"mediaType": "image/png",
"contentEncoding": "base64"
}
}
}Example:
[{
"id": "D7E24DDB3CD6492A911286470B6B3218",
"name": "Ariba India",
"image": null
}, {
"id": "03EB9804CCCB4A7D8E3B78D2B13497E1",
"name": "Company",
"image": null
}]HTTP status code 404
Not Found
/organizations/byrole
This endpoint will get organizations with specific role in the system.
get /organizations/byrole
This endpoint will get organizations with specific role in the system.
REST API supports Basic Authentication
Query Parameters
- roleid: (string)
specific role id to get organization of that role. Role IDs are, 1 - Manufacturer 2 - Service Provider 3 - Operator 4 - Supplier / Dealer 5 - Insurer 6 - Regulator / Authority 7 - Software Partner / Content Partner
- $filter: (string)
You can filter the organizations based on the name to get specific organization. For example - /organizations?$filter=substringof('SAP', name ) eq true
/organizations/$count
This endpoint will get the count of all organizations in the system.
get /organizations/$count
This endpoint will get the count of all organizations in the system.
REST API supports Basic Authentication
/enumeration
This api will allow you to get the enumeration values. For example /enumration?type=EquipmentTracking&type=EquipmentSafetyRisk
get /enumeration
This api will allow you to get the enumeration values. For example /enumration?type=EquipmentTracking&type=EquipmentSafetyRisk
REST API supports Basic Authentication
Query Parameters
- type: (string)
The type of the enumration. User can specify multiple enumeration types.
HTTP status code 200
Body
Type: application/json
Example:
{
"EquipmentSafetyRisk": [{
"type": "EquipmentSafetyRisk",
"code": "1",
"languageIsoCode": "en",
"description": "Minor"
}, {
"type": "EquipmentSafetyRisk",
"code": "2",
"languageIsoCode": "en",
"description": "Moderate"
}, {
"type": "EquipmentSafetyRisk",
"code": "3",
"languageIsoCode": "en",
"description": "Severe"
}, {
"type": "EquipmentSafetyRisk",
"code": "4",
"languageIsoCode": "en",
"description": "Catastrophic"
}]
}HTTP status code 400
The request could not be understood by the server due to malformed syntax.You SHOULD NOT repeat the request without modifications.
HTTP status code 403
User is not authorized to access the end point.
HTTP status code 500
Internal Server Error, something unexpected happened.
/enumerationvalue
This api will allow you to get a particular value of an enumeration type. For example /enumration?type=EquipmentSafetyRisk&code=1
get /enumerationvalue
This api will allow you to get a particular value of an enumeration type. For example /enumration?type=EquipmentSafetyRisk&code=1
REST API supports Basic Authentication
Query Parameters
- type: (string)
The type of the enumration.
- code: (string)
The enumeration code for the specified type.
HTTP status code 200
Body
Type: application/json
Example:
{
"type": "EquipmentSafetyRisk",
"code": "1",
"languageIsoCode": "en",
"description": "Minor"
}HTTP status code 400
The request could not be understood by the server due to malformed syntax.You SHOULD NOT repeat the request without modifications.
HTTP status code 403
User is not authorized to access the end point.
HTTP status code 500
Internal Server Error, something unexpected happened.
/models/attributeSearch
This api will allow you to search a model based on its attributes values. It accepts a key value, where Key is the internal attribute ID and the value is the String Value or Enum Value depending on the attribute type. It will accept multiple pairs of attribute ID and Values seperated by "and" operator. Currently only "AND" operation is supported. For example /attributeSearch?$filter=CEC3DFF4634C492788AF479894AE4113 eq '266'
get /models/attributeSearch
This api will allow you to search a model based on its attributes values. It accepts a key value, where Key is the internal attribute ID and the value is the String Value or Enum Value depending on the attribute type. It will accept multiple pairs of attribute ID and Values seperated by "and" operator. Currently only "AND" operation is supported. For example /attributeSearch?$filter=CEC3DFF4634C492788AF479894AE4113 eq '266'
REST API supports Basic Authentication
HTTP status code 200
Body
Type: application/json
Example:
[
{
"objectID": "06CFF9B05E83414596B5E1B4BF2DDF4A",
"objectName": "Model-001",
"objectVersion": "0",
"objectType": "MOD"
},
{
"objectID": "5E230BBE7B35426A8BF3FBAA24240D60",
"objectName": "Model-002",
"objectVersion": "0",
"objectType": "MOD"
},
{
"objectID": "E4EF5E63E545414994CD304150C6A90A",
"objectName": "Model-003",
"objectVersion": "0",
"objectType": "MOD"
}
]HTTP status code 400
The request could not be understood by the server due to malformed syntax.You SHOULD NOT repeat the request without modifications.
HTTP status code 403
User is not authorized to access the end point.
HTTP status code 500
Internal Server Error, something unexpected happened.