Obtaining the MFT agent status

How you obtain the Managed File Transfer agent status, using the REST API

For more information, see Administration using the REST API.

To obtain the agent status you:

  1. Send a GET request to the agent under the default coordination queue manager that is using the MFT andMFT web application. You need to consider the format of the URL while sending a request.

    See admin/mft/agent for more information.

  2. When a request is received, a check is performed on the request to see if the request is valid.

    See Configure MFT REST API security for more information.

  3. If the request is valid, you receive a successful response along with the response body. Otherwise, an appropriate error code and response code is generated.

    See Response status codes for a list of responses.


Example URLs

    {baseURI}/ibmmq/rest/{version}/admin/mft/agent
    Outputs a list of the name, state, and type of all the agents under the coordination queue manager.
    See Agent status REST API attributes for further information on these attributes.
    If you add ?attributes=* to the end of the URL string, the output contains a list of all the attributes for every agent that is under the coordination queue manager.
    If you add /{agentName} to the end of the URL string, the output contains the name, state, and type of the agent that matches agentName.
    Similarly, if you add /{agentName}?attributes=* to the end of the URL string, the output contains a list of all the attributes for the agent that matches agentName.

    {baseURI}/ibmmq/rest/{version}/admin/mft/agent?name={<prefix>*<suffix> }
    For example, {baseURI}/ibmmq/rest/{version}/admin/mft/agent?name=AGENT*TEST outputs the default attribute summary for the agents starting with the name AGENT and ending with the name TEST.
    If you omit *TEST from the URL, the output contains the default attribute summary for all the agents starting with the name AGENT.

    {baseURI}/ibmmq/rest/{version}/admin/mft/agent?type={agentType}
    For example, {baseURI}/ibmmq/rest/{version}/admin/mft/agent?type=standard outputs the default attribute summary for agents of type standard.
    Similarly, if you replace type={agentType}, with state={agentState}, the output displays the default attribute summary for the agents of the specified state.

    {baseURI}/ibmmq/rest/{version}/admin/mft/agent?type={agentType}&attributes=*
    For example, {baseURI}/ibmmq/rest/{version}/admin/mft/agent?type=standard&attributes=* outputs all the attributes for an agent whose type is standard.

We can also filter by a combination of attributes. For example:

  • {baseURI}/ibmmq/rest/{version}/admin/mft/agent?name=*bob&type=standard&state=ready&attributes=*
  • {baseURI}/ibmmq/rest/{version}/admin/mft/agent?type=standard&state=ready&attributes=*
  • {baseURI}/ibmmq/rest/{version}/admin/mft/agent?name=agent*&state=ready&attributes=*


Example response body

See Agent status REST API attributes and Agent status REST API response body attributes for further information on the attributes described.

Issuing the following command, /ibmmq/rest/v1/admin/mft/agent/, lists the basic agent status of agent name, type, and state. For example:
{
     “agent”:[  {“name”: “AGENT1”,
                        “state" : "ready",
                        “type”:”standard”},
                      {“name”: “AGENT2”,
                        “state" : "ready",
                        “type”:”standard”},
                     { “name”: “BRIDGE_AGENT3”,                
                        “type” : “protocolBridge”,
                        “state" : "ready"},
                     {“name”: “CD_AGENT”,
                        “type”:”connectDirectBridge”,
                      “state" : "ready "}]
}
Issuing each of the following commands:
/ibmmq/rest/v1/ admin/mft/agent?type=standard
/ibmmq/rest/v1/admin/mft/agent?state=stopped
/ibmmq/rest/v1/admin/mft/agent?name=AGENT*
lists the basic information for an agent that matches the particular name, state, and type in each command. For example:
{ “agent”:[  {“name”: “AGENT1”,
                        “state" : "ready",
                        “type”:”standard”},
                     {“name”: “AGENT2”,
                       “state" : "ready",
                       “type”:”standard”}  ]
}
{ “agent”:[  {“name”: “AGENT1”,
                        “state" : "stopped",
                        “type”:”standard”},
                     {“name”: “AGENT2”,
                       “state" : "stopped",
                       “type”:”standard”} ]
}
{    “agent”:[  {“name”: “AGENT1”,
                        “state" : "ready",
                        “type”:”standard”},
                     {“name”: “AGENT2”,
                       “state" : "ready",
                       “type”:”standard”}  ]
}                
Issuing the following command, /ibmmq/rest/v1/admin/mft/agent?attributes=general?type=standard lists all the messages of type standard, along with the general attributes. For example:
{
     “agent”:[
            {“name”: “AGENT1”,
              “state" : "ready",
              “type”:”standard”,
              “general”: { “description” : “Standard connected to the qmgr in client mode”, 
                                  “statusAge" : “06:31:00”, 
                                  “version” : “9.0.3.0”, 
                                  “level” : “p903-L170513”,   
                                        “statusPublicationRate” : 300,  
                                 “statusPublishTime” : "2017-10-31T06:57:07.000Z",
                                 “maximumQueuedTransfers” : 1000, 
                                 “maximumDestinationTransfers”:25,
                                “maximumSourceTransfers”:25,
                                 “operatingSystem” : “Windows7” } 
         },
        {“name”: “AGENT2”,
          “state" : "ready",
           “type”:”standard”
            “general” : { “description” : “Standard connected to qmgr in Binding mode”,
                                  “statusAge ":“05:00:00”,      
                                  “version” : “9.0.3.0”, 
                                “level” : “p903-L170513”, 
                                “statusPublicationRate” : 300, 
                                “statusPublishTime” : “2017-09-13T09:10:09.000Z”,
                               “maximumQueuedTransfers” : 1000, 
                               “maximumDestinationTransfers”:25,
                              “maximumSourceTransfers”:25,
                              “operatingSystem” : “Windows7” }  
             }
   ]
}