Using the curl command to access the indexers MBeans
You can use the curl command to view process and BPEL indexers MBean attributes, modify the
attributes that are not in read-only mode, and invoke operations.
Querying all the MBean attributes for an indexer
All the remotely accessible MBean attributes for the indexers are returned by the REST API
endpoint:
GET /IBMJMXConnectorREST/mbeans/{MBean
objectName}/attributes. The corresponding curl command to access this endpoint
is:- For process indexers:
curl –X GET -s -u user:password -k 'https://hostname:port/IBMJMXConnectorREST/mbeans/com.ibm.bpm.federation.server:name=indexerUniqueID,subtype=BpdIndexers,type=Indexers/attributes' - For BPEL indexers:
curl –X GET -s -u user:password -k 'https://hostname:port/IBMJMXConnectorREST/mbeans/com.ibm.bpm.federation.server:name=indexerUniqueID,subtype=BpelIndexers,type=Indexers/attributes'
- user is the user name, and password is the password of a Liberty user that has an administrative role.
- hostname is the Process Federation Server hostname.
- port is the HTTPS port.
- indexerUniqueID is the string based on the ID of the indexer and of the federated system it refers to (for more information, see the MBean objectName section in Monitoring and administering process indexers and Monitoring and administering BPEL indexers).
[
{"name": attributeName1,"value":{"value":attributeValue1,"type":attributeType1}},
{"name": attributeName2,"value":{"value":attributeValue2,"type": attributeType2}},
…
]
This command returns an exception encapsulated in a JSON object when:
- the MBean is not yet registered on Process Federation Server.
- the federated system ID refers to a federated system that does not exist, or that is not running.
Querying a specific MBean attribute for an indexer
The value of a specific MBean attribute for an indexer is returned by the REST API endpoint:
GET /IBMJMXConnectorREST/mbeans/{MBean
objectName}/attributes/{attributeName}. The corresponding curl
command to access this endpoint is:- For process indexers:
curl –X GET -s -u user:password -k 'https://hostname:port/IBMJMXConnectorREST/mbeans/com.ibm.bpm.federation.server:name=indexerUniqueID,subtype=BpdIndexers,type=Indexers/attributes/attributeName' - For BPEL indexers:
curl –X GET -s -u user:password -k 'https://hostname:port/IBMJMXConnectorREST/mbeans/com.ibm.bpm.federation.server:name=indexerUniqueID,subtype=BpelIndexers,type=Indexers/attributes/attributeName'
- user is the user name, and password is the password of a Liberty user that has an administrative role.
- hostname is the Process Federation Server hostname.
- port is the HTTPS port.
- indexerUniqueID is the string based on the ID of the indexer and of the federated system it refers to (for more information, see the MBean objectName section in Monitoring and administering process indexers and Monitoring and administering BPEL indexers).
- attributeName is a valid attribute that is remotely accessible by the indexer MBean.
{"value": attributeValue,"type": attributeType}Example:
curl –X GET -s -u uid=admin,o=defaultWIMFileBasedRealm:admin -k 'https://pfsHost.com:9443/IBMJMXConnectorREST/mbeans/com.ibm.bpm.federation.server:name=bpd1.default-0,
subtype=BpdIndexers,type=Indexers/attributes/status'
{"value":"WAITING_FOR_NEXT_CYCLE","type":"java.lang.String"}
Note: The
attribute name is case sensitive.
This command returns an exception encapsulated in a JSON
object when:- the MBean is not yet registered on Process Federation Server.
- the federated system ID refers to a federated system that does not exist or that is not running.
- the attribute name does not exist
Modifying a specific MBean attribute for an indexer
The value
of a specific read-write MBean attribute for an indexer can be modified using the REST API endpoint:
POST /IBMJMXConnectorREST/mbeans/{MBean
objectName}/attributes/{attributeName}. The corresponding curl
command to access this endpoint is as follows, and you replace newAttributeValue
with the new value that you want to assign to the attribute.:- For process indexers:
curl –X POST -s -u user:password –k -H 'Content-Type: application/json' -d '[ { "name":attributeName, "value": { "value":newAttributeValue, "type":attributeType } } ]' 'https://hostname:port/IBMJMXConnectorREST/mbeans/com.ibm.bpm.federation.server:name=indexerUniqueID,subtype=BpdIndexers,type=Indexers/attributes' - For BPEL indexers:
curl –X POST -s -u user:password –k -H 'Content-Type: application/json' -d '[ { "name":attributeName, "value": { "value":newAttributeValue, "type":attributeType } } ]' 'https://hostname:port/IBMJMXConnectorREST/mbeans/com.ibm.bpm.federation.server:name=indexerUniqueID,subtype=BpelIndexers,type=Indexers/attributes'
- user is the user name, and password is the password of a Liberty user that has an administrative role.
- attributeName is an attribute name that is remotely accessible by the indexer MBean
- newAttributeValue is the new value to assign to the attribute.
- attributeType is the type of the attribute.
- hostname is the Process Federation Server hostname.
- port is the HTTPS port.
- indexerUniqueID is the string based on the ID of the indexer and of the federated system it refers to (for more information, see the MBean objectName section in Monitoring and administering process indexers and Monitoring and administering BPEL indexers).
[{"name":attributeName,"value":{"value":newAttributeValue,"type":attributeType}}]Example:curl -X POST -i -u uid=admin,o=defaultWIMFileBasedRealm:admin -k
-H 'Content-Type: application/json'
-d '[ { "name":"scheduledSyncTasks", "value": { "value":"true", "type":"java.lang.Boolean" } } ]'
'https://pfsHost.com:9443/IBMJMXConnectorREST/mbeans/com.ibm.bpm.federation.server:name=bpdl1,subtype=BpdIndexers,type=Indexers/attributes'
[{"name":"scheduledSyncTasks","value":{"value":"true","type":"java.lang.Boolean"}}]
Note: The
attribute name is case sensitive
This command returns an exception encapsulated in a JSON
object when:- the MBean is not yet registered on Process Federation Server.
- the federated system ID refers to a federated system that does not exist or that is not running.
- the attribute name does not exist
Invoking an operation on an indexer MBean
The remotely accessible MBean operations for indexers are returned by the REST API endpoint:
POST /IBMJMXConnectorREST/mbeans/{MBean
objectName}/operations/{operationName}. The corresponding curl
command to access this endpoint is:- For process indexers:
curl –X POST -s -u user:password –k -H 'Content-Type: application/json' -d '{"params": [ { "value": "", "type":"java.lang.String" } ], "signature": []}' 'https://hostname:port/IBMJMXConnectorREST/mbeans/com.ibm.bpm.federation.server:name=indexerUniqueID,subtype=BpdIndexers,type=Indexers/operations/operationName' - For BPEL indexers:
curl –X POST -s -u user:password –k -H 'Content-Type: application/json' -d '{"params": [ { "value": "", "type":"java.lang.String" } ], "signature": []}' 'https://hostname:port/IBMJMXConnectorREST/mbeans/com.ibm.bpm.federation.server:name=indexerUniqueID,subtype=BpelIndexers,type=Indexers/operations/operationName'
- user is the user name, and password is the password of a Liberty user that has an administrative role.
- hostname is the Process Federation Server hostname.
- port is the HTTPS port.
- indexerUniqueID is the string based on the ID of the indexer and of the federated system it refers to (for more information, see the MBean objectName section in Monitoring and administering process indexers and Monitoring and administering BPEL indexers).
- operationName is the valid name of an operation.
{"value":returnedValue,"type":returnedValueType}Example:curl -X POST –s -u uid=admin,o=defaultWIMFileBasedRealm:admin -k
-H 'Content-Type: application/json' -d '{"params": [ { "value": "", "type":"java.lang.String" } ], "signature":
[]}' 'https://pfsHost.com:9443/IBMJMXConnectorREST/mbeans/com.ibm.bpm.federation.server:name=bpdl1,subtype=BpdIndexers,type=Indexers/operations/runUnscheduledSyncTasks'
{"value":"status=acknowledged","type":"java.lang.String"}
If
the invoked operation does not hold any value, then the following JSON object is
returned:{"value":null,"type":null}
This command returns an exception
encapsulated in a JSON object when:- the MBean is not yet registered on Process Federation Server.
- the federated system ID refers to a federated system that does not exist or that is not running.
- the operation name does not exist
This topic only applies to BAW, and is located in the BAW repository. Last updated on 2025-03-13 12:15