Skip to content

Latest commit

 

History

History
119 lines (87 loc) · 3.84 KB

WorkflowStatusesApi.md

File metadata and controls

119 lines (87 loc) · 3.84 KB

WorkflowStatusesApi

All URIs are relative to https://your-domain.atlassian.com

Method HTTP request Description
getStatus GET /rest/api/3/status/{idOrName} Get status
getStatuses GET /rest/api/3/status Get all statuses

getStatus

StatusDetails getStatus(idOrName)

Get status

Returns a status. The status must be associated with a workflow to be returned. If a name is used on more than one status, only the status found first is returned. Therefore, identifying the status by its ID may be preferable. This operation can be accessed anonymously. Permissions required: None.

Example

// Import classes:
//import com.xminds.jira.rest.client.ApiClient;
//import com.xminds.jira.rest.client.ApiException;
//import com.xminds.jira.rest.client.Configuration;
//import com.xminds.jira.rest.client.auth.*;
//import com.xminds.jira.rest.client.api.WorkflowStatusesApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");
// Configure HTTP basic authorization: basicAuth
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
basicAuth.setUsername("YOUR USERNAME");
basicAuth.setPassword("YOUR PASSWORD");

WorkflowStatusesApi apiInstance = new WorkflowStatusesApi();
String idOrName = "idOrName_example"; // String | The ID or name of the status.
try {
    StatusDetails result = apiInstance.getStatus(idOrName);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling WorkflowStatusesApi#getStatus");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
idOrName String The ID or name of the status.

Return type

StatusDetails

Authorization

OAuth2basicAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

getStatuses

List<StatusDetails> getStatuses()

Get all statuses

Returns a list of all statuses associated with workflows. This operation can be accessed anonymously. Permissions required: None.

Example

// Import classes:
//import com.xminds.jira.rest.client.ApiClient;
//import com.xminds.jira.rest.client.ApiException;
//import com.xminds.jira.rest.client.Configuration;
//import com.xminds.jira.rest.client.auth.*;
//import com.xminds.jira.rest.client.api.WorkflowStatusesApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");
// Configure HTTP basic authorization: basicAuth
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
basicAuth.setUsername("YOUR USERNAME");
basicAuth.setPassword("YOUR PASSWORD");

WorkflowStatusesApi apiInstance = new WorkflowStatusesApi();
try {
    List<StatusDetails> result = apiInstance.getStatuses();
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling WorkflowStatusesApi#getStatuses");
    e.printStackTrace();
}

Parameters

This endpoint does not need any parameter.

Return type

List<StatusDetails>

Authorization

OAuth2basicAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json