Note: Beagle Security API v1 has been deprecated. We recommend that you upgrade to v2
Read all projects & applications
Used to read all projects and applications a user has access to. The projects and applications under a team are not included.
API
GET https://api.beaglesecurity.com/rest/v2/projects
Required scope: read_project
Request headers
Name Value
Authorization Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Example request
curl --location --request GET \
'https://api.beaglesecurity.com/rest/v2/projects' \
--header 'Authorization: Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
// This token will be generated from Beagle security settings -> Access token
BeagleSecurityClient client = BeagleSecurityClientBuilder.instance()
.withAPIToken("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx")
.build();

// Gets all the projects and its applications under a user
List<ProjectWithApplication> projects = client.getAllProjects();
Example response
{
"code": "SUCCESS",
"message": "Success",
"projects": [
    {
        "name": "Default project",
        "description": "New project",
        "projectKey": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
        "applications": [
            {
                "name": "Default application",
                "url": "http://196.168.0.7:80",
                "applicationToken": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
                "applicationType": "API",
                "signatureStatus": "Verified",
                "hostingType": "internal"
            },
            {
                "name": "Default application 2",
                "url": "http://example.com",
                "applicationToken": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
                "applicationType": "WEB",
                "signatureStatus": "NotVerified",
                "hostingType": "public"
            }
        ]
    },
    {
        "name": "Default project 2",
        "description": "New project",
        "projectKey": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
        "applications": [
            {
                "name": "Default application 3",
                "url": "http://example2.com",
                "applicationToken": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
                "applicationType": "WEB",
                "signatureStatus": "Verified",
                "hostingType": "public"
            }
        ]
    }
]
}
{
"code": "FAILED",
"message": "Failed to get projects."
}
{
"code": "NOT_AUTHORIZED",
"message": "Not authorized"
}