All URIs are relative to https://your-domain.atlassian.com
Method | HTTP request | Description |
---|---|---|
assignPermissionScheme | PUT /rest/api/3/project/{projectKeyOrId}/permissionscheme | Assign permission scheme |
getAssignedPermissionScheme | GET /rest/api/3/project/{projectKeyOrId}/permissionscheme | Get assigned permission scheme |
getProjectIssueSecurityScheme | GET /rest/api/3/project/{projectKeyOrId}/issuesecuritylevelscheme | Get project issue security scheme |
getSecurityLevelsForProject | GET /rest/api/3/project/{projectKeyOrId}/securitylevel | Get project issue security levels |
PermissionScheme assignPermissionScheme(body, projectKeyOrId, expand)
Assign permission scheme
Assigns a permission scheme with a project. See Managing project permissions for more information about permission schemes. 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.ProjectPermissionSchemesApi;
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");
ProjectPermissionSchemesApi apiInstance = new ProjectPermissionSchemesApi();
IdBean body = new IdBean(); // IdBean |
String projectKeyOrId = "projectKeyOrId_example"; // String | The project ID or project key (case sensitive).
String expand = "expand_example"; // String | Use [expand](#expansion) to include additional information in the response. This parameter accepts a comma-separated list. Note that permissions are included when you specify any value. Expand options include: * `all` Returns all expandable information. * `field` Returns information about the custom field granted the permission. * `group` Returns information about the group that is granted the permission. * `permissions` Returns all permission grants for each permission scheme. * `projectRole` Returns information about the project role granted the permission. * `user` Returns information about the user who is granted the permission.
try {
PermissionScheme result = apiInstance.assignPermissionScheme(body, projectKeyOrId, expand);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ProjectPermissionSchemesApi#assignPermissionScheme");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
body | IdBean | ||
projectKeyOrId | String | The project ID or project key (case sensitive). | |
expand | String | Use expand to include additional information in the response. This parameter accepts a comma-separated list. Note that permissions are included when you specify any value. Expand options include: * `all` Returns all expandable information. * `field` Returns information about the custom field granted the permission. * `group` Returns information about the group that is granted the permission. * `permissions` Returns all permission grants for each permission scheme. * `projectRole` Returns information about the project role granted the permission. * `user` Returns information about the user who is granted the permission. | [optional] |
- Content-Type: application/json
- Accept: application/json
PermissionScheme getAssignedPermissionScheme(projectKeyOrId, expand)
Get assigned permission scheme
Gets the permission scheme associated with the project. Permissions required: Administer Jira global permission or Administer projects project 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.ProjectPermissionSchemesApi;
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");
ProjectPermissionSchemesApi apiInstance = new ProjectPermissionSchemesApi();
String projectKeyOrId = "projectKeyOrId_example"; // String | The project ID or project key (case sensitive).
String expand = "expand_example"; // String | Use [expand](#expansion) to include additional information in the response. This parameter accepts a comma-separated list. Note that permissions are included when you specify any value. Expand options include: * `all` Returns all expandable information. * `field` Returns information about the custom field granted the permission. * `group` Returns information about the group that is granted the permission. * `permissions` Returns all permission grants for each permission scheme. * `projectRole` Returns information about the project role granted the permission. * `user` Returns information about the user who is granted the permission.
try {
PermissionScheme result = apiInstance.getAssignedPermissionScheme(projectKeyOrId, expand);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ProjectPermissionSchemesApi#getAssignedPermissionScheme");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
projectKeyOrId | String | The project ID or project key (case sensitive). | |
expand | String | Use expand to include additional information in the response. This parameter accepts a comma-separated list. Note that permissions are included when you specify any value. Expand options include: * `all` Returns all expandable information. * `field` Returns information about the custom field granted the permission. * `group` Returns information about the group that is granted the permission. * `permissions` Returns all permission grants for each permission scheme. * `projectRole` Returns information about the project role granted the permission. * `user` Returns information about the user who is granted the permission. | [optional] |
- Content-Type: Not defined
- Accept: application/json
SecurityScheme getProjectIssueSecurityScheme(projectKeyOrId)
Get project issue security scheme
Returns the issue security scheme associated with the project. Permissions required: Administer Jira global permission or the Administer Projects project 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.ProjectPermissionSchemesApi;
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");
ProjectPermissionSchemesApi apiInstance = new ProjectPermissionSchemesApi();
String projectKeyOrId = "projectKeyOrId_example"; // String | The project ID or project key (case sensitive).
try {
SecurityScheme result = apiInstance.getProjectIssueSecurityScheme(projectKeyOrId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ProjectPermissionSchemesApi#getProjectIssueSecurityScheme");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
projectKeyOrId | String | The project ID or project key (case sensitive). |
- Content-Type: Not defined
- Accept: application/json
ProjectIssueSecurityLevels getSecurityLevelsForProject(projectKeyOrId)
Get project issue security levels
Returns all issue security levels for the project that the user has access to. This operation can be accessed anonymously. Permissions required: Browse projects global permission for the project, however, issue security levels are only returned for authenticated user with Set Issue Security global permission for the project.
// 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.ProjectPermissionSchemesApi;
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");
ProjectPermissionSchemesApi apiInstance = new ProjectPermissionSchemesApi();
String projectKeyOrId = "projectKeyOrId_example"; // String | The project ID or project key (case sensitive).
try {
ProjectIssueSecurityLevels result = apiInstance.getSecurityLevelsForProject(projectKeyOrId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ProjectPermissionSchemesApi#getSecurityLevelsForProject");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
projectKeyOrId | String | The project ID or project key (case sensitive). |
- Content-Type: Not defined
- Accept: application/json