Change Management System Instance API

Change Management System Instance API

Authentication - Use Basic Authentication for this API.

Change management system - (Service Now)

Property Name

Type

Required

Example Property Value

Property Name

Type

Required

Example Property Value

SN_USER_NAME

String

Yes

username

SN_PASSWORD

String

Yes

password

SN_PORT

Integer

Yes

1234

SN_APPROVED_SCRIPT

String

No

/rest/api/2/issue/{JIRA_ISSUE}

SN_REJECTED_SCRIPT

String

No

/browse/{JIRA_ISSUE}

SN_DONT_POLL

Boolean

No



SN_URL

String

Yes

http://myjira.atlassian.net

GET

There are two implementations of GET. One will find an Change Management System with the given Id and return the JSON representation of the Change Management System. The other will find a list of Change Management Systems matching the parameters supplied to it.

GET by ID

This GET service will find a Change Management System with the given Id and return the JSON representation of the object.

API URL

http://host:port/flexdeploy/rest/v1/topology/integrations/cmsinstance/{Id}

Request

Parameter

Required

Type

Description

Parameter

Required

Type

Description

Id

Yes

URL

URL parameter for the Id which is used to find and return a Change Management System

Response

Attributes
Type
Description
instanceIdIntegerPrimary ID of the Change Management System, created when first making a Change Management System.
instanceCodeStringThe code of the Change Management System.
instanceNameStringThe name of the Change Management System.
cmsSystemIdIntegerThe ID of the type of Change Management System.
descriptionStringThe description of the Change Management System.
isActiveBooleanWhether or not this Change Management System is active. Defaults to true.
propertiesList<PropertyValue>The properties associated with the type of Change Management System: requirements depend on the Change Management System selected.

Each JSON CMS instance object contains a list of property value. The property value object has these attributes.

AttributesTypeDescription
propertyNameStringThis is the name of the property
propertyValueStringThis is the value of the property
credentialIdLongId of the credential associated with the property. Applicable only for encrypted properties

Response Codes

HTTP Code

Description

HTTP Code

Description

200

Change Management System Instance was found and returned

400

Bad request

401

Authentication failure

403

Authorization failure (no access to resource)

404

Change Management System Instance not found

500

Unexpected internal server error

Example

If we had a Change Management System in our database with an Id of 11101 with the following attributes

Change Management System - 11101
{ "instanceId": 11101, "instanceCode": "CMS Code", "instanceName": "CMS Name", "cmsSystemId": 1, "description": "CMS example", "isActive": true, "properties": [ { "propertyName": "SN_PASSWORD", "propertyValue": "ThePassword", "credentialId": 76592 }, { "propertyName": "SN_PORT", "propertyValue": 1234, "credentialId": null }, { "propertyName": "SN_REJECTED_SCRIPT", "propertyValue": "rejectedScript.bat", "credentialId": null }, { "propertyName": "SN_APPROVED_SCRIPT", "propertyValue": "approvedScript.bat", "credentialId": null }, { "propertyName": "SN_DONT_POLL", "propertyValue": true, "credentialId": null }, { "propertyName": "SN_URL", "propertyValue": "http://myServiceNow.atlassian.net", "credentialId": null }, { "propertyName": "SN_USER_NAME", "propertyValue": "username", "credentialId": null } ] }

When we run a GET request at the following URL: http://host:port/flexdeploy/rest/v1/topology/integrations/cmsinstance/11101

The GET request would return the following JSON Change Management System object

Change Management System - 11101
{ "instanceId": 11101, "instanceCode": "CMS Code", "instanceName": "CMS Name", "cmsSystemId": 1, "description": "CMS example", "isActive": true, "properties": [ { "propertyName": "SN_PASSWORD", "propertyValue": "*****", "credentialId": 76592 }, { "propertyName": "SN_PORT", "propertyValue": 1234, "credentialId": null }, { "propertyName": "SN_REJECTED_SCRIPT", "propertyValue": "rejectedScript.bat", "credentialId": null }, { "propertyName": "SN_APPROVED_SCRIPT", "propertyValue": "approvedScript.bat", "credentialId": null }, { "propertyName": "SN_DONT_POLL", "propertyValue": true, "credentialId": null }, { "propertyName": "SN_URL", "propertyValue": "http://myServiceNow.atlassian.net", "credentialId": null }, { "propertyName": "SN_USER_NAME", "propertyValue": "username", "credentialId": null } ] }

GET (Using Query Parameters)

This GET service will return a list of Change Management Systems in the form of JSON objects based on the query parameters code, name, and Change Management System type. Change Management Systems are only returned if they match ALL of the specified query parameters. If no query parameters are given this request will return the entire list of Change Management Systems.

API URL

http://host:port/flexdeploy/rest/v1/topology/integrations/cmsinstance?

Append the following character sequences to the above URL to specify Query parameters.
Use '&' between successive query parameters: 

instanceCode={code}

instanceName={name}

cmsSystemName={cmssystemname}

Examples:
To specify the code parameter only:

http://host:port/flexdeploy/rest/v1/topology/integrations/cmsinstance?instanceCode={code}

To specify the code and name parameters:

http://host:port/flexdeploy/rest/v1/topology/integrations/cmsinstance?instanceCode={code}&instanceName={name}

To specify the issue tracking system name only:

http://host:port/flexdeploy/rest/v1/topology/integrations/cmsinstance?cmsSystemName={cmssystemName}

The following macros are not currently supported in the footer:
  • style