ASPM Dimension API documentation version v1
Application_URL/services/api/v1/aspm
ASPM Dimension
About ASPM Dimension
Dimensions are used to define assessment template based on which the assessment is done.
Purpose
This API allows you to create, update, retrieve and delete Dimensions.
/dimensions
This endpoint allows you to get list of Dimensions.
This endpoint allows you to create a Dimension.
get /dimensions
This endpoint allows you to get list of Dimensions.
REST API supports Basic Authentication.
Query Parameters
- $filter: required (string)
Retrieves dimensions based on the value provided. This parameter follows ODATA URL covention. For eg $filter=(substringof('SAP', OrganizationName) eq true)
HTTP status code 200
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "array",
"items": [
{
"type": "object",
"properties": {
"ID": {
"type": "string"
},
"DisplayID": {
"type": "string"
},
"ScaleID": {
"type": "string"
},
"Status": {
"type": "string"
},
"Client": {
"type": "string"
},
"CreatedBy": {
"type": "string"
},
"LastChangeDateTime": {
"type": "string"
},
"Name": {
"type": "null"
},
"ShortDescription": {
"type": "string"
},
"LongDescription": {
"type": "null"
},
"QuestionText": {
"type": "string"
},
"QuestionDescription": {
"type": "null"
},
"ScaleDisplayID": {
"type": "string"
},
"ScaleName": {
"type": "null"
},
"ScaleType": {
"type": "integer"
},
"ScaleUOM": {
"type": "null"
},
"ScalePublishDate": {
"type": "string"
},
"ScaleShortDescription": {
"type": "string"
},
"ScaleLongDescription": {
"type": "string"
},
"MinScaleOptionsValue": {
"type": "number"
},
"MaxScaleOptionsValue": {
"type": "number"
},
"ScaleOptionCount": {
"type": "integer"
},
"LogoUrl": {
"type": "string"
},
"OrganizationName": {
"type": "string"
},
"HasDependentObjects": {
"type": "integer"
}
},
"required": [
"ID",
"DisplayID",
"ScaleID",
"Status",
"Client",
"CreatedBy",
"LastChangeDateTime",
"Name",
"ShortDescription",
"LongDescription",
"QuestionText",
"QuestionDescription",
"ScaleDisplayID",
"ScaleName",
"ScaleType",
"ScaleUOM",
"ScalePublishDate",
"ScaleShortDescription",
"ScaleLongDescription",
"MinScaleOptionsValue",
"MaxScaleOptionsValue",
"ScaleOptionCount",
"LogoUrl",
"OrganizationName",
"HasDependentObjects"
]
}
]
}Example:
[
{
"ID": "070DA588869D4D82BEB3492406825328",
"DisplayID": "DM.TEDX.108",
"ScaleID": "C758A435EC63411FAFFEEF7E391F8264",
"Status": "0",
"Client": "B283596BA46740CFAF1DDB4007707CC1",
"CreatedBy": "B283596BA46740CFAF1DDB4007707CC1",
"LastChangeDateTime": "2017-10-31",
"Name": null,
"ShortDescription": "afdsdf",
"LongDescription": null,
"QuestionText": "asdfsdf",
"QuestionDescription": null,
"ScaleDisplayID": "SC.TEDX.158",
"ScaleName": null,
"ScaleType": 1,
"ScaleUOM": null,
"ScalePublishDate": "2017-10-09",
"ScaleShortDescription": "test_scale",
"ScaleLongDescription": "test_scale",
"MinScaleOptionsValue": 10.0,
"MaxScaleOptionsValue": 30.0,
"ScaleOptionCount": 3,
"LogoUrl": "DC2DE2D7FB8B40569EBECDD6718063AD",
"OrganizationName": "SAP Operator_edited_halo",
"HasDependentObjects": 0
},
{
"ID": "D7E6B6A0596B40C09770FB35B1A98A15",
"DisplayID": "DM.TEDX.107",
"ScaleID": "15AEE93DC8B843F9B0604B2AC872E6F0",
"Status": "1",
"Client": "B283596BA46740CFAF1DDB4007707CC1",
"CreatedBy": "B283596BA46740CFAF1DDB4007707CC1",
"LastChangeDateTime": "2017-10-31",
"Name": null,
"ShortDescription": "asdfsafd",
"LongDescription": null,
"QuestionText": "asdfwef",
"QuestionDescription": null,
"ScaleDisplayID": "SC.TEDX.157",
"ScaleName": null,
"ScaleType": 1,
"ScaleUOM": null,
"ScalePublishDate": "2017-10-09",
"ScaleShortDescription": "test_scale",
"ScaleLongDescription": "test_scale",
"MinScaleOptionsValue": 10.0,
"MaxScaleOptionsValue": 30.0,
"ScaleOptionCount": 3,
"LogoUrl": "DC2DE2D7FB8B40569EBECDD6718063AD",
"OrganizationName": "SAP Operator_edited_halo",
"HasDependentObjects": 0
}
]HTTP status code 400
Not Found
Secured by basic
post /dimensions
This endpoint allows you to create a Dimension.
REST API supports Basic Authentication.
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"definitions": {},
"id": "http://example.com/example.json",
"properties": {
"description":{
"type":[
"object",
"null"
],
"properties":{
"short":{
"type":"string"
},
"long":{
"type":"string"
}
},
"required":[
"short"
]
},
"descriptions":{
"type":[
"array",
"null"
],
"description":"The list of all descriptions in different languages in which description needs to be maintained. The API will perform a complete refresh of the list descriptions",
"items":{
"type":"object",
"properties":{
"language":{
"type":"string",
"maxLength":2,
"description":"Language in which description is present."
},
"short":{
"type":"string",
"maxLength":255,
"description":"Short description"
},
"long":{
"type":"string",
"maxLength":5000,
"description":"Long description"
}
}
}
},
"questionDescription": {
"id": "/properties/questionDescription",
"type": "string"
},
"questionText": {
"id": "/properties/questionText",
"type": "string"
},
"scaleId": {
"id": "/properties/scaleId",
"type": "string"
},
"status": {
"id": "/properties/status",
"type": "integer"
}
},
"type": "object",
"required":[
"status",
"scaleId",
"questionText"
],
"anyOf":[
{
"required":[
"description"
]
},
{
"required":[
"descriptions"
]
}
]
}Example:
{
"description": {
"short": "Example Dimension",
"long": "Example Dimension Example Dimension"
},
"scaleId": "E1593757B8354DF2BEF24D3F1835B4EB",
"questionText": "Example Question",
"questionDescription": "Example Question for Dimension",
"status": 0
}HTTP status code 200
Successfully creates a Dimension.
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"definitions": {},
"id": "http://example.com/example.json",
"properties": {
"id": {
"description": "A system generated 32 bit ID which is unique for the created risk assessment.",
"id": "/properties/id",
"maxLength": 32,
"minLength": 32,
"type": "string"
},
"status": {
"id": "/properties/status",
"type": "boolean"
}
},
"type": "object"
}Example:
{
"id": "3A1606CE91DF41639CE9979554D0469E",
"status": true
}HTTP status code 400
Not Found
Secured by basic
This endpoint allows you to update an unpublished Dimension.
This endpoint allows you to delete the specified unpublished risk assessment.
put /dimensions/{id}
This endpoint allows you to update an unpublished Dimension.
REST API supports Basic Authentication.
URI Parameters
- id: required (string)
Dimension ID. Generated by server, used as read-only.
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"definitions": {},
"id": "http://example.com/example.json",
"properties": {
"description":{
"type":[
"object",
"null"
],
"properties":{
"short":{
"type":"string"
},
"long":{
"type":"string"
}
},
"required":[
"short"
]
},
"descriptions":{
"type":[
"array",
"null"
],
"description":"The list of all descriptions in different languages in which description needs to be maintained. The API will perform a complete refresh of the list descriptions",
"items":{
"type":"object",
"properties":{
"language":{
"type":"string",
"maxLength":2,
"description":"Language in which description is present."
},
"short":{
"type":"string",
"maxLength":255,
"description":"Short description"
},
"long":{
"type":"string",
"maxLength":5000,
"description":"Long description"
}
}
}
},
"questionDescription": {
"id": "/properties/questionDescription",
"type": "string"
},
"questionText": {
"id": "/properties/questionText",
"type": "string"
},
"scaleId": {
"id": "/properties/scaleId",
"type": "string"
},
"status": {
"id": "/properties/status",
"type": "integer"
}
},
"type": "object",
"required":[
"status",
"scaleId",
"questionText"
],
"anyOf":[
{
"required":[
"description"
]
},
{
"required":[
"descriptions"
]
}
]
}Example:
{
"description": {
"short": "Example Dimension",
"long": "Example Dimension Example Dimension"
},
"scaleId": "E1593757B8354DF2BEF24D3F1835B4EB",
"questionText": "Example Question",
"questionDescription": "Example Question for Dimension",
"status": 0
}HTTP status code 200
Successfully updates a Dimension.
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"definitions": {},
"id": "http://example.com/example.json",
"properties": {
"id": {
"description": "A system generated 32 bit ID which is unique for the created risk assessment.",
"id": "/properties/id",
"maxLength": 32,
"minLength": 32,
"type": "string"
},
"status": {
"id": "/properties/status",
"type": "boolean"
}
},
"type": "object"
}Example:
{
"id": "3A1606CE91DF41639CE9979554D0469E",
"status": true
}HTTP status code 400
Not Found
Secured by basic
delete /dimensions/{id}
This endpoint allows you to delete the specified unpublished risk assessment.
REST API supports Basic Authentication.
URI Parameters
- id: required (string)
Dimension ID. Generated by server, used as read-only.
HTTP status code 200
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"definitions": {},
"id": "http://example.com/example.json",
"properties": {
"id": {
"description": "A system generated 32 bit ID which is unique for the created risk assessment.",
"id": "/properties/id",
"maxLength": 32,
"minLength": 32,
"type": "string"
},
"status": {
"id": "/properties/status",
"type": "boolean"
}
},
"type": "object"
}Example:
{
"id": "3A1606CE91DF41639CE9979554D0469E",
"status": true
}