ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

EE & XML API

February 03, 2012 8:03am

Subscribe [2]
  • #1 / Feb 03, 2012 8:03am

    Evolve Websites

    110 posts

    Hi there,

    I’ve got a client that is a property lettings agent. Their back-office software has the ability to be integrated with their website via an API (XML). This will then feature all their properties on their website and allow a search function.

    I’m going to be building their new website using the brilliant EE, but I’m a little stuck on where to start in exploring how to work with the API.

    Here’s my challenges:

    1. I’ve not worked with any API’s before. Can anyone point me in the direction of any resources to help me learn this?

    2. Secondly, what’s the best way to get the data that the API imports onto the website?

    3. Finally, does EE have any features that help in pulling in external data (i.e. Add-ons etc.)?

    Any help is appreciated,

    Thanks in advance!

  • #2 / Feb 03, 2012 8:06am

    Boyink!

    5011 posts

    If there’s something that would do it I think it would be http://devot-ee.com/add-ons/datagrab

  • #3 / Feb 04, 2012 3:47pm

    Dan Decker

    7338 posts

    Hi Tom,

    I second Mike’s suggestion. Datagrab can be configured to read in an XML feed, either as a URI or file path. The “grabs” can be executed on a schedule using CRON so there is little intervention required on the part of our client. Fields in your channels can be marked as unique identifiers and can be used to update existing entries. Give it a look over.

    Cheers!

  • #4 / Feb 08, 2012 9:41am

    Evolve Websites

    110 posts

    Hi Dan & Michael, thanks for your suggestions!

  • #5 / Feb 10, 2012 7:24am

    Evolve Websites

    110 posts

    Hi there Michael & Dan,

    It seems I’m making some progress with this, but I’d appreciate your thoughts (or anyone elses) on the following:

    I’ve been supplied with a sample PHP file that contains the code required to create a security ‘token’. When I enter the username and password into this PHP file, then access the file through my browser, it successfully creates a token and xml file on my server.

    The problem then comes in the fact that this XML file doesn’t contain the list of items (in this case properties) that I had expected. Instead it just contains one item with a URL like this:

    <branches xsi:noNamespaceSchemaLocation=“http://webservices.vebra.com/export/xsd/v1/exportapi.xsd”>
      <branch>
      <name>Client Name</name>
      <firmid>****</firmid>
      <branchid>****</branchid>
      <url>http://webservices.vebra.com/export/****/v1/branch/24537</url>
      </branch>
    </branches>

    Is this what you would have expected to see or is there another step required?

  • #6 / Feb 10, 2012 7:37pm

    Sean C. Smith

    3818 posts

    Tom,

    It appears that the output is not what you would expect. In this case I would recommend contacting the people responsible for the API and ask about why it isn’t outputting the data that you are expecting. Please do get back to us if you need further assistance with this.

    Sean

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases