REST API: Project

DATA CENTER AND SERVER | CLOUD

REST API: Project

 

com.easesolutions.jira.plugins.requirements/1.0/projects

Get all projects enabled in Requirements.

 Click here for details...
REQUEST
POST

/rest/com.easesolutions.jira.plugins.requirements/1.0/projects



RESPONSES

STATUS 200 - Returned if the project is successfully enabled

Example response
[
  {
    "prjID": 10000,
    "prjKey": "TP",
    "prjName": "Test Project"
  }
]

STATUS 400 - Returned if an error occurs while retrieving all enabled projects in Requirements

STATUS 401 - Returned if invalid user credentials, or the user has no permission

STATUS 403 - Returned if the license is invalid or has expired, or incompatible JIRA version

 

com.easesolutions.jira.plugins.requirements/1.0/projects/enable/prjKey

Enable a project in Requirements.

 Click here for details...
REQUEST
POST

/rest/com.easesolutions.jira.plugins.requirements/1.0/projects/enable/prjKey



PARAMETERS

parameter

type

description

prjKey*

string

The project key of the project to be enabled.



RESPONSES

STATUS 200 - Returned if the project is successfully enabled

Example response
{ 
	"prjKey": "SC", 
	"prjName": "Sand Castle", 
	"issueCount": 34, 
	"success": true 
}

STATUS 400 - Returned if the project is invalid or an error occurs while activating the project

STATUS 401 - Returned if invalid user credentials, or the user has no permission

STATUS 403 - Returned if the license is invalid or has expired, or incompatible JIRA version

 

com.easesolutions.jira.plugins.requirements/1.0/projects/disable/prjKey

Disable a project in Requirements.

 Click here for details...
REQUEST
POST

/rest/com.easesolutions.jira.plugins.requirements/1.0/projects/disable/prjKey



PARAMETERS

parameter

type

description

prjKey*

string

The project key of the project to be disabled.



RESPONSES

STATUS 200 - Returned if the project is sucessfully disabled

Example Response
{
  "prjKey": "SC",
  "prjName": "Sand Castle",
  "issueCount": 34,
  "success": true
}

STATUS 400 - Returned if the project is invalid or an error occurs while disabling the project

STATUS 401 - Returned if invalid user credentials, or the user has no permission

STATUS 403 - Returned if the license is invalid or has expired, or incompatible JIRA version


com.easesolutions.jira.plugins.requirements/1.0/setsuspect/projectId

Set a suspect.

 Click here for details...

REQUEST

PUT
com.easesolutions.jira.plugins.requirements/1.0/setsuspect/projectId


Sample request data JSON:

{

"issueSourceKey": "TEST-1",

"issueDestinationKey" "TEST-2",

"direction": "in",

"linkTypeId": 10000,

"suspect": true

}


issueSourceKey (string): The source's issue key

issueDestinationKey (string): The destination's issue key

direction (string): in/out/in-out

linkTypeId (long): -1(All), 10000(Blocks), 10001(Clones), 10002(Duplicate) and/or 10003(Relates)

suspect (boolean): is a suspect



PARAMETERS

parameter

type

description

projectId*

long

The project's ID to be used

data

object

The JSON object of suspect data. Please refer above for the example and properties definition.



RESPONSE

 Click to view response types...

Response

Details

STATUS 200

Returned on successful operation.

STATUS 400

Returned when project is null.

Project is invalid or hasn't been assigned to the Requirements for JIRA plugin

Returned when either suspect data's srcKey and destKey are null.

Returned on failed operation.

com.easesolutions.jira.plugins.requirements/1.0/prjKey/suspectconfiguration

Trigger saving a suspect configuration.

 Click here for details...
REQUEST
POST

/rest/com.easesolutions.jira.plugins.requirements/1.0/prjKey/suspectconfiguration


Sample request data JSON:
{
"configName": "testName",
"notifyAssignee": false,
"notifyReporter": false,
"notifyProjectLead": false,
"userKeys": ["admin", "user1"],
"linkTypeIds":["10002", "10003"],
"useAllLinktypes":false,
"suspectConfigItems":[
{
"field": "assignee",
"stream":"up"
},
{
"field": "customfield_10003",
"stream": "up"
}],
"scope":"up"
}


configName (string): The suspect configuration name
notifyAssignee (boolean): True to notify assignee, otherwise false
notifyReporter (boolean): True to notify reporter, otherwise false
notifyProjectLead (boolean): True to notify project lead, otherwise false
userKeys (string array): The list of user ids to be notified
linkTypeIds (string array): The list of link type ids. Possible values are: -1(All), 10000(Blocks), 10001(Clones), 10002(Duplicate) and/or 10003(Relates)
useAllLinktypes (boolean): True if use all link types, otherwise false
suspectConfigItems (object array): The list of fields that trigger a suspect
field (string): The field id
stream (string): The scope of the configuration. It must have the same value with "scope"
scope (string): The scope of the configuration. Possible values are: "up", "down" or "both"



PARAMETERS

parameter

type

description

prjKey*

string

The project key to be configured.

data

object

The JSON object of suspect configuration data. Please refer above for the example and properties definition.



RESPONSES

STATUS 200 - Returned if suspect configuration is successfully saved.

Example Response
Suspect Configuration saved for SC. Empty name for suspect configuration "<suspect_config_name>" has been auto-generated.

