GET
Use the HTTP GET method with the agent resource to request information
about Managed File Transfer agents.
Note: This resource is not available in a stand-alone IBM® MQ Web Server installation. For more information about the
installation options for the IBM MQ component that runs
the administrative REST API, see The IBM MQ Console and REST API.The information that is returned is similar to the information returned by the fteListAgents (list the MFT agents for a coordination queue manager) and fteShowAgentDetails (display MFT agent details) commands.
For more information about configuring the MFT REST API, see Configuring the REST API for MFT.
Resource URL
https://host:port/ibmmq/rest/v2/admin/mft/agent/{agentname}- agentName
- Optionally specifies the name of the agent to query.
You can use HTTP instead of HTTPS if you enable HTTP connections. For more information about enabling HTTP, see Configuring the HTTP and HTTPS ports.
Optional query parameters
- attributes={object,...|*|object.attributeName,...}
-
- object
- Specifies a comma-separated list of JSON objects that are added to a JSON object, which is a
subsection of the complete details.For example to return:
- All general details of all agents or a particular agent, specify general.
- All queue manager connection details of all agents or a particular agent specify qmgrConnection.
- Details of connect direct bridge agent, specify connectDirectBridge. (applicable only for agent of type "connect direct bridge")
- Details of protocol agent, specify protocolBridge. (applicable only for agents of type "protocol bridge")
For a full list of attributes see Response body attributes for agents
- *
- Specifies all attributes.
- object.attributeName.,...
- Specifies a comma-separated list of agent attributes to return.
- name=name
- type=validAgentType
- Specifies the type of agent to return information about. The value can be one of the following values:
- all
- Specifies that information about all agents is returned.
standard,connectDirectBridge, andprotocolBridgeagent information is returned. - standard
- Specifies that information about agent of type
standardis returned. - connectDirectBridge
- Specifies that information about agents of type
connect direct bridgeis returned. - protocolBridge
- Specifies that information about agents of type
protocol bridgeis returned.
- state=validAgentState
- Specifies the state of the agent to return information about. The value can be one of the
following values:
- all
- Specifies that information about all agents is returned. This information includes all the valid states listed in the following text.
- active
- Specifies that information about agents that are in an active state is returned.
- ready
- Specifies that information about agents that are in a ready state is returned.
- starting
- Specifies that information about agents that are in a starting state is returned.
- unreachable
- Specifies that information about agents that are in an unreachable state is returned.
- stopped
- Specifies that information about agents that are in a stopped state is returned.
![[MQ 9.3.0 Jun 2022]](ng930cd.gif)
stopping- Specifies that information about agents that are in a stopping state is returned.
- endedUnexpectedly
- Specifies that information about agents that are in an endedUnexpectedly state is returned.
- noInformation
- Specifies that information about agents that are in a noInformation state is returned.
- unknown
- Specifies that information about agents that are in an unknown state is returned.
- problem
- Specifies that information about agents that are in a problem state is returned.
Request headers
- Authorization
- This header must be sent if you are using basic authentication. For more information, see Using HTTP basic authentication with the REST API.
Request body format
None.
Security requirements
The caller must be authenticated to the mqweb server and must be a member of one
or more of the MFTWebAdmin, MFTWebAdminRO or
MQWebUser roles. For more information about security for the administrative REST API, see IBM MQ Console and REST API security.
The security principal of the caller must be granted authority to subscribe to the
SYSTEM.FTE/Agents topic.
If token based security is used, the LTPA token that is used to authenticate the user must be provided with the request as a cookie. For more information about token-based authentication, see Using token-based authentication with the REST API.
Response status codes
- 200
- Agent information retrieved successfully.
- 400
- Invalid data provided.
- 401
- Not authenticated.
- 403
- Access prohibited for one of the following reasons:
- Not authorized. The caller is authenticated to the mqweb server and is associated with a valid
principal. However, the principal is not a member of one or more of the
MFTWebAdmin,MFTWebAdminRO, orMQWebUserroles. For more information about the access that is required, see Security requirements.
Access prohibited in the current server environment. The administrative REST API is not available in a stand-alone IBM MQ Web Server installation.
- Not authorized. The caller is authenticated to the mqweb server and is associated with a valid
principal. However, the principal is not a member of one or more of the
- 404
- Agent does not exist.
- 500
- Server issue or error code from IBM MQ.
- 503
- Queue manager not running.
Response headers
- Content-Type
- This header is returned with a value of
application/json;charset=utf-8.
Response body format
agent. Each element in the array is a JSON
object that represents information about an agent. Each of these JSON objects contains the following attributes:- name
- String.
- type
- String.
- state
- Specifies the state of the agent. The value can be one of the following values:
- active
- ready
- starting
- unreachable
![[MQ 9.3.0 Jun 2022]](ng930cd.gif)
stopping- stopped
- general
- Contains attributes that are related to general agent properties, such as the agent description, the agent age, and the version and level of the queue manager.
- queueManagerConnection
- This object provides information about the queue manager connections, such as the queue manager name, and transport type.
- connectDirectBridge
- This object provides information about to connect direct bridge type agent, such as the node name, host, and port.
- protocolBridge
- This object provides information about protocol bridge type agent, such as the endpoints and default server.
- standbyInstance
- This object provides information about the status of the standby instances
For more information, see Response body attributes for transfers.
If an error occurs, see REST API error handling.
Examples
- agent name
- agent type
- agent state
https://localhost:9443/ibmmq/rest/v2/admin/mft/agent/{
"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"
}
]}
https://localhost:9443/ibmmq/rest/v2/admin/mft/agent?attributes=general&type=standard{
"agent":[{
"name": "SRC",
"state": "ready",
"type": "standard",
"general": {
"description": "Standard connected to the qmgr in client mode",
"statusAge": "06:31:00",
"version": "9.1.5.0",
"level": "p915-L190514",
"statusPublicationRate": 300,
"statusPublishTime": "2019-05-14T06:57:07.000Z",
"maximumQueuedTransfers": 1000,
"maximumDestinationTransfers": 25,
"maximumSourceTransfers": 25,
"operatingSystem": "Windows10"
},
"standbyInstance": [
{
"host":"MFTHA1",
"version":"9.1.5.0"
},
{
"host":"9.122.123.124",
"version":"9.1.5.0"
}
]
}]
}
Note that the standbyInstance attributes are displayed only if
the agent is enabled as highly available.
https:/localhost:9443/ibmmq/rest/v2/admin/mft/agent?name=AGENT*&state=ready&type=standard&attributes=general.statusAge{
"agent":[{
"name": "AGENT1",
"state": "ready",
"type": "standard",
"general":{
"statusAge": "05:00:00"
}
},
{
"name": "AGENT2",
"state": "ready",
"type": "standard",
"general":{
"statusAge": "03:00:00"
}
},
{
"name": "AGENT3",
"state": "ready",
"type": "standard",
"general":{
"statusAge": "05:00:00"
}
}
]}