Saturday, April 18, 2020

#761 OIC - Monitoring API - Getting Activity Stream data

Simple example here -

The above integration does little, receives a JSON request and maps that to a JSON response.
But it will suffice to show how we can leverage the AI to retrieve activity stream data for an integration flow.

Here is the monitoring view -

Now to get this data, via the OIC REST API -

The api is documented here

I start with - /ic/api/integration/v1/monitoring/instances/{id}

I then add the instance id - 27600257 (See monitoring screenshot)


I try this out -

Response -

Ok, so no activity stream data here -

All I need to do is add this to the request URL -


I test again -

Response is a list in the format -

interesting here is the Milestone value - e.g. ST

These milestones correspond to the activity stream -
Let's look at that again -

So what's happening here?

1. Instance started
2. Message Received
3. Data Mapping
4. Response sent

In my REST response I see the following milestones -

"ST", "r0", "m0", "y0".

I can add these to my REST request -

e.g. /ic/api/integration/v1/monitoring/instances/27600257/activityStream/r0

I test and view the response -

and there is my payload.

Now, I execute the REST request for the end milestone - y0.

Here I see the response -

A big thank you to my colleague Arya for the pointers.

No comments: