Displaying message flows by using the administration REST API

You can use the IBM® App Connect Enterprise administration REST API to display the message flows that are deployed to an integration server.

Before you begin

Read the following topics:

About this task

Displaying message flows in an application

About this task

You can display the message flows that are deployed to an integration server in an application.

Procedure

Display the message flows.

  • For an independent integration server:
    GET http://hostname:port/apiv2/applications/applicationName/messageflows

    For example, to display the message flows in application HTTPInputApplication, use the following curl command:

    curl -X GET http://hostname:port/apiv2/applications/HTTPInputApplication/messageflows
    If the command is successful and there are message flows deployed to the integration server in application HTTPInputApplication, an HTTP status code 200 and a response similar to the following are returned:
    {
        "hasChildren": true,
        "name": "messageflows",
        "type": "messageFlows",
        "uri": "/apiv2/applications/HTTPInputApplication/messageflows",
        "properties": {},
        "descriptiveProperties": {},
        "active": {},
        "actions": {
            "available": {
                "start": "/apiv2/applications/HTTPInputApplication/messageflows/start",
                "stop": "/apiv2/applications/HTTPInputApplication/messageflows/stop"
            }
        },
        "children": [
            {
                "hasChildren": true,
                "name": "RequestService",
                "type": "messageFlow",
                "uri": "/apiv2/applications/HTTPInputApplication/messageflows/RequestService"
            },
            {
                "hasChildren": true,
                "name": "ResponseService",
                "type": "messageFlow",
                "uri": "/apiv2/applications/HTTPInputApplication/messageflows/ResponseService"
            }
        ],
        "links": []
    }
    
    Additionally, you can use the depth query parameter in the API call to obtain more information about the message flows. For example, use the following curl command:
    curl -X GET http://hostname:port/apiv2/applications/applicationName/messageflows?depth=2
  • For an integration server that is managed by an integration node:
    GET http://hostname:port/apiv2/servers/integrationServerName/applications/applicationName/messageflows

    For example, to display the message flows that are deployed in application HTTPInputApplication to integration server ACESERV1, which is managed by an integration node, use the following curl command:

    curl -X GET http://hostname:port/apiv2/servers/ACESERV1/applications/HTTPInputApplication/messageflows
    If the command is successful and there are message flows deployed to the integration server, an HTTP status code 200 and a response similar to the following are returned:
    {
        "hasChildren": true,
        "name": "messageflows",
        "type": "messageFlows",
        "uri": "/apiv2/servers/ACESERV1/applications/HTTPInputApplication/messageflows",
        "properties": {},
        "descriptiveProperties": {},
        "active": {},
        "actions": {
            "available": {
                "start": "/apiv2/servers/ACESERV1/applications/HTTPInputApplication/messageflows/start",
                "stop": "/apiv2/servers/ACESERV1/applications/HTTPInputApplication/messageflows/stop"
            }
        },
        "children": [
            {
                "hasChildren": true,
                "name": "RequestService",
                "type": "messageFlow",
                "uri": "/apiv2/servers/ACESERV1/applications/HTTPInputApplication/messageflows/RequestService"
            },
            {
                "hasChildren": true,
                "name": "ResponseService",
                "type": "messageFlow",
                "uri": "/apiv2/servers/ACESERV1/applications/HTTPInputApplication/messageflows/ResponseService"
            }
        ],
        "links": []
    }
    
    Additionally, you can use the depth query parameter in the API call to obtain more information about the message flows. For example, use the following curl command:
    curl -X GET http://hostname:port/apiv2/servers/integrationServerName/applications/applicationName/messageflows?depth=2 

Displaying message flows in a REST API project

About this task

You can display the message flows that are deployed to an integration server in a REST API project.

Procedure

Display the message flows.

  • For an independent integration server:
    GET http://hostname:port/apiv2/rest-apis/rest-apiName/messageflows

    If the command is successful, an HTTP status code 200 and information about the message flows that are deployed in the REST API project, if any, are returned.

  • For an integration server that is managed by an integration node:
    GET http://hostname:port/apiv2/server/integrationServerName/rest-apis/rest-apiName/messageflows

    If the command is successful, an HTTP status code 200 and information about the message flows that are deployed in the REST API project, if any, are returned.

Displaying message flows in an integration service project

About this task

You can display the message flows that are deployed to an integration server in an integration service project.

Procedure

Display the message flows.

  • For an independent integration server:
    GET http://hostname:port/apiv2/services/integrationServiceName/messageflows

    If the command is successful, an HTTP status code 200 and information about the message flows that are deployed in the integration service project, if any, are returned.

  • For an integration server that is managed by an integration node:
    GET http://hostname:port/apiv2/servers/integrationServerName/services/integrationServiceName/messageflows

    If the command is successful, an HTTP status code 200 and information about the message flows that are deployed in the integration service project, if any, are returned.