GET
Use the HTTP GET method with the monitor resource to list information
about the MFT resource monitor status, and
other configuration information.
- You must set a coordination queue manager before you can use the
monitorresource. For more information, see Configuring the REST API for MFT.
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.
For more information about configuring the MFT REST service, see Configuring the REST API for MFT.
Resource URL
https://host:port/ibmmq/rest/v3/admin/mft/monitor/{monitorName}
- monitorName
- Optionally specifies the name of the monitor 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
- Specifies a comma-separated list of attributes to retrieve.
- name
- Specifies the name of the resource monitor.
- agentName
- Name of the agent that owns the resource monitor.
- state
- The status of the resource monitor.
- type
- The type of the resource monitor.
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/Monitor 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
- Resource monitor 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. You cannot use the administrative REST API with the stand-alone IBM MQ Web Server.
- 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
- Specified monitor not found.
- 405
- Method not allowed.
- 500
- Server issue or error code from IBM MQ.
- 503
- Service unavailable. IBM MQ specific reason code is also returned.
Response headers
- Content-Type
- This header is returned with a value of
application/json;charset=utf-8.
Response body format
The response is in JSON format in UTF-8 encoding. The response contains an outer JSON object that
contains a single JSON array called monitor.
- name
- String.
- agentName
- String.
- type
- String.
- state
- String.
- resource
- JSON Object.
- userProperties
- JSON Object.
- defaultVariables
- JSON Object.
- general
- JSON object.
- triggerCondition
- JSON object.
- triggerFileContentFormat
- JSON object.
- transferDefinition
- JSON object.
For more information, see Response body attributes for list resource monitor.
If an error occurs, see REST API error handling.
Examples
The following example returns a default set of data for all resource monitors.
https://localhost:9443/ibmmq/rest/v3/admin/mft/monitor{"monitor":[
{ "name"":"DIRMONWILDCARD",
"agentName":"SRCWILDCARD",
"type":"directory",
"state"":"started",
"resource": {
"name": "C:\\MFT"
}
},
{ "name":"DIRMONREGEX",
"agentName":"SRCDIRREG",
"type":"directory",
"state":"started",
"resource": {
"name": "C:\\MFT"
}
},
{ "name":"DIRMONREGEXFILESIZECHANGE",
"agentName":"SRCDIR",
"type":"directory",
"state":"started",
"resource": {
"name": "C:\\MFT"
}
}]
}
DIRMONWILDCARD. The following URL is used with the HTTP GET
method:https://localhost:9443/ibmmq/rest/v3/admin/mft/monitor/DIRMONWILDCARD{"monitor":[
{ "name":"DIRMONWILDCARD",
"agentName":"SRCWILDCARD",
"type":"directory",
"state":"started",
"resource": {
"name": "C:\\MFT"
}
}]
}
DIR. The following URL is used with the HTTP GET
method:https://localhost:9443/ibmmq/rest/v3/admin/mft/monitor?name=DIR*{"monitor":[
{ "name":"DIRMONWILDCARD",
"agentName":"SRCWILDCARD",
"type":"directory",
"state":"started",
"resource": {
"name": "C:\\MFT"
}
},
{ "name":"DIRMONREGEX",
"agentName":"SRCDIRREG",
"type":"directory",
"state":"started",
"resource": {
"name": "C:\\MFT"
}
},
{ "name":"DIRMONREGEXFILESIZECHANGE",
"agentName":"SRCDIR",
"type":"directory",
"state":"started",
"resource": {
"name": "C:\\MFT"
}
}]
}
directory and the state is stopped. The following URL is used with
the HTTP GET
method:https://localhost:9443/ibmmq/rest/v3/admin/mft/monitor?type=directory&state=stopped{"monitor": [
{ "name":"TRIGCONTENTSCSTM",
"type":"directory",
"state":"stopped",
"agentName":"TRIGCONTCSTM",
"resource": {
"name": "C:\\MFT"
}
}]
}