Skip to content

Instantly share code, notes, and snippets.

@gobengo
Last active November 11, 2015 16:36
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gobengo/ba5d0dec14ff3080aa6b to your computer and use it in GitHub Desktop.
Save gobengo/ba5d0dec14ff3080aa6b to your computer and use it in GitHub Desktop.

URN Resolver API

Many Livefyre APIs use Livefyre URNs as ids of the resources they describe.

The URN Resolver API allows a client to resolve a Livefyre URN to a related URL that describes or manages the resource indicated by the URN.

Use Cases

  • Given knowledge of a Livefyre Collection's Network, Site ID, and Article ID, I can create a link to manage that Collection in Livefyre Studio's web UI.

GET https://{networkName}.admin.fyre.co/api/v4/resolver/{?rel,urn}

Resolve the URN to a URL. If successful, the response will redirect you to the appropriate URL. Otherwise there will be a 404 page.

Supported URNs:

  • Collection URN - urn:livefyre:{network}:collection={collectionId}
  • Article Collection URN - urn:livefyre:{network}:site={siteId}:article={articleId}:collection

Example Requests:

Request

  • Parameters

    • networkName (string, customer-id) ... Your Livefyre Network, without '.fyre.co'. For example, if your livefyre network is customer-id.fyre.co, the networkName is customer-id
    • urn (string, urn:livefyre:labs.fyre.co:site=346785:article=1:collection) ... The URN to resolve
    • rel (string, studio) ... What kind of URL you'd like to resolve the URN to
      • Values
        • studio - Resolve to a section of Livefyre Studio to manage the resource

Responses

  • Response 302

    • Headers

        Location: {resolvedUrl}
      
  • Response 400 - Bad Request. Perhaps you didn't provide a urn and a rel.

  • Response 404 - Could not resolve.

@BigBlueHat
Copy link

@melvincarvalho linked me here because of my interest in user identifiers--see http://userinfo.me/ for some "playing" I've been doing there. 😄

Also (and more importantly), while digging around the specs for something else, I came across this (and related spec drafts) on Monday:
https://datatracker.ietf.org/wg/urc/charter/

Specifically this document may be of interest to your work here:
https://tools.ietf.org/html/draft-ietf-uri-urn2urc-00

Thanks for exploring this!
🎩

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment