This resource provides validation for project keys and names.
Validates a project key by confirming the key is a valid string and not in use.
Permissions required: None.
read:jira-work
read:project:jira
Connect app scope required: READ
string
Returned if the request is successful.
Error messages from an operation.
1
2
3
4
5
6
7
8
9
10
11
12
// This sample uses Atlassian Forge
// https://developer.atlassian.com/platform/forge/
import api, { route } from "@forge/api";
const response = await api.asUser().requestJira(route`/rest/api/3/projectvalidate/key?key=HSP`, {
headers: {
'Accept': 'application/json'
}
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.json());
1
2
3
4
5
6
{
"errorMessages": [],
"errors": {
"projectKey": "A project with that project key already exists."
}
}
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.
Connect app scope required: READ
string
Returned if the request is successful.
string
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// This sample uses Atlassian Forge
// https://developer.atlassian.com/platform/forge/
//
// This API resource doesn't support Oauth2 (3LO). See alternate authorization methods:
// https://developer.atlassian.com/cloud/jira/platform/rest/v3/#authentication
import api, { route } from "@forge/api";
const response = await api.requestJira(route`/rest/api/3/projectvalidate/validProjectKey?key=HSP`, {
headers: {
'Accept': 'application/json'
}
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.json());
1
"VPNE"
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.
Connect app scope required: READ
string
RequiredReturned if the request is successful.
string
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// This sample uses Atlassian Forge
// https://developer.atlassian.com/platform/forge/
//
// This API resource doesn't support Oauth2 (3LO). See alternate authorization methods:
// https://developer.atlassian.com/cloud/jira/platform/rest/v3/#authentication
import api, { route } from "@forge/api";
const response = await api.requestJira(route`/rest/api/3/projectvalidate/validProjectName?name={name}`, {
headers: {
'Accept': 'application/json'
}
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.json());
1
"Valid Project Name Example"
Rate this page: