Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Anchor
Top
Top

Info
titleBase URL for Issue Tracking System Instance REST API

http://host:port/flexdeploy/rest/v1/topology/integrations/issuetrackingsystemitsinstance

Table of Contents
maxLevel2

...

Info
titleAPI URL

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

Parameters

Parameter
Required
Type
Description
IdYesURLURL parameter for the Id which is used to find and return an issue tracking system


Expand
titleGET by ID Example

Example

If we had an Issue Tracking System in our database with an Id of 11101 with the following attributes

Code Block
themeEclipse
titleIssue Tracking System - 11101
{
	"instanceId": 11101,
	"instanceCode": "ITS",
	"instanceName": "ITS Name",
	"issueTrackingSystemId": 1,
	"description": "ITS example",
	"isActive": true,
	"properties":
	[
		{
			"propertyName": "JIRA_PASSWORD",
			"propertyValue": "*****"
		},
		{
			"propertyName": "JIRA_PORT",
			"propertyValue": "1234"
		},
		{
			"propertyName": "JIRA_TICKET_REST_PATTERN",
			"propertyValue": "/rest/api/2/issue/{JIRA_ISSUE}"
		},
		{
			"propertyName": "JIRA_TICKET_URL_PATTERN",
			"propertyValue": "/browse/{JIRA_ISSUE}"
		},
		{
			"propertyName": "JIRA_URL",
			"propertyValue": "http://myjira.atlassian.net"
		},
		{
			"propertyName": "JIRA_USER_NAME",
			"propertyValue": "username"
		}
	]
}


When we run a GET request at the following URL

http://host:port/flexdeploy/rest/v1/topology/integrations/issuetrackingsystemitsinstance/11101

The GET request would return the following JSON Issue Tracking System object

Code Block
themeEclipse
titleIssue Tracking System - 11101
{
	"instanceId": 11101,
	"instanceCode": "ITS",
	"instanceName": "ITS Name",
	"issueTrackingSystemId": 1,
	"description": "ITS example",
	"isActive": true,
	"properties":
	[
		{
			"propertyName": "JIRA_PASSWORD",
			"propertyValue": "*****"
		},
		{
			"propertyName": "JIRA_PORT",
			"propertyValue": "1234"
		},
		{
			"propertyName": "JIRA_TICKET_REST_PATTERN",
			"propertyValue": "/rest/api/2/issue/{JIRA_ISSUE}"
		},
		{
			"propertyName": "JIRA_TICKET_URL_PATTERN",
			"propertyValue": "/browse/{JIRA_ISSUE}"
		},
		{
			"propertyName": "JIRA_URL",
			"propertyValue": "http://myjira.atlassian.net"
		},
		{
			"propertyName": "JIRA_USER_NAME",
			"propertyValue": "username"
		}
	]
}



Back to Top


GET by Query Parameters

This GET service will return a list of Issue Tracking Systems in the form of JSON objects based on the query parameters code, name, and issue tracking system type. Issue Tracking 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 Issue Tracking Systems.


Info
titleAPI URL

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

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

instanceCode={instanceCode}

instanceName={instanceName}

itsName={itsName}

Examples:
To specify the code parameter only:

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

To specify the code and name parameters:

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

To specify the issue tracking system name only:

http://host:port/flexdeploy/rest/v1/topology/integrations/issuetrackingsystemitsinstance?itsName={itsName}



Tip

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

Parameters

Parameter
Required
Type
Description
instanceCodeNoURLThis is a URL query parameter for the instance code which is used to search the issue tracking systems.
instanceNameNoURLThis is a URL query parameter for the instance name which is used to search the issue tracking systems.
itsNameNoURLThis is a URL query parameter for the issue tracking system name which is used to search the issue tracking systems.


...

Output when the Group Code was made "Group" through http://host:port/flexdeploy/rest/v1/topology/integrations/issuetrackingsystemitsinstance?itsName=Jira

Code Block
themeEclipse
titleIssue Tracking System - 11101
[
	{
		"instanceId": 11101,
		"instanceCode": "ITS",
		"instanceName": "ITS Name",
		"issueTrackingSystemId": 1,
		"description": "ITS example",
		"isActive": true,
		"properties":
		[
			{
				"propertyName": "JIRA_PASSWORD",
				"propertyValue": "*****"
			},
			{
				"propertyName": "JIRA_PORT",
				"propertyValue": "1234"
			},
			{
				"propertyName": "JIRA_TICKET_REST_PATTERN",
				"propertyValue": "/rest/api/2/issue/{JIRA_ISSUE}"
			},
			{
				"propertyName": "JIRA_TICKET_URL_PATTERN",
				"propertyValue": "/browse/{JIRA_ISSUE}"
			},
			{
				"propertyName": "JIRA_URL",
				"propertyValue": "http://myjira.atlassian.net"
			},
			{
				"propertyName": "JIRA_USER_NAME",
				"propertyValue": "username"
			}
		]
	},
	{ 
		"instanceId": 11105,
		"instanceCode": "ITS2", 
		"instanceName": "ITS 2 Name",
		"issueTrackingSystemId": 1,
		"description": "ITS example 2",
		"isActive": true, 
		"properties": 
		[ 
			{ 
				"propertyName": "JIRA_PASSWORD",
				"propertyValue": "*****" 
			},
			{ 
				"propertyName": "JIRA_PORT",
				"propertyValue": "2345"
			},
			{
				"propertyName": "JIRA_TICKET_REST_PATTERN",
				"propertyValue": "/rest/api/2/issue/{JIRA_ISSUE}"
			},
			{
				"propertyName": "JIRA_TICKET_URL_PATTERN",
				"propertyValue": "/browse/{JIRA_ISSUE}"
			},
			{
				"propertyName": "JIRA_URL",
				"propertyValue": "http://myjira.atlassian.net"
			},
			{
				"propertyName": "JIRA_USER_NAME",
				"propertyValue": "admin"
			}
		]
	}
]

