Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 8 Next »

Base URL for Change Management System Instance REST API

http://host:port/flexdeploy/rest/integrations/changemanagement

Each function returns a JSON Issue Tracking System object. An Issue Tracking System object has these attributes:

Attributes
Type
Description
Instance IdIntegerPrimary ID of the Change Management System, created when first making a Change Management System.
Instance CodeStringThe code of the Change Management System.
Instance NameStringThe name of the Change Management System.
Change Management System IDIntegerThe 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<Property>The properties associated with the type of Change Management System: requirements depend on the Change Management System selected.

Change management system ID: 1 (Service Now)

Property NameTypeRequiredExample Property Value
SN_USER_NAMEStringYesusername
SN_PASSWORD*StringYespassword
SN_PORTIntegerYes1234
SN_APPROVED_SCRIPTStringNO/rest/api/2/issue/{JIRA_ISSUE}
SN_REJECTED_SCRIPTStringNO/browse/{JIRA_ISSUE}
SN_DONT_POLLBooleanNO
SN_URLStringYeshttp://myjira.atlassian.net

Back to Top


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/topology/integrations/changemanagement/{Id}

Parameters

Parameter
Required
Type
Description
IdYesURLURL parameter for the Id which is used to find and return a Change Management System

Response Codes

HTTP Code
Description
200Change Management System Instance was found and returned
400Bad request
401Unauthorized
404Change Management System Instance not found
500Unexpected 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"
		},
		{
			"propertyName": "SN_PORT",
			"propertyValue": "1234"
		},
		{
			"propertyName": "SN_REJECTED_SCRIPT",
			"propertyValue": "rejectedScript.bat"
		},
		{
			"propertyName": "SN_APPROVED_SCRIPT",
			"propertyValue": "approvedScript.bat"
		},
		{
			"propertyName": "SN_DONT_POLL",
			"propertyValue": "true"
		},
		{
			"propertyName": "SN_URL",
			"propertyValue": "http://myServiceNow.atlassian.net"
		},
		{
			"propertyName": "SN_USER_NAME",
			"propertyValue": "username"
		}
	]
}

When we run a GET request at the following URL

http://host:port/flexdeploy/rest/topology/integrations/changemanagement/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": "*****"
		},
		{
			"propertyName": "SN_PORT",
			"propertyValue": "1234"
		},
		{
			"propertyName": "SN_REJECTED_SCRIPT",
			"propertyValue": "rejectedScript.bat"
		},
		{
			"propertyName": "SN_APPROVED_SCRIPT",
			"propertyValue": "approvedScript.bat"
		},
		{
			"propertyName": "SN_DONT_POLL",
			"propertyValue": "true"
		},
		{
			"propertyName": "SN_URL",
			"propertyValue": "http://myServiceNow.atlassian.net"
		},
		{
			"propertyName": "SN_USER_NAME",
			"propertyValue": "username"
		}
	]
}

Back to Top


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/topology/integrations/changemanagement?

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/topology/integrations/changemanagement?instanceCode={code}

To specify the code and name parameters:

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

To specify the issue tracking system name only:

http://host:port/flexdeploy/rest/topology/integrations/changemanagement?cmssystemName={cmssystemName}


The query parameters are not case sensitive. Searching by instanceName=NAME is the same as searching by instanceName=name.

Parameters

Parameter
Type
Required
Description
instanceCodeURLNoThis is a URL query parameter for the instance code which is used to search the change management systems.
instanceNameURLNoThis is a URL query parameter for the instance name which is used to search the change management systems.
cmssystemNameURLNoThis is a URL query parameter for the change management system name which is used to search the change management systems.

Response Codes

HTTP Code
Description
200Change Management System Instances were found and returned
400Bad request
401Unauthorized
500Unexpected internal server error

Example

If we had 2 Change Management System Instancse with Ids of 11101 and 11107 with the following attributes.

Output when the Group Code was made "Group" through http://host:port/flexdeploy/rest/topology/integrations/changemanagement?instanceName=CMSName

Change Management System - 11101
[
	{
		"instanceId": 11101,
		"instanceCode": "CMSCODE",
		"instanceName": "CMSName",
		"cmssystemId": 1,
		"description": "CMS example",
		"isActive": true,
		"properties":
		[
			{
				"propertyName": "SN_PASSWORD",
				"propertyValue": "ThePassword1"
			},
			{
				"propertyName": "SN_PORT",
				"propertyValue": "1234"
			},
			{	
				"propertyName": "SN_REJECTED_SCRIPT",
				"propertyValue": "rejectedScript.bat"
			},
			{
				"propertyName": "SN_APPROVED_SCRIPT",
				"propertyValue": "approvedScript.bat"
			},
			{
				"propertyName": "SN_DONT_POLL",
				"propertyValue": "true"
			},
			{
				"propertyName": "SN_URL",
				"propertyValue": "http://myServiceNow.atlassian.net"
			},
			{
				"propertyName": "SN_USER_NAME",
				"propertyValue": "username"
			}
		]
	},
	{
		"instanceId": 11107,
		"instanceCode": "CMSCODE2",
		"instanceName": "CMSName2",
		"cmssystemId": 1,
		"description": "the second CMS example",
		"isActive": true,
		"properties":
		[
			{
				"propertyName": "SN_PASSWORD",
				"propertyValue": "ThePassword2"
			},
			{
				"propertyName": "SN_PORT",
				"propertyValue": "9876"
			},
			{	
				"propertyName": "SN_REJECTED_SCRIPT",
				"propertyValue": "rejectedScript2.bat"
			},
			{
				"propertyName": "SN_APPROVED_SCRIPT",
				"propertyValue": "approvedScript2.bat"
			},
			{
				"propertyName": "SN_DONT_POLL",
				"propertyValue": "true"
			},
			{
				"propertyName": "SN_URL",
				"propertyValue": "http://myServiceNow2.atlassian.net"
			},
			{
				"propertyName": "SN_USER_NAME",
				"propertyValue": "username2"
			}
		]
	}
]

When we run a GET request at the following URL

http://host:port/flexdeploy/rest/topology/integrations/changemanagement?instanceName=CMSName

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

Change Management System - 11101
[
	{
		"instanceId": 11101,
		"instanceCode": "CMSCODE",
		"instanceName": "CMSName",
		"cmssystemId": 1,
		"description": "CMS example",
		"isActive": true,
		"properties":
		[
			{
				"propertyName": "SN_PASSWORD",
				"propertyValue": "ThePassword1"
			},
			{
				"propertyName": "SN_PORT",
				"propertyValue": "1234"
			},
			{	
				"propertyName": "SN_REJECTED_SCRIPT",
				"propertyValue": "rejectedScript.bat"
			},
			{
				"propertyName": "SN_APPROVED_SCRIPT",
				"propertyValue": "approvedScript.bat"
			},
			{
				"propertyName": "SN_DONT_POLL",
				"propertyValue": "true"
			},
			{
				"propertyName": "SN_URL",
				"propertyValue": "http://myServiceNow.atlassian.net"
			},
			{
				"propertyName": "SN_USER_NAME",
				"propertyValue": "username"
			}
		]
	}
]

POST

The POST service will create a new change management system with the same attributes as the given JSON object. 

API URL

http://host:port/flexdeploy/rest/topology/integrations/changemanagement

Parameters

Attributes
Type
Required
Description
Instance IdIntegerNoPrimary ID of the Change Management System, created when first making a Change Management System.
Instance CodeStringYesThe code of the Change Management System. Must be Unique
Instance NameStringYesThe name of the Change Management System. Must be Unique.
Change Management System IDIntegerYesThe ID of the type of Change Management System.
DescriptionStringNoThe description of the Change Management System.
isActiveBooleanNoWhether or not this Change Management System is active. Defaults to true.
PropertiesList<Property>DependentThe properties associated with the type of Change Management System: requirements depend on the Change Management System selected.

Response Codes


HTTP Code
Description
201Change Management System Instance was created successfully
400Bad request
401Unauthorized
500Unexpected internal server error

If the POST receives the following JSON change management system object,

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

the following Change Management System will be created in the database and returned. Notice the updated Instance Id field and hidden password.

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

PUT

This PUT service will update all attributes of an Change Management System with the given Id based on the attributes of the supplied JSON object.

API URL

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

Parameters

Attributes
Type
Required
Description
Instance IdIntegerNoPrimary ID of the Change Management System, created when first making a Change Management System.
Instance CodeStringYesThe code of the Change Management System. Must be Unique
Instance NameStringYesThe name of the Change Management System. Must be Unique.
Change Management System IDIntegerYesThe ID of the type of Change Management System.
DescriptionStringNoThe description of the Change Management System.
isActiveBooleanNoWhether or not this Change Management System is active. Defaults to true.
PropertiesList<Property>DependentThe properties associated with the type of Change Management System: requirements depend on the Change Management System selected.

Response Code

HTTP Code
Description
200Change Management System Updated
400Bad request
401Unauthorized
404Change Management System not found
500Unexpected internal server error

Example

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

Change Management System - 11223
{
		"instanceId": 11223,
		"instanceCode": "CMS Code",
		"instanceName": "CMS Name",
		"cmssystemId": 1,
		"description": "JSON of data before a PUT has occurred",
		"isActive": true,
		"properties":
		[
			{
				"propertyName": "SN_PASSWORD",
				"propertyValue": "*****"
			},
			{
				"propertyName": "SN_PORT",
				"propertyValue": "1234"
			},
			{	
				"propertyName": "SN_REJECTED_SCRIPT",
				"propertyValue": "rejectedScript.bat"
			},
			{
				"propertyName": "SN_APPROVED_SCRIPT",
				"propertyValue": "approvedScript.bat"
			},
			{
				"propertyName": "SN_DONT_POLL",
				"propertyValue": "true"
			},
			{
				"propertyName": "SN_URL",
				"propertyValue": "http://myServiceNow.atlassian.net"
			},
			{
				"propertyName": "SN_USER_NAME",
				"propertyValue": "username"
			}
		]
	}

When we run a PUT request at the following URL

http://host:port/flexdeploy/rest/topology/integrations/changemanagement/11223

And the PUT request receives the following JSON Change Management System object,

Change Management System - 11223
{
		"instanceId": null,
		"instanceCode": "New CMS Code",
		"instanceName": "New CMS Name",
		"cmssystemId": 1,
		"description": "New CMS Description",
		"isActive": true,
		"properties":
		[
			{
				"propertyName": "SN_PASSWORD",
				"propertyValue": "newPassword"
			},
			{
				"propertyName": "SN_PORT",
				"propertyValue": "1234"
			},
			{	
				"propertyName": "SN_REJECTED_SCRIPT",
				"propertyValue": "rejectedScript.bat"
			},
			{
				"propertyName": "SN_APPROVED_SCRIPT",
				"propertyValue": "approvedScript.bat"
			},
			{
				"propertyName": "SN_DONT_POLL",
				"propertyValue": "true"
			},
			{
				"propertyName": "SN_URL",
				"propertyValue": "http://myServiceNow.atlassian.net"
			},
			{
				"propertyName": "SN_USER_NAME",
				"propertyValue": "newUser"
			}
		]
}

The PUT request would then update the Change Management System with Id 11223 and return the  following JSON Change Management System object.

Change Management System - 11223
{
		"instanceId": 11223,
		"instanceCode": "New CMS Code",
		"instanceName": "New CMS Name",
		"cmssystemId": 1,
		"description": "New CMS Description",
		"isActive": true,
		"properties":
		[
			{
				"propertyName": "SN_PASSWORD",
				"propertyValue": "****"
			},
			{
				"propertyName": "SN_PORT",
				"propertyValue": "1234"
			},
			{	
				"propertyName": "SN_REJECTED_SCRIPT",
				"propertyValue": "rejectedScript.bat"
			},
			{
				"propertyName": "SN_APPROVED_SCRIPT",
				"propertyValue": "approvedScript.bat"
			},
			{
				"propertyName": "SN_DONT_POLL",
				"propertyValue": "true"
			},
			{
				"propertyName": "SN_URL",
				"propertyValue": "http://myServiceNow.atlassian.net"
			},
			{
				"propertyName": "SN_USER_NAME",
				"propertyValue": "newUser"
			}
		]
}

Back to Top


PATCH

This PATCH service will update the information of the Change Management System of the specified Id with the non-null parameters of the JSON. The parameters that are null will not be changed in the Change Management System.

API URL

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

Parameters

Attributes
Type
Required
Description
Instance IdIntegerNoPrimary ID of the Change Management System, created when first making a Change Management System.
Instance CodeStringNoThe code of the Change Management System. Must be Unique
Instance NameStringNoThe name of the Change Management System. Must be Unique.
Change Management System IDIntegerNoThe ID of the type of Change Management System.
DescriptionStringNoThe description of the Change Management System.
isActiveBooleanNoWhether or not this Change Management System is active. Defaults to true.
PropertiesList<Property>NoThe properties associated with the type of Change Management System: requirements depend on the Change Management System selected.

Response Codes

HTTP Code
Description
200Change Management System Updated
400Bad request
401Unauthorized
404Change Management System not found
500Unexpected internal server error

Example

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

Change Management System - 11223
{
		"instanceId": 11223,
		"instanceCode": "NewCMSCode",
		"instanceName": "NewCMSName",
		"cmssystemId": 1,
		"description": "JSON of data before a PATCH has occurred",
		"isActive": true,
		"properties":
		[
			{
				"propertyName": "SN_PASSWORD",
				"propertyValue": "ThePassword"
			},
			{
				"propertyName": "SN_PORT",
				"propertyValue": "1234"
			},
			{	
				"propertyName": "SN_REJECTED_SCRIPT",
				"propertyValue": "rejectedScript.bat"
			},
			{
				"propertyName": "SN_APPROVED_SCRIPT",
				"propertyValue": "approvedScript.bat"
			},
			{
				"propertyName": "SN_DONT_POLL",
				"propertyValue": "true"
			},
			{
				"propertyName": "SN_URL",
				"propertyValue": "http://myServiceNow.atlassian.net"
			},
			{
				"propertyName": "SN_USER_NAME",
				"propertyValue": "username"
			}
		]
	}

When we run a PATCH request at the following URL

http://host:port/flexdeploy/rest/topology/integrations/changemanagement/11223

And the PATCH request receives the following JSON Change Management System object,

Change Management System - 11223
{
	"instanceId": null,
	"instanceCode": null,
	"instanceName": "NewNameFromPatch",
	"cmssystemId": null,
	"description": null,
	"isActive": null,
	"properties":
	[
		{
			"propertyName": "SN_PASSWORD",
			"propertyValue": "newpassword"
		}
	]
}

The PATCH request would then update the Change Management System with Id 11223 and return the  following JSON Change Management System object.

Change Management System - 11223
{
		"instanceId": 11223,
		"instanceCode": "CMS Code",
		"instanceName": "NewNameFromPatch",
		"cmssystemId": 1,
		"description": "JSON of data before a PATCH has occurred",
		"isActive": true,
		"properties":
		[
			{
				"propertyName": "SN_PASSWORD",
				"propertyValue": "*****"
			},
			{
				"propertyName": "SN_PORT",
				"propertyValue": "1234"
			},
			{	
				"propertyName": "SN_REJECTED_SCRIPT",
				"propertyValue": "rejectedScript.bat"
			},
			{
				"propertyName": "SN_APPROVED_SCRIPT",
				"propertyValue": "approvedScript.bat"
			},
			{
				"propertyName": "SN_DONT_POLL",
				"propertyValue": "true"
			},
			{
				"propertyName": "SN_URL",
				"propertyValue": "http://myServiceNow.atlassian.net"
			},
			{
				"propertyName": "SN_USER_NAME",
				"propertyValue": "username"
			}
		]
	}

Back to Top











  • No labels