SOLVED

Re: API: Pull Activity for just a single type of form?

Go to solution
Anonymous
Not applicable

API: Pull Activity for just a single type of form?

Hi Nation!

Hoping someone can help me out: When pulling form fill out activity from the SOAP or REST API, is it possible to pull just the activities related to a specific FORM ID? I feel like this should be possible, but I didn't see anything in the API documentation to support this.

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
John_M
Marketo Employee

Re: API: Pull Activity for just a single type of form?

You'd have to do it a bit programmatically, I think. If you're using REST and you call "Get Activity Types" This is what comes back for a form fill. Note the primary attribute is form fill ID. I think it would involve calling all activity of a certain type (or types) and then parsing the jSON response for the form ID you're interested in.

Note that the form ID is the value after "FO# in the editor.

does that help?

{

      "id": 2,

      "name": "Fill Out Form",

      "description": "User fills out and submits a form on web page",

      "primaryAttribute": {

        "name": "Webform ID",

        "dataType": "integer"

      },

      "attributes": [

        {

          "name": "Client IP Address",

          "dataType": "string"

        },

        {

          "name": "Query Parameters",

          "dataType": "string"

        },

        {

          "name": "Referrer URL",

          "dataType": "string"

        },

        {

          "name": "User Agent",

          "dataType": "string"

        },

        {

          "name": "Webpage ID",

          "dataType": "integer"

        }

      ]

    },

View solution in original post

4 REPLIES 4
SanfordWhiteman
Level 10 - Community Moderator

Re: API: Pull Activity for just a single type of form?

There's no filter like this as far as I know.

John_M
Marketo Employee

Re: API: Pull Activity for just a single type of form?

You'd have to do it a bit programmatically, I think. If you're using REST and you call "Get Activity Types" This is what comes back for a form fill. Note the primary attribute is form fill ID. I think it would involve calling all activity of a certain type (or types) and then parsing the jSON response for the form ID you're interested in.

Note that the form ID is the value after "FO# in the editor.

does that help?

{

      "id": 2,

      "name": "Fill Out Form",

      "description": "User fills out and submits a form on web page",

      "primaryAttribute": {

        "name": "Webform ID",

        "dataType": "integer"

      },

      "attributes": [

        {

          "name": "Client IP Address",

          "dataType": "string"

        },

        {

          "name": "Query Parameters",

          "dataType": "string"

        },

        {

          "name": "Referrer URL",

          "dataType": "string"

        },

        {

          "name": "User Agent",

          "dataType": "string"

        },

        {

          "name": "Webpage ID",

          "dataType": "integer"

        }

      ]

    },

SanfordWhiteman
Level 10 - Community Moderator

Re: API: Pull Activity for just a single type of form?

John, obvs. that would work, but when you're parsing client-side that means you are going to use up your API calls on unwanted records.

John_M
Marketo Employee

Re: API: Pull Activity for just a single type of form?

Sanford, I disagree. There is nothing in this thread that indicates this is a client side rest call. I'd assume this is being done in some secure middle tier, which is the best practice.

If you have a better solution given the current end points in the REST API, feel free to share them.