...

Info
titleAPI URL

http://host:port/flexdeploy/rest/v1/topology/integrations/issuetrackingsystemitsinstance


Expand
titlePOST Example

If the POST receives the following JSON issue tracking system object,

Code Block
themeEclipse
titleIssue Tracking System - 11101
{
	"instanceId": 1,
	"instanceCode": "ITS",
	"instanceName": "ITS Name",
	"issueTrackingSystemId": 1,
	"description": "ITS example",
	"isActive": true,
	"properties":
	[
		{
			"propertyName": "JIRA_PASSWORD",
			"propertyValue": "password"
		},
		{
			"propertyName": "JIRA_PORT",
			"propertyValue": "1234"
		},
		{
			"propertyName": "JIRA_TICKET_REST_PATTERN",
			"propertyValue": "/rest/api/2/issue/{JIRA_ISSUE}"
		},
		{
			"propertyName": "JIRA_TICKET_URL_PATTERN",
			"propertyValue": "/browse/{JIRA_ISSUE}"
		},
		{
			"propertyName": "JIRA_URL",
			"propertyValue": "http://myjira.atlassian.net"
		},
		{
			"propertyName": "JIRA_USER_NAME",
			"propertyValue": "username"
		}
	]
}

the following Issue Tracking System will be created in the database and returned. Notice the updated Instance Id field and changed password.


Code Block
themeEclipse
titleIssue Tracking System - 11101
{
	"instanceId": 11101,
	"instanceCode": "ITS",
	"instanceName": "ITS Name",
	"issueTrackingSystemId": 1,
	"description": "ITS example",
	"isActive": true,
	"properties":
	[
		{
			"propertyName": "JIRA_PASSWORD",
			"propertyValue": "*****"
		},
		{
			"propertyName": "JIRA_PORT",
			"propertyValue": "1234"
		},
		{
			"propertyName": "JIRA_TICKET_REST_PATTERN",
			"propertyValue": "/rest/api/2/issue/{JIRA_ISSUE}"
		},
		{
			"propertyName": "JIRA_TICKET_URL_PATTERN",
			"propertyValue": "/browse/{JIRA_ISSUE}"
		},
		{
			"propertyName": "JIRA_URL",
			"propertyValue": "http://myjira.atlassian.net"
		},
		{
			"propertyName": "JIRA_USER_NAME",
			"propertyValue": "username"
		}
	]
}


...

Info
titleAPI URL

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


Expand
titlePUT Example

Example

If we had an issue tracking system in our database with an Id of 11223 and had the following attributes

Code Block
themeEclipse
titleIssue Tracking System - 11223
{
	"instanceId": 11223,
	"instanceCode": "ITS",
	"instanceName": "ITS Name",
	"issueTrackingSystemId": 1,
	"description": "ITS example",
	"isActive": false,
	"properties":
	[
		{
			"propertyName": "JIRA_PASSWORD",
			"propertyValue": "*****"
		},
		{
			"propertyName": "JIRA_PORT",
			"propertyValue": "1234"
		},
		{
			"propertyName": "JIRA_TICKET_REST_PATTERN",
			"propertyValue": "/rest/api/2/issue/{JIRA_ISSUE}"
		},
		{
			"propertyName": "JIRA_TICKET_URL_PATTERN",
			"propertyValue": "/browse/{JIRA_ISSUE}"
		},
		{
			"propertyName": "JIRA_URL",
			"propertyValue": "http://myjira.atlassian.net"
		},
		{
			"propertyName": "JIRA_USER_NAME",
			"propertyValue": "username"
		}
	]
}

When we run a PUT request at the following URL

http://host:port/flexdeploy/rest/v1/topology/integrations/issuetrackingsystemitsinstance/11223

And the PUT request receives the following JSON issue tracking system object,

