Note: Beagle Security API v1 has been deprecated. We recommend that you upgrade to v2
Delete a project
Used to delete details of an existing project.
API
DELETEhttps://api.beaglesecurity.com/rest/v2/projects?project_key={project_key}
Required scope: edit_project
Request headers
| Name | Value |
|---|---|
| Authorization | Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
Request parameter
| Name | Type | Description | Required |
|---|---|---|---|
| projectKey | string | A unique key for identifying the project |
Example request
curl --location --request DELETE \
'https://api.beaglesecurity.com/rest/v2/projects?project_key=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \
--header 'Authorization: Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
// This token will be generated from Beagle security settings -> Access token
BeagleSecurityClient client = BeagleSecurityClientBuilder.instance()
.withAPIToken("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx")
.build();
// Delete a project
UUID projectKey = UUID.fromString("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx");
Project project = client.deleteProject(projectKey);
Response
| Name | Type | Description | Required |
|---|---|---|---|
| name | string | Name of the project | |
| description | string | Description of the project | |
| projectKey | string | A unique key for identifying the project | |
| applicationToken | string | Authentication token to access the API | |
| code | string |
Status code for the API call.
Values are:
SUCCESSAPI call is success
PLAN_NOT_SUPPORTEDYour plan does not support this feature.
PROJECT_ALREADY_EXISTSProject already exists in your account.
INVALID_SESSIONInvalid session
FAILEDFailed to create project.
NOT_AUTHORIZEDUser authentication failed.
|
|
| message | string | Success/failure message for the API call |
Example response
{
"name": "Default project",
"description": "This is a default project.",
"projectKey": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"code": "SUCCESS",
"message": "Success."
}
{
"code": "INVALID_SESSION",
"message": "Given token is invalid"
}
{
"code": "NOT_AUTHORIZED",
"message": "Not authorized"
}