Include Page | ||||
---|---|---|---|---|
|
...
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 | NONo | /rest/api/2/issue/{JIRA_ISSUE} |
SN_REJECTED_SCRIPT | String | NONo | /browse/{JIRA_ISSUE} |
SN_DONT_POLL | Boolean | NONo | |
SN_URL | String | Yes | http://myjira.atlassian.net |
...
Request
Parameter | Required | Type | Description |
---|---|---|---|
Id | Yes | URL | URL parameter for the Id which is used to find and return a Change Management System |
Include Page | ||||
---|---|---|---|---|
|
Response Codes
HTTP Code | Description | |
---|---|---|
200 | Change Management System Instance was found and returned | |
400 | Bad request | |
401Unauthorized | Authentication failure | |
404 | Change Management 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
Code Block | ||||
---|---|---|---|---|
| ||||
{ "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" 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, "truecredentialId": 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 URLhttp: http://host:port/flexdeploy/rest/v1/topology/integrations/cmsinstance/11101
The GET request would return the following JSON Change Management System object
Code Block | ||||
---|---|---|---|---|
| ||||
{ "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, "1234credentialId": 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, "truecredentialId": 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.
Info | ||
---|---|---|
| ||
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} |
Tip |
---|
The query parameters are not case sensitive. Searching by instanceName=NAME is the same as searching by instanceName=name. |
Request
Parameter | Type | Required | Description |
---|---|---|---|
instanceCode | Query - String | No | This is a URL query parameter for the instance code which is used to search the change management systems. Equals ignore case search |
instanceName | Query - String | No | This is a URL query parameter for the instance name which is used to search the change management systems. Contains ignore case search |
cmsSystemName | Query - String | No | This is a URL query parameter for the change management system name which is used to search the change management systems. Equals ignore case search |
Include Page | ||||
---|---|---|---|---|
|
Response Codes
HTTP Code | Description |
---|---|
200 |
Search successful and results returned | |
400 | Bad request |
401 |
Authentication failure | |
403 | Authorization failure (no access to resource) |
500 | Unexpected internal server error |
Example
If we had 2 Change Management System Instancse with Ids of 11101 and 11107 with the following attributes.
...
Code Block | ||||
---|---|---|---|---|
| ||||
[ { "instanceId": 11101, "instanceCode": "CMSCODE", "instanceName": "CMSName", "cmsSystemId": 1, "description": "CMS example", "isActive": true, "properties": [ { "propertyName": "SN_PASSWORD", "propertyValue": "ThePassword1""Password1", "credentialId": 76592 }, { "propertyName": "SN_PORT", "propertyValue": "1234" 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, "truecredentialId": null }, { "propertyName": "SN_URL", "propertyValue": "http://myServiceNow.atlassian.net", "credentialId": null }, { "propertyName": "SN_USER_NAME", "propertyValue": "username", "credentialId": null } ] }, { "instanceId": 11107, "instanceCode": "CMSCODE2", "instanceName": "CMSName2", "cmsSystemId": 1, "description": "the second CMS example", "isActive": true, "properties": [ { "propertyName": "SN_PASSWORD", "propertyValue": "ThePassword2", "credentialId": 19520 }, { "propertyName": "SN_PORT", "propertyValue": "9876"9876, "credentialId": null }, { "propertyName": "SN_REJECTED_SCRIPT", "propertyValue": "rejectedScript2.bat", "credentialId": null }, { "propertyName": "SN_APPROVED_SCRIPT", "propertyValue": "approvedScript2.bat", "credentialId": null }, { "propertyName": "SN_DONT_POLL", "propertyValue": "true"true, "credentialId": null }, { "propertyName": "SN_URL", "propertyValue": "http://myServiceNow2.atlassian.net", "credentialId": null }, { "propertyName": "SN_USER_NAME", "propertyValue": "username2", } "credentialId": null } ] } ] |
When we run a GET request at the following URL
http://host:port/flexdeploy/rest/v1/topology/integrations/cmsinstance?instanceName=CMSName
The GET request would return the following JSON Change Management Instance object
Code Block | ||||
---|---|---|---|---|
| ||||
[ { "instanceId": 11101, "instanceCode": "CMSCODE", "instanceName": "CMSName", "cmsSystemId": 1, "description": "CMS example", "isActive": true, "properties": [ { "propertyName": "SN_PASSWORD", "propertyValue": "ThePassword1" *****", "credentialId": 76592 }, { "propertyName": "SN_PORT", "propertyValue": "1234" 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, "truecredentialId": null }, { "propertyName": "SN_URL", "propertyValue": "http://myServiceNow.atlassian.net", }, "credentialId": null }, { "propertyName": "SN_USER_NAME", "propertyValue": "username", "credentialId": null } ] } ] |
POST
The POST service will create a new change management system with the same attributes as the given JSON object.
...
HTTP Code | Description |
---|---|
201 | Change Management System Instance was created successfully |
400 | Bad request |
401Unauthorized | Authentication failure |
403 | Authorization failure (no access to resource) |
500 | Unexpected internal server error |
...
Code Block | ||||
---|---|---|---|---|
| ||||
{ "instanceId": null, "instanceCode": "CMS Code", "instanceName": "CMS Name", "cmsSystemId": 1, "description": "CMS Post", "isActive": true, "properties": [ { "propertyName": "SN_PASSWORD", "propertyValue": "ThePassword", "credentialId": 76592 }, { "propertyName": "SN_PORT", "propertyValue": "1234" 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 } ] } |
the following Change Management System will be created in the database and returned. Notice the updated Instance Id field and hidden password.
Code Block | ||||
---|---|---|---|---|
| ||||
{ "instanceId": 11101, "instanceCode": "CMS Code", "instanceName": "CMS Name", "cmsSystemId": 1, "description": "CMS Post", "isActive": true, "properties": [ { "propertyName": "SN_PASSWORD", "propertyValue": "*****", "credentialId": 76592 }, { "propertyName": "SN_PORT", "propertyValue": 1234, "1234credentialId": 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 } ] } |
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.
...
Request
Attributes | Type | Required | Description |
---|---|---|---|
instanceId | Integer | No | Primary ID of the Change Management System, created when first making a Change Management System. |
instanceCode | String | Yes | The code of the Change Management System. Must be Unique |
instanceName | String | Yes | The name of the Change Management System. Must be Unique. |
cmsSystemId | Integer | Yes | The ID of the type of Change Management System. |
description | String | No | The description of the Change Management System. |
isActive | Boolean | No | Whether or not this Change Management System is active. Defaults to true. |
properties | List<Property> | Dependent | The properties associated with the type of Change Management System: requirements depend on the Change Management System selected. Values for properties not included in input will be cleared. |
Include Page | ||||
---|---|---|---|---|
|
Response Code
HTTP Code | Description |
---|---|
200 | Change Management System Updated |
400 | Bad request |
401Unauthorized | Authentication failure |
403 | Authorization failure (no access to resource) |
404 | Change Management System not found |
500 | Unexpected internal server error |
Example
If we had a Change Management System in our database with an Id of 11223 and had the following attributes
Code Block | ||||
---|---|---|---|---|
| ||||
{ "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": "*****", "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 PUT request at the following URL: http://host:port/flexdeploy/rest/v1/topology/integrations/cmsinstance/11223
And the PUT request receives the following JSON Change Management System object,
Code Block | ||||
---|---|---|---|---|
| ||||
{ "instanceId": null, "instanceCode": "New CMS Code", "instanceName": "New CMS Name", "cmsSystemId": 1, "description": "New CMS Description", "isActive": true, "properties": [ { "propertyName": "SN_PASSWORD", "propertyValue": "newPassword" }, { "credentialId": null }, { "propertyName": "SN_PORT", "propertyValue": 1234, "1234credentialId": 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": "newUser", "credentialId": null } ] } |
The PUT request would then update the Change Management System with Id 11223 and return the following JSON Change Management System object.
Code Block | ||||
---|---|---|---|---|
| ||||
{ "instanceId": 11223, "instanceCode": "New CMS Code", "instanceName": "New CMS Name", "cmsSystemId": 1, "description": "New CMS Description", "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_POLL", "propertyValue": "true", "propertyValuecredentialId": "true"null }, { "propertyName": "SN_URL", "propertyValue": "http://myServiceNow.atlassian.net", "credentialId": null }, { "propertyName": "SN_USER_NAME", "propertyValue": "newUser", "credentialId": null } ] } |
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.
Info | ||
---|---|---|
| ||
http://host:port/flexdeploy/rest/v1/topology/integrations/cmsinstance/{Id} |
...
Attributes | Type | Required | Description |
---|---|---|---|
instanceId | Integer | No | Primary ID of the Change Management System, created when first making a Change Management System. |
instanceCode | String | No | The code of the Change Management System. Must be Unique |
instanceName | String | No | The name of the Change Management System. Must be Unique. |
cmsSystemId | Integer | No | The ID of the type of Change Management System. |
description | String | No | The description of the Change Management System. |
isActive | Boolean | No | Whether or not this Change Management System is active. Defaults to true. |
properties | List<Property> | No | The properties associated with the type of Change Management System: requirements depend on the Change Management System selected. The JSON object doesn't need to have all of the properties. Values provided in input list are the only ones updated. |
Include Page | ||||
---|---|---|---|---|
|
...
HTTP Code | Description |
---|---|
200 | Change Management System Updated |
400 | Bad request |
401Unauthorized | Authentication failure |
403 | Authorization failure (no access to resource) |
404 | Change Management System not found |
500 | Unexpected internal server error |
Example
If we had an Change Management System in our database with an Id of 11223 and had the following attributes
Code Block | ||||
---|---|---|---|---|
| ||||
{ "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", "propertyValuecredentialId": "ThePassword"76592 }, { "propertyName": "SN_PORT", "propertyValue": 1234, "1234credentialId": 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 PATCH request at the following URL: http://host:port/flexdeploy/rest/v1/topology/integrations/cmsinstance/11223
And the PATCH request receives the following JSON Change Management System object,
Code Block | ||||
---|---|---|---|---|
| ||||
{ "instanceName": "NewNameFromPatch", "properties": [ { "propertyName": "SN_PASSWORD", "propertyValue": "newpassword""", "credentialId": 16925 } ] } |
The PATCH request would then update the Change Management System with Id 11223 and return the the following JSON Change Management System object.
Code Block | ||||
---|---|---|---|---|
| ||||
{ "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": "*****", "credentialId": 16925 }, { "propertyName": "SN_PORT", "propertyValue": "1234" 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 } ] } |