Skip to main content

Create API Application

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

Request

Request-Line

POST /waap/v1.0/apiProtection/apiApps 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
appIdIntegerMandatoryUnique 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/apiApps HTTP/1.1

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

Successful Response Body

{
"appId": 55
}