STATUS 400 - Returned if the project is invalid, scope is invalid, link type id is invalid, list of users is invalid or contains an invalid user key, or list of fields is invalid or contains an invalid field

STATUS 401 - Returned if invalid user credentials, or the user has no permission to use the Requirements for JIRA plugin

STATUS 403 - Returned if the license is invalid or has expired, incompatible JIRA version, the project is not configured for Requirements for JIRA, or no permission to create suspect configuration

STATUS 404 - Returned if the project is not found

STATUS 500 - Returned if an error occurs while creating suspect configuration


com.easesolutions.jira.plugins.requirements/1.0/prjKey/suspectconfigurations

Returns all suspect configuration in project.

 Click here to expand...
REQUEST
GET

/rest/com.easesolutions.jira.plugins.requirements/1.0/prjKey/suspectconfigurations


PARAMETERS

parameter

type

description

prjKey*

string

The project key to be configured.



RESPONSES

STATUS 200 - Returned if suspect configuration is successfully deleted.

Example Response
[
  {
    "configId": 1,
    "configName": "name 1",
    "projectId": 10001,
    "notifyAssignee": true,
    "notifyReporter": true,
    "notifyProjectLead": true,
    "userKeys": [],
    "linkTypeIds": [],
    "useAllLinktypes": true,
    "suspectConfigItems": [
      {
        "stream": "both",
        "field": "  <all fields>"
      }
    ],
    "scope": "both"
  }
]

STATUS 400 - Returned if the project is invalid.

STATUS 401 - Returned if invalid user credentials, or the user has no permission to use the Requirements for JIRA plugin

STATUS 403 - Returned if the license is invalid or has expired, incompatible JIRA version, the project is not configured for Requirements for JIRA, or no permission to create suspect configuration

STATUS 404 - Returned if the project is not found

STATUS 500 - Returned if an error occurs while retrieving all suspect configuration


com.easesolutions.jira.plugins.requirements/1.0/prjKey/suspectconfiguration/id

Trigger editing a suspect configuration.

 Click here to expand...
REQUEST
PUT

/rest/com.easesolutions.jira.plugins.requirements/1.0/prjKey/suspectconfiguration/id


Sample request data JSON:
{
"configName": "testName",
"notifyAssignee": false,
"notifyReporter": false,
"notifyProjectLead": false,
"userKeys": ["admin", "user1"],
"linkTypeIds":["10002", "10003"],
"useAllLinktypes":false,
"suspectConfigItems":[
{
"field": "assignee",
"stream":"up"
},
{
"field": "customfield_10003",
"stream": "up"
}],
"scope":"up"
}


configName (string): The suspect configuration name
notifyAssignee (boolean): True to notify assignee, otherwise false
notifyReporter (boolean): True to notify reporter, otherwise false
notifyProjectLead (boolean): True to notify project lead, otherwise false
userKeys (string array): The list of user ids to be notified
linkTypeIds (string array): The list of link type ids. Possible values are: -1(All), 10000(Blocks), 10001(Clones), 10002(Duplicate) and/or 10003(Relates)
useAllLinktypes (boolean): True if use all link types, otherwise false
suspectConfigItems (object array): The list of fields that trigger a suspect
field (string): The field id
stream (string): The scope of the configuration. It must have the same value with "scope"
scope (string): The scope of the configuration. Possible values are: "up", "down" or "both"


PARAMETERS

parameter

type

description

prjKey*

string

The project key to be configured.

id*

string

The suspect configuration id.

data

object

The JSON object of suspect configuration data. Please refer above for the example and properties definition.



RESPONSES

STATUS 200 - Returned if suspect configuration is successfully udpated.

Example Response
Suspect Configuration saved for SC. Empty name for suspect configuration "<suspect_config_name>" has been auto-generated.

STATUS 400 - Returned if the project is invalid, scope is invalid, link type id is invalid, list of users is invalid or contains an invalid user key, or list of fields is invalid or contains an invalid field

STATUS 401 - Returned if invalid user credentials, or the user has no permission to use the Requirements for JIRA plugin

STATUS 403 - Returned if the license is invalid or has expired, incompatible JIRA version, the project is not configured for Requirements for JIRA, or no permission to create suspect configuration

STATUS 404 - Returned if the project is not found

STATUS 500 - Returned if an error occurs while editing configuration


com.easesolutions.jira.plugins.requirements/1.0/prjKey/suspectconfiguration/id

Trigger delete a suspect configuration.

 Click here to expand...
REQUEST
DELETE

/rest/com.easesolutions.jira.plugins.requirements/1.0/prjKey/suspectconfiguration/id


PARAMETERS

parameter

type

description

prjKey*

string

The project key to be configured.

id*

string

The suspect configuration id.



RESPONSES

STATUS 200 - Returned if suspect configuration is successfully deleted.

Example Response
Suspect Configuration deleted for SC

STATUS 400 - Returned if the project is invalid or id is invalid

STATUS 401 - Returned if invalid user credentials, or the user has no permission to use the Requirements for JIRA plugin

STATUS 403 - Returned if the license is invalid or has expired, incompatible JIRA version, the project is not configured for Requirements for JIRA, or no permission to create suspect configuration

STATUS 404 - Returned if the project is not found

STATUS 500 - Returned if an error occurs while deleting suspect configuration