Skip to content

Latest commit

 

History

History
111 lines (81 loc) · 3.85 KB

ApplicationRolesApi.md

File metadata and controls

111 lines (81 loc) · 3.85 KB

ApplicationRolesApi

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

Method HTTP request Description
getAllApplicationRoles GET /rest/api/3/applicationrole Get all application roles
getApplicationRole GET /rest/api/3/applicationrole/{key} Get application role

getAllApplicationRoles

List<ApplicationRole> getAllApplicationRoles()

Get all application roles

Returns all application roles. In Jira, application roles are managed using the Application access configuration page. Permissions required: Administer Jira global permission.

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.ApplicationRolesApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: basicAuth
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
basicAuth.setUsername("YOUR USERNAME");
basicAuth.setPassword("YOUR PASSWORD");

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

Parameters

This endpoint does not need any parameter.

Return type

List<ApplicationRole>

Authorization

basicAuth

HTTP request headers

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

getApplicationRole

ApplicationRole getApplicationRole(key)

Get application role

Returns an application role. Permissions required: Administer Jira global permission.

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.ApplicationRolesApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: basicAuth
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
basicAuth.setUsername("YOUR USERNAME");
basicAuth.setPassword("YOUR PASSWORD");

ApplicationRolesApi apiInstance = new ApplicationRolesApi();
String key = "key_example"; // String | The key of the application role. Use the [Get all application roles](#api-rest-api-3-applicationrole-get) operation to get the key for each application role.
try {
    ApplicationRole result = apiInstance.getApplicationRole(key);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ApplicationRolesApi#getApplicationRole");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
key String The key of the application role. Use the Get all application roles operation to get the key for each application role.

Return type

ApplicationRole

Authorization

basicAuth

HTTP request headers

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