Access to activity details with REST API | Community
Skip to main content
Daizen_Ikehara
Level 2
February 6, 2019
Solved

Access to activity details with REST API

  • February 6, 2019
  • 2 replies
  • 5385 views

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,

then it shows details, I want to extract payloads.

any idea?

thanks,

Daizen

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by SanfordWhiteman

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.

2 replies

SanfordWhiteman
Level 10
February 6, 2019

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 2
February 6, 2019

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
SanfordWhitemanAccepted solution
Level 10
February 6, 2019

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
February 6, 2019

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/#!/Activities/getLeadActiviti…

Best Regards,

Avtar Singh

SanfordWhiteman
Level 10
February 6, 2019

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 2
February 7, 2019

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