Note: Beagle Security API v1 has been deprecated. We recommend that you upgrade to v2
Create project in a team
Used to create a new project in a team.
API
POSThttps://api.beaglesecurity.com/rest/v2/projects?teamId={teamId}
Required scope: edit_project
Request headers
Name Value
Content-Type application/json
Authorization Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Request parameter
Name Type Description Required
teamId string Unique id of the team
Request body
Name Type Description Required
name string Name of the project
description string Description of the project
Example request
curl --location --request POST \
'https://api.beaglesecurity.com/rest/v2/projects?teamId=xxxxxxxxxx' \
--header 'Authorization: Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "Default project",
"description": "This is a default project."
}'
// This token will be generated from Beagle security settings -> Access token
BeagleSecurityClient client = BeagleSecurityClientBuilder.instance()
.withAPIToken("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx")
.build();

// Create a project
String projectName = "Default project";
String description = "This is a default project";
String teamId = "xxxxxxxxxx";
Project verifyStatus = client.createProject(projectName, description, teamId);
Response
Name Type Description
name string Name of the project
description string Description of the project
projectKey string A unique key for identifying the project
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"
}