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 is secured by OAuth 2.0 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",
"id": "http://dimension-schema.assessment-template.aspm.sap.json",
"type": "array",
"title": "The dimension list schema",
"description": "The List of dimensions available in the system",
"additionalItems": true,
"items": {
"id": "#/items",
"type": "object",
"title": "The dimension object",
"description": "Details of the dimension",
"required": [
"ID",
"DisplayID",
"Status"
],
"properties": {
"ID": {
"id": "#/items/properties/ID",
"type": "string",
"title": "The ID schema",
"examples": [
"787D7EF5CEA24FE89A634CD8227251F2"
]
},
"DisplayID": {
"id": "#/items/properties/DisplayID",
"type": "string",
"title": "The DisplayID schema",
"examples": [
"DM.TGSV.1369"
]
},
"ScaleID": {
"id": "#/items/properties/ScaleID",
"type": "string",
"title": "The ScaleID schema",
"examples": [
"BEF39417DEC24EAE86BFEFA58D6A5FB3"
]
},
"ShortDescription": {
"id": "#/items/properties/ShortDescription",
"type": "string",
"title": "The ShortDescription schema",
"examples": [
"ASPM_AUT_SEL_DIMENSION TWO"
]
},
"LongDescription": {
"id": "#/items/properties/LongDescription",
"type": "string",
"title": "The LongDescription schema",
"examples": [
"ASPM_AUT_SEL_DIMENSION TWO LONG DESCRIPTION"
]
},
"QuestionText": {
"id": "#/items/properties/QuestionText",
"type": "string",
"title": "The QuestionText schema",
"examples": [
"Question text for ASPM_AUT_SEL_DIMENSION TWO"
]
},
"QuestionDescription": {
"id": "#/items/properties/QuestionDescription",
"type": "string",
"title": "The QuestionDescription schema",
"examples": [
"Question Description for ASPM_AUT_SEL_DIMENSION TWO"
]
},
"ScaleDisplayID": {
"id": "#/items/properties/ScaleDisplayID",
"type": "string",
"title": "The ScaleDisplayID schema",
"examples": [
"SC.TGSV.1326"
]
},
"ScaleName": {
"id": "#/items/properties/ScaleName",
"type": "null",
"title": "The ScaleName schema",
"examples": [
"1-5 scale"
]
},
"ScaleType": {
"id": "#/items/properties/ScaleType",
"type": "string",
"title": "The ScaleType schema",
"examples": [
"1"
]
},
"ScaleUOM": {
"id": "#/items/properties/ScaleUOM",
"type": "null",
"title": "The ScaleUOM schema",
"examples": [
"1"
]
},
"ScalePublishDate": {
"id": "#/items/properties/ScalePublishDate",
"type": "string",
"title": "The ScalePublishDate schema",
"examples": [
"2020-08-07"
]
},
"ScaleShortDescription": {
"id": "#/items/properties/ScaleShortDescription",
"type": "string",
"title": "The ScaleShortDescription schema",
"examples": [
"_AUT_SEL_SCALE_ASPM"
]
},
"ScaleLongDescription": {
"id": "#/items/properties/ScaleLongDescription",
"type": "string",
"title": "The ScaleLongDescription schema",
"examples": [
"_AUT_SEL_SCALE LONG DESCRIPTION_ASPM"
]
},
"Status": {
"id": "#/items/properties/Status",
"type": "string",
"title": "The Status schema",
"examples": [
"1"
]
},
"LastChangeDateTime": {
"id": "#/items/properties/LastChangeDateTime",
"type": "string",
"title": "The LastChangeDateTime schema",
"examples": [
"2020-08-07"
]
},
"MinScaleOptionsValue": {
"id": "#/items/properties/MinScaleOptionsValue",
"type": "string",
"title": "The MinScaleOptionsValue schema",
"examples": [
"1.0"
]
},
"MaxScaleOptionsValue": {
"id": "#/items/properties/MaxScaleOptionsValue",
"type": "string",
"title": "The MaxScaleOptionsValue schema",
"examples": [
"2.0"
]
},
"ScaleOptionCount": {
"id": "#/items/properties/ScaleOptionCount",
"type": "string",
"title": "The ScaleOptionCount schema",
"examples": [
"2"
]
},
"HasDependentObjects": {
"id": "#/items/properties/HasDependentObjects",
"type": "string",
"title": "The HasDependentObjects schema",
"examples": [
"0"
]
}
},
"additionalProperties": false
}
}Example:
[
{
"ID": "787D7EF5CEA24FE89A634CD8227251F2",
"DisplayID": "DM.TGSV.1369",
"ScaleID": "BEF39417DEC24EAE86BFEFA58D6A5FB3",
"ShortDescription": "ASPM_AUT_SEL_DIMENSION TWO",
"LongDescription": "ASPM_AUT_SEL_DIMENSION TWO LONG DESCRIPTION",
"QuestionText": "Question text for ASPM_AUT_SEL_DIMENSION TWO",
"QuestionDescription": "Question Description for ASPM_AUT_SEL_DIMENSION TWO",
"ScaleDisplayID": "SC.TGSV.1326",
"ScaleName": null,
"ScaleType": "1",
"ScaleUOM": null,
"ScalePublishDate": "2020-08-07",
"ScaleShortDescription": "_AUT_SEL_SCALE_ASPM",
"ScaleLongDescription": "_AUT_SEL_SCALE LONG DESCRIPTION_ASPM",
"Status": "1",
"LastChangeDateTime": "2020-08-07",
"MinScaleOptionsValue": "1.0",
"MaxScaleOptionsValue": "2.0",
"ScaleOptionCount": "2",
"HasDependentObjects": "0"
}
]HTTP status code 400
Not Found
Secured by OAuth 2.0
post /dimensions
This endpoint allows you to create a Dimension.
REST API is secured by OAuth 2.0 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 OAuth 2.0
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 is secured by OAuth 2.0 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 OAuth 2.0
delete /dimensions/{id}
This endpoint allows you to delete the specified unpublished risk assessment.
REST API is secured by OAuth 2.0 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
}