All URIs are relative to https://your-domain.atlassian.com
Method | HTTP request | Description |
---|---|---|
addActorUsers | POST /rest/api/3/project/{projectIdOrKey}/role/{id} | Add actors to project role |
addProjectRoleActorsToRole | POST /rest/api/3/role/{id}/actors | Add default actors to project role |
deleteActor | DELETE /rest/api/3/project/{projectIdOrKey}/role/{id} | Delete actors from project role |
deleteProjectRoleActorsFromRole | DELETE /rest/api/3/role/{id}/actors | Delete default actors from project role |
getProjectRoleActorsForRole | GET /rest/api/3/role/{id}/actors | Get default actors for project role |
setActors | PUT /rest/api/3/project/{projectIdOrKey}/role/{id} | Set actors for project role |
ProjectRole addActorUsers(body, projectIdOrKey, id)
Add actors to project role
Adds actors to a project role for the project. To replace all actors for the project, use Set actors for project role. This operation can be accessed anonymously. Permissions required: Administer Projects project permission for the project or Administer Jira global permission.
// 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.ProjectRoleActorsApi;
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");
ProjectRoleActorsApi apiInstance = new ProjectRoleActorsApi();
ActorsMap body = new ActorsMap(); // ActorsMap | The groups or users to associate with the project role for this project. Provide the user account ID or group name.
String projectIdOrKey = "projectIdOrKey_example"; // String | The project ID or project key (case sensitive).
Long id = 789L; // Long | The ID of the project role. Use [Get all project roles](#api-rest-api-3-role-get) to get a list of project role IDs.
try {
ProjectRole result = apiInstance.addActorUsers(body, projectIdOrKey, id);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ProjectRoleActorsApi#addActorUsers");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
body | ActorsMap | The groups or users to associate with the project role for this project. Provide the user account ID or group name. | |
projectIdOrKey | String | The project ID or project key (case sensitive). | |
id | Long | The ID of the project role. Use Get all project roles to get a list of project role IDs. |
- Content-Type: application/json
- Accept: application/json
ProjectRole addProjectRoleActorsToRole(body, id)
Add default actors to project role
Adds default actors to a role. You may add groups or users, but you cannot add groups and users in the same request. Changing a project role's default actors does not affect project role members for projects already created. Permissions required: Administer Jira global permission.
// 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.ProjectRoleActorsApi;
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");
ProjectRoleActorsApi apiInstance = new ProjectRoleActorsApi();
ActorInputBean body = new ActorInputBean(); // ActorInputBean |
Long id = 789L; // Long | The ID of the project role. Use [Get all project roles](#api-rest-api-3-role-get) to get a list of project role IDs.
try {
ProjectRole result = apiInstance.addProjectRoleActorsToRole(body, id);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ProjectRoleActorsApi#addProjectRoleActorsToRole");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
body | ActorInputBean | ||
id | Long | The ID of the project role. Use Get all project roles to get a list of project role IDs. |
- Content-Type: application/json
- Accept: application/json
deleteActor(projectIdOrKey, id, user, group)
Delete actors from project role
Deletes actors from a project role for the project. To remove default actors from the project role, use Delete default actors from project role. This operation can be accessed anonymously. Permissions required: Administer Projects project permission for the project or Administer Jira global permission.
// 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.ProjectRoleActorsApi;
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");
ProjectRoleActorsApi apiInstance = new ProjectRoleActorsApi();
String projectIdOrKey = "projectIdOrKey_example"; // String | The project ID or project key (case sensitive).
Long id = 789L; // Long | The ID of the project role. Use [Get all project roles](#api-rest-api-3-role-get) to get a list of project role IDs.
String user = "user_example"; // String | The user account ID of the user to remove from the project role.
String group = "group_example"; // String | The name of the group to remove from the project role.
try {
apiInstance.deleteActor(projectIdOrKey, id, user, group);
} catch (ApiException e) {
System.err.println("Exception when calling ProjectRoleActorsApi#deleteActor");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
projectIdOrKey | String | The project ID or project key (case sensitive). | |
id | Long | The ID of the project role. Use Get all project roles to get a list of project role IDs. | |
user | String | The user account ID of the user to remove from the project role. | [optional] |
group | String | The name of the group to remove from the project role. | [optional] |
null (empty response body)
- Content-Type: Not defined
- Accept: Not defined
ProjectRole deleteProjectRoleActorsFromRole(id, user, group)
Delete default actors from project role
Deletes the default actors from a project role. You may delete a group or user, but you cannot delete a group and a user in the same request. Changing a project role's default actors does not affect project role members for projects already created. Permissions required: Administer Jira global permission.
// 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.ProjectRoleActorsApi;
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");
ProjectRoleActorsApi apiInstance = new ProjectRoleActorsApi();
Long id = 789L; // Long | The ID of the project role. Use [Get all project roles](#api-rest-api-3-role-get) to get a list of project role IDs.
String user = "user_example"; // String | The user account ID of the user to remove as a default actor.
String group = "group_example"; // String | The group name of the group to be removed as a default actor.
try {
ProjectRole result = apiInstance.deleteProjectRoleActorsFromRole(id, user, group);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ProjectRoleActorsApi#deleteProjectRoleActorsFromRole");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
id | Long | The ID of the project role. Use Get all project roles to get a list of project role IDs. | |
user | String | The user account ID of the user to remove as a default actor. | [optional] |
group | String | The group name of the group to be removed as a default actor. | [optional] |
- Content-Type: Not defined
- Accept: application/json
ProjectRole getProjectRoleActorsForRole(id)
Get default actors for project role
Returns the default actors for the project role. Permissions required: Administer Jira global permission.
// 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.ProjectRoleActorsApi;
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");
ProjectRoleActorsApi apiInstance = new ProjectRoleActorsApi();
Long id = 789L; // Long | The ID of the project role. Use [Get all project roles](#api-rest-api-3-role-get) to get a list of project role IDs.
try {
ProjectRole result = apiInstance.getProjectRoleActorsForRole(id);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ProjectRoleActorsApi#getProjectRoleActorsForRole");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
id | Long | The ID of the project role. Use Get all project roles to get a list of project role IDs. |
- Content-Type: Not defined
- Accept: application/json
ProjectRole setActors(body, projectIdOrKey, id)
Set actors for project role
Sets the actors for a project role for a project, replacing all existing actors. To add actors to the project without overwriting the existing list, use Add actors to project role. Permissions required: Administer Projects project permission for the project or Administer Jira global permission.
// 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.ProjectRoleActorsApi;
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");
ProjectRoleActorsApi apiInstance = new ProjectRoleActorsApi();
ProjectRoleActorsUpdateBean body = new ProjectRoleActorsUpdateBean(); // ProjectRoleActorsUpdateBean | The groups or users to associate with the project role for this project. Provide the user account ID or group name.
String projectIdOrKey = "projectIdOrKey_example"; // String | The project ID or project key (case sensitive).
Long id = 789L; // Long | The ID of the project role. Use [Get all project roles](#api-rest-api-3-role-get) to get a list of project role IDs.
try {
ProjectRole result = apiInstance.setActors(body, projectIdOrKey, id);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ProjectRoleActorsApi#setActors");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
body | ProjectRoleActorsUpdateBean | The groups or users to associate with the project role for this project. Provide the user account ID or group name. | |
projectIdOrKey | String | The project ID or project key (case sensitive). | |
id | Long | The ID of the project role. Use Get all project roles to get a list of project role IDs. |
- Content-Type: application/json
- Accept: application/json