Retrieving view actions using the Common REST API


You can use the Common REST API (CRA) to retrieve the action table using the getAcTbl endpoint. This endpoint retrieves the actions available for a specific view and returns the details as a JSON.

Before you begin

Retrieving actions using the getAcTbl endpoint

The getAcTbl endpoint uses the GET method to retrieve the actions for a specific view. Use this to see the details for the actions available for a specific view before invoking an action. For more details on invoking actions, see Invoking-actions-using-the-Common-REST-API

Use a URL based on the following structure:

https://<hostName>:<portNumber>/cra/serviceGateway/services/<serviceName>/products/<productName>/views/<viewName>/getActTbl

The variables represent the following values:

Authorization

Name

Located in

Description

Authorization

header

Authorization token formatted as 'Bearer [token]'

Query parameters

This endpoint accepts the following query parameters:

Parameter

Description

context

Context of the server from which you want to retrieve data

Default: *

server

Server from which you want to retrieve data, usually the SSID

Default: *

system

System from which you want to retrieve data, usually the LPAR

Default: *

scope

Scope for which you want to retrieve data

Default: *

session

Session token for retrieving data for the same view as a previous data request

For more information, see Managing Common REST API session tokens and user tokens.

Response body

The returned data is a JSON object. Expand the following to see an example:

Example of an Action Table
{
 "session": "c9cd7efb-05fa-4509-b3b7-9dd35ef09bea",
 "actionTable": [
   {
     "lineAction": [
       {
         "directed": "No",
         "objident": "add",
         "description": "Description",
         "mixed": true,
         "xddl": false,
         "lineCmd": "A",
         "command": "cmd",
         "detaltact": "aad",
         "doActionParm": [
           {
             "field": "CONTEXT",
             "isModparm": "false"
           }
          ],
         "functionIndex": "1",
         "explorer": "Select a context",
         "param": "CONTEXT",
         "action": "SELECT",
         "location": "D"
       }
      ],
     "primaryAction": [
       {
         "directed": "No",
         "doActionParm": [
           {
             "field": "CONTEXT",
             "isModparm": "false"
           }
          ],
         "objident": "a3ba",
         "functionIndex": "15",
         "explorer": "Add a Historical Dataset",
         "ssiTgtOnly": false,
         "description": "desc",
         "action": "S",
         "location": "asd",
         "mixed": false,
         "xddl": true,
         "command": "ADD"
       }
      ],
     "tableDetails": {
       "dialogAct": "BBM9Q2P0",
       "help": "BBMHQ2S0",
       "product": "BBM",
       "selectorActFvt": "BBM9YAGB",
       "record": "BBMMCE92",
       "actionTable": "BBMTQ2S0",
       "dialogClass": "PlexTableAction",
       "xddlDialogs": "YES",
       "selectorClass": "DslstBackEndAction",
       "target": "INFOMGR"
     }
   }
  ]
}

The following are the properties that you need to extract from the JSON to use to invoke an action:

Property name

Description

action

The name of the action

Example: MLCMD

lineAction

or PrimaryAction

Indicates if the the action is a line command

doActionParm

Action parameters

Use parameters to provide the action with specific information for the action to work successfully.

See the view’s action documentation for to see what parameters are needed for each of them.

HTTP status and reason codes

The following HTTP status codes are returned for the indicated errors, and the response body is a standard error response body providing the reason code indicated and associated error message.


Error Code

Explanation

200

Successful completion

403

Unauthorized. The authorization token is missing, invalid or expired

404

The path is not valid. Most likely because the service in the URL does not exist.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*