2 Replies Latest reply on Aug 25, 2014 11:43 PM by 26770

    Getting a list of available fields through the SOAP API

      I'm building something outside Marketo for some custom work. Is there any command I can use with the SOAP API to obtain a list of available fields in the instance? Listing api-name, friendly name, and field-type (e.g. int, datetime).

      Manually, I could export the field names through the admin section of course. And import it manally again. But it only supplies: REST API Name, SOAP API Name, and Friendly Label. But not Type.
        • Re: Getting a list of available fields through the SOAP API
          Currently this is not possible via the SOAP API. 

          With the REST API, this month we released this endpoint that should help here:
          • Re: Getting a list of available fields through the SOAP API
            Thank you Murtza! Then I should invest some time in understanding the REST API. Not sure if it's worth the time investment. All I basically need is a script the pulls the available fields of the instance and stores is in a mysql database. All in PHP.

            Script idea:
            1. Get the crdentials from the mysql database, needed to connect.
            2. Use credentials to start the connection with the Marketo instance.
            3. Use "describe" to load all the fields (respons in JSON?)
            4. Break up the response in order to populate it in mysql (in an array?)
            5. Put each field in mysql (id, instance id, displayName, dataType, rest->name, soap->name, lenght)

            I only know how PHP, MYSQL, HTML, CSS, XML, and basic Javascript and jQuery. I have no experience with JSON, nor with coding (in PHP) for SOAP or REST.

            Is there an example script for REST in PHP, which I can use? To at least get the connection started. And to see how I can turn the JSON format into an array, whcih I can use to further process the feedback?