POST /gui_app_framework/applications/{application_id}

Updates an application.

Updates an application.

Supply status=RUNNING to start a stopped application instance.

Supply status=STOPPED to stop a running application instance.

Supply oauth_user_id to change the OAuth user associated with the application instance.

Supply security_profile_id to change the associated security profile on the application instance

Table 1. POST /gui_app_framework/applications/{application_id} resource details
MIME Type

application/json

Table 2. POST /gui_app_framework/applications/{application_id} request parameter details
Parameter Type Optionality Data Type MIME Type Description

application_id

path

Required

Number (Integer)

text/plain

Required - The application identifier.

status

query

Optional

String

text/plain

- The status to set: RUNNING or STOPPED.

oauth_user_id

query

Optional

Number (Integer)

text/plain

- The OAuth user ID to set. This parameter is ignored when status is supplied.

Table 3. POST /gui_app_framework/applications/{application_id} response codes
HTTP Response Code Unique Code Description

200

The application has been successfully updated.

404

1002

The application identifier could not be found.

409

33000

The current state of the application does not allow the requested action.

409

33002

The application is currently locked by another request.

409

33006

The current state of the application instance does not allow the requested action.

409

33402

The application image does not exist in the docker registry

409

33600

The application does not have an associated OAuth user.

409

33602

The supplied OAuth user does not have the capabilities required by the application.

409

33700

The application framework is currently disabled.

409

1008

The application is in a state that does not allow the requested update.

422

33302

The application requested more memory than is currently available.

422

33500

A valid query parameter must be supplied to this API request.

422

33501

An invalid value was supplied for the status parameter.

422

33601

The supplied OAuth user does not exist.

422

1005

A supplied parameter is invalid.

500

33203

An error occurred while loading resource bundle properties from the application zip file.

500

33306

An error occurred while parsing the copy of the app manifest stored in the database.

500

1020

The request could not be completed.

Response Description

Application details, see GET /applications/{application_id}.

Response Sample


{
    "application_state":{
        "application_id":"1001",
        "status":"RUNNING",
        "memory":200,
        "external_port":25092
    },
    "manifest":{
 
        "name":"Sample Application",
        "description":"An example of how to create an application manifest",
        "version":"0.0.1",
 
        "areas": [
            {
                "id":"Qapp1_HelloWorld",
                "url":"http://9.21.118.58:5000",
                "text":"QApp1",
                "description":"Loading a dockerised web app into a tab inside Qradar",
                "required_capabilities":["ADMIN"]
            }
        ],
 
        "dashboard_items": [
            {
                "text":"Sample Item",
                "description":"Sample dashboard item that is a copy of most recent offenses",
                "rest_method":"sampleDashboardItem",
               "required_capabilities":["ADMIN"]
            }
        ],
 
        "rest_methods": [
            {
                "name":"sampleDashboardItem",
                "url":"/static/sampleDashboardItemResponse.json",
                "method":"GET",
                "argument_names":[],
                "required_capabilities":["ADMIN"]
            },
            {
                "name":"sampleToolbarMethod",
                "url":"/static/sampleToolbarButtonResponse.json",
                "method":"GET",
                "argument_names":["context"],
                "required_capabilities":["ADMIN"]
            },
            {
                "name":"sampleIPInformation",
                "url":"/static/sampleIPInformationResponse.json",
                "method":"GET",
                "argument_names":["metaDataContext"],
                "required_capabilities":["ADMIN"]
            },
            {
                "name":"sampleUserInformation",
                "url":"/static/sampleUserInformationResponse.json",
                "method":"GET",
                "argument_names":["metaDataContext"],
                "required_capabilities":["ADMIN"]
            },
            {
                "name":"sampleURLInformation",
                "url":"/static/sampleURLInformationResponse.json",
                "method":"GET",
                "argument_names":["metaDataContext"],
                "required_capabilities":["ADMIN"]
            },
            {
                "name":"addToReferenceSet",
                "url":"/addToReferenceSet",
                "method":"GET",
                "argument_names":["data"]
            }
        ],
 
        "configuration_pages": [
            {
                "text":"Open IBM.com",
                "description":"Loading IBM.com in a new window",
                "icon":null,
                "url":"https://www.ibm.com/us/en/",
                "required_capabilities":["ADMIN"]
            }
        ],
 
        "gui_actions": [
            {
                "id":"addToReferenceSet",
                "text":"Add To Reference Set",
                "description":"Adds to a reference set",
                "icon":null,
                "rest_method":"addToReferenceSet",
                "javascript":"alert(result)",
                "groups":[ "ipPopup" ],
                "required_capabilities":[ "ADMIN" ]
            },
            {
                "id":"sampleToolbarButton",
                "text":"Sample Toolbar Button",
                "description":"Sample toolbar button that calls a REST method, passing an offense ID along",
                "icon":null,
                "rest_method":"sampleToolbarMethod",
                "javascript":"alert(result)",
                "groups":[ "OffenseListToolbar" ],
                "required_capabilities":[ "ADMIN" ]
            }
        ],
 
        "page_scripts": [
            {
                "app_name":"SEM",
                "page_id":"OffenseList",
                "scripts":["/static/sampleScriptInclude.js"]
            }
        ],
     
        "metadata_providers": [
            {
                "rest_method":"sampleIPInformation",
                "metadata_type":"ip"
            },
            {
                "rest_method":"sampleUserInformation",
                "metadata_type":"userName"
            },
            {
                "rest_method":"sampleURLInformation",
                "metadata_type":"ariel:URL"
            }
        ]
    },
    "installed_by": "admin",
    "installed_on": "1513766636242",
    "managed_host_id": "53"
}