Create Web App

Request

Method: POST

Server: https://[app key here]-[site_ID here]-apps.worldsecuresystems.com. Take a look at the Authorize your API calls document for more info on how this URL is formed.

Note: When building apps always use relative request URLs. Do not use the "full" URL above because you might have problems running your app on a different site as the site_ID parameter will be different.

Path: /api/v2/admin/sites/current/webapps

Alternatively use siteID instead of 'current'

Authorization header: This should contain the authorization token. Here is how to obtain the token.

Required Permissions: Create Web Apps

Parameters

name - required (string)

slug - (string, optional) - it defaults to the name of the web app, or a variation on the name, if a slug with the name already exists

allowFileUpload - . Defaults to false (boolean, optional)

uploadFolder - required only if allowFileUpload is True. Must be a valid absolute path in the site, created in advance (string)

disableDetailPages- (boolean, optional)

locationEnabled - (boolean, optional)

anyoneCanEdit - (boolean, optional)

customerCanAdd - (boolean, optional)

customerCanEdit - (boolean, optional)

customerCanDelete - (boolean, optional)

requiresPayment - (boolean, optional)

requiresApproval - (boolean, optional)

roleId - optional, defaults to -1 (integer)

templateId - optional, defaults to -1 (integer)

validDays - optional, defaults to -1 (never expire) (integer)

Response

Returns an empty body and a location header containing the URI to retrieve category details.

if passing a value for the uploadFolder parameter that does not exist on the file system, the system will attempt to create the folder, and its entire path. It reuses the mechanism used in the FileSystem APIs to create a folder, so the same exceptions get thrown.

Only the webapp Name parameter is mandatory. The rest have defaults, as follows:

The webapp name must not be empty and can only contain valid characters, that can be later used on the file system and the API uris. The invalid characters are: / ? # % & * + \ | : ; . “ > <
If you pass in values for itemSystemFields and / or itemFields they will be ignored.