Note: Beagle Security API v1 has been deprecated. We recommend that you upgrade to v2
Modify an application
Used to modify an existing application.
API
PUThttps://api.beaglesecurity.com/rest/v2/applications
Required scope: edit_project
Request headers
Name Value
Content-Type application/json
Authorization Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Request body
Name Type Description Required
name string Name of the application
url string URL of the application
applicationToken string A unique token for identifying the application in your account
Example request
curl --location --request PUT \
'https://api.beaglesecurity.com/rest/v2/applications' \
--header 'Authorization: Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "Default app",
"url": "https://example.com",
"applicationToken": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}'
// This token will be generated from Beagle security settings -> Access token
BeagleSecurityClient client = BeagleSecurityClientBuilder.instance()
.withAPIToken("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx")
.build();

// Modify application
String applicationToken = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
String applicationName = "Default app";
String url = "https://example.com";
Application application = client.modifyApplication(applicationToken, applicationName, url);
Response
Name Type Description
name string Name of the application
url string URL of the application
applicationToken string A unique token for identifying the application in your account
projectKey string A unique key for identifying the project
signatureStatus string Used to know the domain verification status of the application
Possible values are:
Verified Application is verified.
NotVerified Application is not verified.
hostingType string Used to specify wheather it's WEB or API. If left blank,default will be set to web.
Possible values are:
WEB Current application is a WEB.
API Current application is an API.
code string Status code for the API call.
Values are:
SUCCESS API call is success
PLAN_NOT_SUPPORTED Your plan does not support this feature.
PROJECT_ALREADY_EXISTS Project already exists in your account.
INVALID_SESSION Invalid session
FAILED Failed to modify application.
NOT_AUTHORIZED User authentication failed.
message string Success/failure message for the API call
Example response
{
"name": "Default app",
"url": "https://example.com",
"applicationToken": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"projectKey": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"signatureStatus": "Verified",
"hostingType": "API",
"code": "SUCCESS",
"message": "Success."
}
{
"code": "FAILED",
"message": "Failed to get application(s)."
}
{
"code": "NOT_AUTHORIZED",
"message": "Not authorized"
}