App Management REST interface
The base endpoint of the App Management is http://<server>:<port>/<contextname>/resources/apps
.
Authentication
Authentication is required for all endpoints. The actual type required depends on how the security mode is configured in map.apps.
Basic Authentication
If map.apps uses the INTEGRATED
or ONLY_AUTHN
security mode, you could use HTTP Basic Authentication to provide credentials.
GET resources/apps Authentication: Basic <base64 encoded username:password>
http
Authentication via Access Token
If map.apps uses security mode IDENTITY
to use an external identity provider like Keycloak for authentication, you could use HTTP Bearer Authentication to provide an access token.
GET resources/apps Authentication: Bearer <access_token>
http
The Identity Service itself provides a tokens
endpoint to retrieve access tokens.
Endpoints
METHOD | RESOURCE | DESCRIPTION |
---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Create app
Allows to create an app. Some data about the app must be provided in the request body, e.g. the ID and the title.
POST resources/apps Content-Type: application/json { "id": "myApp", "title": "My App", "description": "My App Description", "sharedInGroups": ["maAdmin"] }
http
HTTP/1.1 303 See other Location: resources/apps/myApp
http
HTTP/1.1 400
Content-Type: application/json
{
"code": 0,
"error": "error message here"
}
json
Name | Default | Description |
---|---|---|
|
The ID of the new app. |
|
|
The title for the app. |
|
|
|
Optional. The description for the app. |
|
|
Optional. The groups the app is shared with. Empty array means the app is shared with everyone. |
|
Optional. The id of template the app should be based on. The |
Query existing apps
Allows to query existing apps. Depending on the Accept-Header the result is returned as JSON or HTML.
GET resources/apps?filter=(and title="My App";createdBy="admin") accept: application/json
http
HTTP/1.1 200 OK Content-Type: application/json { "total":1, "items":[{ "editorState": "PUBLISHED", "preoptimized": false, "id": "myApp", "title": "My App", "description": "My App Description", "createdBy": "admin", "createdAt": 1702647666749, "modifiedBy": "admin", "modifiedAt": 1702648738184, "templateId": "", "templateFile": "", "thumbnailFile": "", "sharedInGroupsCount": 0, "portalItemStatus": "", "sharedInGroups": ["maAdmin"] }] }
http
Name | Default | Description |
---|---|---|
|
Optional. A filter query expression that allows to search for apps by its properties. Simple Query:
Simple Queries can be combined using
Wildcards: To filter all apps starting with |
|
|
|
Optional. A comma separated list of property names prefixed by
|
|
|
Optional. This is a range expression to allow paging through the result list. The formal definition of the range expression is:
|
|
|
Optional. If |
|
|
Optional. |
Get app overview page
Returns the app overview page.
GET resources/apps/index.html
http
HTTP/1.1 200 OK Content-Type: text/html HTML content here
http
Get app meta data
Returns the meta data of an app.
GET resources/apps/{appId}
http
HTTP/1.1 200 OK Content-Type: application/json { "editorState": "PUBLISHED", "preoptimized": false, "id": "myApp", "title": "My App", "description": "My App Description", "createdBy": "admin", "createdAt": 1702647666749, "modifiedBy": "admin", "modifiedAt": 1702648738184, "templateId": "", "templateFile": "", "thumbnailFile": "", "sharedInGroupsCount": 0, "portalItemStatus": "", "sharedInGroups": ["maAdmin"] }
http
Redirect to index.html of app
Redirects the browser to the index.html
of the app.
GET resources/apps/{appId} accept: text/html
http
HTTP/1.1 303 See other Location: resources/apps/{appId}/index.html
http
Update app meta data
This endpoint allows to update the meta data of apps. The app is identified by its ID.
PUT resources/apps/{appId} Content-Type: application/json { "id": "myApp", "title": "My App", "description": "My App Description", "editorState": "PUBLISHED", "sharedInGroups": ["maAdmin"], }
http
HTTP/1.1 200 OK Content-Type: application/json { "editorState": "PUBLISHED", "preoptimized": false, "id": "myApp", "title": "My App", "description": "My App Description", "createdBy": "admin", "createdAt": 1702647666749, "modifiedBy": "admin", "modifiedAt": 1702648738184, "templateId": "", "templateFile": "", "thumbnailFile": "", "sharedInGroupsCount": 0, "portalItemStatus": "", "sharedInGroups": ["maAdmin"] }
http
Name | Description |
---|---|
|
The id of the app. |
|
The new title for the app. If empty the title is set to an empty string. |
|
The new description for the app. If empty the title is set to an empty string. |
|
Optional. The new state of the app. Allowed values are 'DRAFT', 'EDITED', 'VERIFIED', 'PUBLISHED' AND 'DEPRECATED'. |
|
Optional. The groups the app is now shared with. Empty array means the app is shared with everyone. |
Delete app
Deletes an app by its id.
DELETE resources/apps/{appId}
http
HTTP/1.1 204 No Content
http
Upload app
Allows to upload an archive containing the app content. The current app will be replaced by the content of the uploaded archive.
POST resources/apps/{appId} Content-Type: multipart/form-data; boundary=------BOUNDARY ------BOUNDARY Content-Disposition: form-data; name="file"; filename="myApp.zip" Content-Type: application/zip <BINARY DATA HERE> ------BOUNDARY--
http
HTTP/1.1 200 OK Content-Type: application/json { "file": "myApp.zip", "name": "file", "type": ".zip" }
http
HTTP/1.1 200 OK Content-Type: application/json { "file": "myApp.zip", "name": "file", "type": ".zip", "error": "error message here" }
http
Get the app.json
Returns the content of the app.json of an app.
GET resources/apps/{appId}/app.json
http
HTTP/1.1 200 OK Content-Type: application/json { // app configuration here }
http
Name | Default | Description |
---|---|---|
|
|
If |
|
|
If value is present and greater then |
Update app configuration
This endpoint allows to update the configuration of the app (content of the app.json).
PUT resources/apps/{appId}/app.json Content-Type: application/json { // app configuration here }
http
HTTP/1.1 200 OK Content-Type: application/json { "success": true }
http
Launch app
Launches an app.
GET resources/apps/{appId}/index.html
http
HTTP/1.1 200 OK Content-Type: text/html HTML content here
http
Get thumbnail
Returns the thumbnail of an app.
GET resources/apps/{appId}/thumbnail.png
http
HTTP/1.1 200 OK Content-Type: image/png (binary data)
http
Get a resource
Returns any resource contained in the app identified by its path.
The path parameter resourcePath
points to a resource inside the app for example images/logo.png
.
GET resources/apps/{appId}/{resourcePath}
http
HTTP/1.1 200 OK Content-Type: image/png (binary data)
http
Get array with resource names
Returns a json array with all resources of an app.
GET resources/apps/{appId}/$raw/$index
http
HTTP/1.1 200 OK Content-Type: application/json ["app.json","thumbnail.png","images/hybrid.png","images/logo_conterra.png","images/topo.png","images/streets.png","nls/bundle.js.map","nls/bundle.js","nls/de/bundle.js.map","nls/de/bundle.js"]
http
Get resource
Returns any resource contained in the app identified by its path.
The path parameter resourcePath
points to a resource inside the app for example images/logo.png
.
GET resources/apps/{appId}/$raw/{resourcePath}
http
HTTP/1.1 200 OK Content-Type: image/png (binary data)
http
Create resource
Allows to create a new resource for an app. This is typically used to initially create new app resources.
PUT /resources/apps/{appId}/$raw/{resourcePath} content-type: text/plain Enter content...
http
HTTP/1.1 200 OK Content-Type: application/json { "success": true }
http
Upload resource
Allows to upload resources to the app. Might be used to upload content for new or existing app resources.
POST resources/apps/{appId}/$raw/{resourcePath} Content-Type: multipart/form-data; boundary=------BOUNDARY ------BOUNDARY Content-Disposition: form-data; name="file"; filename="example.png" Content-Type: image/png <BINARY DATA HERE> ------BOUNDARY--
http
HTTP/1.1 200 OK Content-Type: application/json { "file": "example.png", "name": "file", "type": ".png" }
http
HTTP/1.1 200 OK Content-Type: application/json { "file": "example.png", "name": "file", "type": ".png", "error": "error message here" }
http
Delete resource
Allows to delete a resource of an app.
The path parameter resourcePath
points to a resource inside the app for example images/logo.png
.
DELETE /resources/apps/{appId}/$raw/{resourcePath}
http
HTTP/1.1 200 OK Content-Type: application/json { "success": true }
http
HTTP/1.1 404 Not found
http
Get app meta data
Returns the meta data of an app.
GET resources/apps/{appId}.json
http
HTTP/1.1 200 OK Content-Type: application/json { "editorState": "PUBLISHED", "preoptimized": false, "id": "myApp", "title": "My App", "description": "My App Description", "createdBy": "admin", "createdAt": 1702647666749, "modifiedBy": "admin", "modifiedAt": 1702648738184, "templateId": "", "templateFile": "", "thumbnailFile": "", "sharedInGroupsCount": 0, "portalItemStatus": "", "sharedInGroups": ["maAdmin"] }
http
Export app using GET
Exports the app content as a zip archive.
Its also possible to export the app as standalone app by setting the standalone
query parameter to true
.
GET resources/apps/{appId}.zip?standalone={true|false}
http
HTTP/1.1 200 OK Content-Type: application/octet-stream (binary data)
http
Name | Default | Description |
---|---|---|
|
|
Optional. |
|
Optional. Comma separated list of custom layer modules. |
|
|
Optional. Comma separated list of custom files. |
Export app using POST
Exports the app content as a zip archive.
Its also possible to export the app as standalone app by setting the standalone
form parameter to true
.
POST resources/apps/{appId}.zip Content-Type: application/x-www-form-urlencoded standalone={true|false}
http
HTTP/1.1 200 OK Content-Type: application/octet-stream Content-Disposition: attachment; filename="myApp.zip" Content-Length: 12345 <binary data>
http
Name | Default | Description |
---|---|---|
|
|
Optional. |
|
Optional. Comma separated list of custom layer modules. |
|
|
Optional. Comma separated list of custom files. |
Enable or disable pre-optimization
Enables or disables pre-optimization of an app. This operation might take a while to complete.
POST resources/apps/{appId}/preoptimizedState?preoptimized={true|false}
http
HTTP/1.1 200 OK Content-Type: application/json { "success": true }
http
HTTP/1.1 500 OK Content-Type: application/json { "code": 500, "error": "error message here" }
http
Name | Default | Description |
---|---|---|
|
|