Skip to content
GeneStevens edited this page Mar 9, 2012 · 4 revisions

This section is a high level overview of the basic concepts involved in working with the Tag Management API.

Basics

This API is a RESTful API, which means that it is accessible over a simple HTTP/1.1 interface. We use consistent, clean URI formats and the standard HTTP verbs. All requests can be easily consumed via short command-line scripts. This documentation will provide examples of how to use curl to consume these APIs.

HTTP Verbs

We use a standard set of four HTTP Methods:

  • GET for retrieving resources
  • POST for creating new resources
  • PUT for updating existing resources
  • DELETE for removing resources

URIs

URIs are basically paths that represent distinct resources in the system. A resource is basically any object that may exist such as an individual Tag. Each such resource in the system is uniquely defined by its URI and can be reliably referenced as such. Examples of URIs are:

  • /tags/items (a list of all your tags)
  • /tags/item/item-001 (a single tag: "item-001")

JSON Documents

Our APIs are document-oriented, meaning that we thinking in terms of distinct resources represented as documents. When you get data from the system, it is a document. When you send data to the system, it is a document. In particular, the format of our documents are all JSON: a lightweight data interchange format that is easy for humans to read and write and easy for machines to understand. The format and meaning of documents will be generally self-evident and always very readable. The developer documentation on this site will describe these documents and provide real world examples demonstrating what things look like in action.

When combined with a Scheme (e.g, "https") and a Host (e.g., "api.taglabsinc.com"), you have a URL that you can use in your scripts. The above examples would look like so when referenced over the network:

Authentication

All requests will be authenticated with an Access Token. Access Tokens are attached to each HTTP request via a custom HTTP Header. See our Getting Started guide for more information on how to use Access Tokens.

  • https://api.taglabsinc.com/tags/items
  • https://api.taglabsinc.com/tags/item/item-001

Consuming the APIs

APIs in this system can be consumed by simply connecting the correct HTTP Verb with the correct URI in order ch. For example:

  • Retrieve an existing item: GET https://api.taglabsinc.com/tags/item/item-001
  • Create a new item: POST https://api.taglabsinc.com/tags/item/item-002
  • Update an existing item: PUT https://api.taglabsinc.com/tags/item/item-002
  • Delete an existing item: DELETE https://api.taglabsinc.com/tags/item/item-002

Refer to each API's individual documentation for more information on exact usage patterns with simple examples.

Clone this wiki locally