Skip to main content

Create API Application

Create a new API Application and bind it to one or more websites.

Request

Request-Line

POST /waap/v1.0/apiProtection/apiApp HTTP/1.1

Request Parameters

Body Parameters

ParameterTypeRequiredDescription
namestringMandatoryName of the API Application.The name must have 1-26 characters. Valid characters: 0-9, A-Z, a-z, space, . (dot), _ (underline), - (hyphen), () (parentheses), * (asterisk) and + (plus sign).
pathPrefixstringOptionalOptional path prefix for grouping API routes. Example: "/cms/".
websitesinteger[]MandatoryList of website IDs to bind the API Application to. At least one ID is required.

Response

Response Body

Property nameTypeRequiredDescription
application_idintegerMandatoryUnique identifier assigned to the created api application.

Status Codes, Error Codes and Error Messages

Status CodeError CodeError Message
400Request.BadRequestBad request.
400Name.InvalidName is empty or invalid.
400Websites.InvalidWebsites is empty or invalid.
404Website.NotFoundWebsite is not found.
409ApplicationName.ExistApplication name already exists.
409ApiAppPath.ExistThe combination of domain and path prefix already exists.

Examples

Create API Application

Request

POST /waap/v1.0/apiProtection/apiApp HTTP/1.1

{
"name": "test",
"pathPrefix":"/",
"websites": [
392
]
}

Successful Response Body

{
"application_id": 55
}