Location
/api/apps/{appID}/server-code
This resource allows the management and execution of
code provided by the developer in the server side.
Request Headers (Applies to all methods)
Authorization
header
Required: Yes
POST
/api/apps/{appID}/server-code
Description
Deploy a new version of server code.
Security
Can be performed only with administrator credentials.
Content-Type application/javascript
A zip file containing the scripts with the code.
Name
Required?
type
Description
Authorization
Yes
string
Authorization header. OAuth2 Bearer token
Responses
Contents
201
Content-Type application/vnd.kii.ServerCodeDeploymentResponse+json
The server code was deployed successfully.
Headers
Name | Type | Description |
---|---|---|
Location | string | URI to the deployed server code version |
Name | Type | Description |
---|---|---|
versionID | string | The version ID of the code deployed |
401
Content-Type application/vnd.kii.UnauthorizedAccessException+json
Not authorized to access this method.
Contents
Name | Type | Description |
---|---|---|
errorCode | string | Error code "UNAUTHORIZED". |
message | string | The error message. |
authenticatedAppID | string | The authenticated appID. |
authenticatedPrincipalID | string | The authenticated principal ID (userID or thingID). |