The Official Blog of Cogmap, the Org Chart Wiki



Cogmap API Update July 2008

Cogmap is pleased to introduce the first significant changes to the Cogmap APIs since their introduction.

These changes incorporate our new URL schemes and also support application authentication.

Here is the low-down:

Organization Chart Data is accessible as an XOXO document by calling a URL formatted as<CHART NAME>

This returns a nested set of unordered lists that describes the organization. Each listed item also contains several pieces of metadata associated with the list. The format is:

<li><a href=”profile.php?id=<personID>”> <FirstName> <LastName> </a> <dl> <dt>Title</dt> <dd><TitleValue></dd> <dt>CogID</dt> <dd><personID></dd> </dl>

  • personID: the ID in Cogmap’s database
  • FirstName: Person’s first name
  • LastName: Person’s last name
  • TitleValue: Person’s title
  • The title of the document is the chart’s name.

So here is an awesome example: XOXO No Inc Chart!

There are a number of other interesting things you can do:

  • If you weren’t sure, for some reason, how Cogmap has changed the name of a company into the URL schema that Cogmap uses, you can tell it to guess by setting the interpret flag.  This might look like: inc?interpret=1 and it will take a shot.  If it fails, or if, in general, Cogmap doesn’t recognize what you are looking for, a 404 is returned.
  • All of Cogmap’s APIs, and for that matter, all of the pages that are protected by access control, can now be accessed programmatically.  On every member’s user settings page there is an “API Key”.  Using your user name and API key will allow you to access protected pages programmatically by adding the following to your “GET” query string:
    • user=<username>
    • apikey=<api key>

All of these APIs still work:

hCards & vCards

  • Every profile page is actually an hCard. Munch it, crunch it, consume it.
  • You can download vCards easy too.<ID of Profile>

Newsfeed API

  • Consume your newsfeed!<your screen name> returns an XOXO XML document of your newsfeed. This makes it easy to turn your newsfeed into something consumed by other applications. Here is my newsfeed as an example.

One Response to “Cogmap API Update July 2008”

  1. shawn Says:

    the interpreter param doesn’t seem to be effective, trying:

    Doesn’t seem to be able to result in:

    Not sure how the expression is being checked on the back end but, this one is an example using something very unique’d in the database.

    Let me know if you have any thoughts/recommendations.