SOLVED

Re: Access to activity details with REST API

Go to solution
Daizen_Ikehara
Level 1

Access to activity details with REST API

Hi,

I wanted to export activity details to an excel format, but default export did not meet my requirement, so I tried REST APIs.

Now, I have managed to access to Lead's activities with REST API, but I cannot find a way to retrieve payload contents of webhook.

Is there a way to access the following data via APIs?

click details,

program_results.JPG

then it shows details, I want to extract payloads.

Activitiy Details.JPG

any idea?

thanks,

Daizen

Tags (2)
1 ACCEPTED SOLUTION

Accepted Solutions
SanfordWhiteman
Level 10 - Community Moderator

Re: Access to activity details with REST API

What you mean is you want access to the HTTP Request Payload. The "details" of the HTTP Response are there in your JSON.

You can't get any data that's not revealed by the Activity API.

View solution in original post

7 REPLIES 7
SanfordWhiteman
Level 10 - Community Moderator

Re: Access to activity details with REST API

You're not providing enough information.

Show the API-based Activity Log export for the Webhook is Called activity and what you're not seeing that you expect to see. Use the Advanced Editor's syntax highlighter to highlight the JSON.

Daizen_Ikehara
Level 1

Re: Access to activity details with REST API

This is what I am getting as responses from Activity API:

{"requestId":"14d1b#168bc0a6468","result":

[{

"id":10387726,

"marketoGUID":"10387726",

"leadId":xxxx,

"activityDate":"2019-02-04T08:42:52Z",

"activityTypeId":110,

"campaignId":1244,

"primaryAttributeValueId":3,

"primaryAttributeValue":"MS Teams Webhook - Customer Inquries",

"attributes":[

{"name":"Error Type","value":200},

{"name":"Response","value":"1"},

{"name":"Campaign","value":"Contact Forms.01-Filled-out Form"}]

}

...

What I got is AttributeValueId and AttributeValue that is string. I want to access to the details based this ID, but have no idea what API I should call.

thanks,

Daizen

SanfordWhiteman
Level 10 - Community Moderator

Re: Access to activity details with REST API

What you mean is you want access to the HTTP Request Payload. The "details" of the HTTP Response are there in your JSON.

You can't get any data that's not revealed by the Activity API.

Avtar_Singh1
Level 2

Re: Access to activity details with REST API

Hi Daizen Ikehara,

Marketo REST API does not provide an option to include activity attributes to the response. API provides a parameter (assetIds) in the request header to fetch activity details. However, through this parameter webhook "Pay Load" is not retrieved.

Following is the endpoint for the same:

http://developers.marketo.com/rest-api/endpoint-reference/lead-database-endpoint-reference/#!/Activi...

Best Regards,

Avtar Singh

SanfordWhiteman
Level 10 - Community Moderator

Re: Access to activity details with REST API

assetIds narrows the response, it doesn't widen it.

My answer was already complete: you can't get information that is not present in the widest activity export. Obviously the OP has read the endpoint docs.

Daizen_Ikehara
Level 1

Re: Access to activity details with REST API

Thank you Sanford, Avtar, I will consider another way.

SanfordWhiteman
Level 10 - Community Moderator

Re: Access to activity details with REST API

If you need to record request payloads, 2 ways come to mind. Both involve using an API gateway (I assume you cannot directly alter the response from the far endpoint):

  1. Have the gateway echo the entire request payload into an additional response property (like originalRequest) before returning the response to Marketo
  2. Download the gateway's logs in addition to Marketo's, since it can see the whole thing.