All URIs are relative to https://your-domain.atlassian.com
Method | HTTP request | Description |
---|---|---|
getValidProjectKey | GET /rest/api/3/projectvalidate/validProjectKey | Get valid project key |
getValidProjectName | GET /rest/api/3/projectvalidate/validProjectName | Get valid project name |
validateProjectKey | GET /rest/api/3/projectvalidate/key | Validate project key |
String getValidProjectKey(key)
Get valid project key
Validates a project key and, if the key is invalid or in use, generates a valid random string for the project key. Permissions required: None.
// 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.ProjectKeyAndNameValidationApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: basicAuth
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
basicAuth.setUsername("YOUR USERNAME");
basicAuth.setPassword("YOUR PASSWORD");
ProjectKeyAndNameValidationApi apiInstance = new ProjectKeyAndNameValidationApi();
String key = "key_example"; // String | The project key.
try {
String result = apiInstance.getValidProjectKey(key);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ProjectKeyAndNameValidationApi#getValidProjectKey");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
key | String | The project key. | [optional] |
String
- Content-Type: Not defined
- Accept: application/json
String getValidProjectName(name)
Get valid project name
Checks that a project name isn't in use. If the name isn't in use, the passed string is returned. If the name is in use, this operation attempts to generate a valid project name based on the one supplied, usually by adding a sequence number. If a valid project name cannot be generated, a 404 response is returned. Permissions required: None.
// 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.ProjectKeyAndNameValidationApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: basicAuth
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
basicAuth.setUsername("YOUR USERNAME");
basicAuth.setPassword("YOUR PASSWORD");
ProjectKeyAndNameValidationApi apiInstance = new ProjectKeyAndNameValidationApi();
String name = "name_example"; // String | The project name.
try {
String result = apiInstance.getValidProjectName(name);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ProjectKeyAndNameValidationApi#getValidProjectName");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
name | String | The project name. |
String
- Content-Type: Not defined
- Accept: application/json
ErrorCollection validateProjectKey(key)
Validate project key
Validates a project key by confirming the key is a valid string and not in use. Permissions required: None.
// 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.ProjectKeyAndNameValidationApi;
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");
ProjectKeyAndNameValidationApi apiInstance = new ProjectKeyAndNameValidationApi();
String key = "key_example"; // String | The project key.
try {
ErrorCollection result = apiInstance.validateProjectKey(key);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ProjectKeyAndNameValidationApi#validateProjectKey");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
key | String | The project key. | [optional] |
- Content-Type: Not defined
- Accept: application/json