Code Block
themeEclipse
titleIssue Tracking System - 11223
{
	"instanceId": 1,
	"instanceCode": "NEWITS",
	"instanceName": "New Name",
	"issueTrackingSystemId": 1,
	"description": "PUT example",
	"isActive": true,
	"properties":
	[
		{
			"propertyName": "JIRA_PASSWORD",
			"propertyValue": "updatedpassword"
		},
		{
			"propertyName": "JIRA_PORT",
			"propertyValue": "1234"
		},
		{
			"propertyName": "JIRA_TICKET_REST_PATTERN",
			"propertyValue": "/rest/api/2/issue/{JIRA_ISSUE}"
		},
		{
			"propertyName": "JIRA_TICKET_URL_PATTERN",
			"propertyValue": "/browse/{JIRA_ISSUE}"
		},
		{
			"propertyName": "JIRA_URL",
			"propertyValue": "http://myjira.atlassian.net"
		},
		{
			"propertyName": "JIRA_USER_NAME",
			"propertyValue": "username"
		}
	]
}

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

Code Block
themeEclipse
titleIssue Tracking System - 11223
{
	"instanceId": 11223,
	"instanceCode": "NEWITS",
	"instanceName": "New Name",
	"issueTrackingSystemId": 1,
	"description": "PUT example",
	"isActive": true,
	"properties":
	[
		{
			"propertyName": "JIRA_PASSWORD",
			"propertyValue": "*****"
		},
		{
			"propertyName": "JIRA_PORT",
			"propertyValue": "1234"
		},
		{
			"propertyName": "JIRA_TICKET_REST_PATTERN",
			"propertyValue": "/rest/api/2/issue/{JIRA_ISSUE}"
		},
		{
			"propertyName": "JIRA_TICKET_URL_PATTERN",
			"propertyValue": "/browse/{JIRA_ISSUE}"
		},
		{
			"propertyName": "JIRA_URL",
			"propertyValue": "http://myjira.atlassian.net"
		},
		{
			"propertyName": "JIRA_USER_NAME",
			"propertyValue": "username"
		}
	]
}


Back to Top

...

Info
titleAPI URL

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


Tip

The only required attribute is the Instance Id in the URL.


Expand
titlePATCH Example

Example

If we had an issue tracking system in our database with an Id of 11223 and had the following attributes

Code Block
themeEclipse
titleIssue Tracking System - 11223
{
	"instanceId": 11223,
	"instanceCode": "NEWITS",
	"instanceName": "New Name",
	"issueTrackingSystemId": 1,
	"description": "PUT example",
	"isActive": true,
	"properties":
	[
		{
			"propertyName": "JIRA_PASSWORD",
			"propertyValue": "*****"
		},
		{
			"propertyName": "JIRA_PORT",
			"propertyValue": "1234"
		},
		{
			"propertyName": "JIRA_TICKET_REST_PATTERN",
			"propertyValue": "/rest/api/2/issue/{JIRA_ISSUE}"
		},
		{
			"propertyName": "JIRA_TICKET_URL_PATTERN",
			"propertyValue": "/browse/{JIRA_ISSUE}"
		},
		{
			"propertyName": "JIRA_URL",
			"propertyValue": "http://myjira.atlassian.net"
		},
		{
			"propertyName": "JIRA_USER_NAME",
			"propertyValue": "username"
		}
	]
}

When we run a PATCH request at the following URL

http://host:port/flexdeploy/rest/v1/topology/integrations/issuetrackingsystemitsinstance/11223

And the PATCH request receives the following JSON issue tracking system object,

Code Block
themeEclipse
titleIssue Tracking System - 11223
{
	"instanceId": null,
	"instanceCode": null,
	"instanceName": "Updated Password",
	"issueTrackingSystemId": null,
	"description": null,
	"isActive": null,
	"properties":
	[
		{
			"propertyName": "JIRA_PASSWORD",
			"propertyValue": "newpassword"
		}
	]
}

The PATCH request would then update the issue tracking system with Id 11223 and return the  following JSON issue tracking system object.

Code Block
themeEclipse
titleIssue Tracking System - 11223
{
	"instanceId": 11223,
	"instanceCode": "NEWITS",
	"instanceName": "Updated Password",
	"issueTrackingSystemId": 1,
	"description": "PUT example",
	"isActive": true,
	"properties":
	[
		{
			"propertyName": "JIRA_PASSWORD",
			"propertyValue": "*****"
		},
		{
			"propertyName": "JIRA_PORT",
			"propertyValue": "1234"
		},
		{
			"propertyName": "JIRA_TICKET_REST_PATTERN",
			"propertyValue": "/rest/api/2/issue/{JIRA_ISSUE}"
		},
		{
			"propertyName": "JIRA_TICKET_URL_PATTERN",
			"propertyValue": "/browse/{JIRA_ISSUE}"
		},
		{
			"propertyName": "JIRA_URL",
			"propertyValue": "http://myjira.atlassian.net"
		},
		{
			"propertyName": "JIRA_USER_NAME",
			"propertyValue": "username"
		}
	]
}


Back to Top

...