API

Structure of an API Request

All requests to the API follow a single URL pattern for requesting the return type and entity being requested. Within each API set is an additional set of parameters that allow for get the exact data needed.

Request Format

The following URL identifies the generic structure of all API requests.
http://domain/format/entity/param/?token=application-token&secret=client-secret
  • domain
    • All API requests point to a single endpoint, api.activecalendar.com, for processing.
  • format
    • Value: xml
      The API response format will be XML.
    • Value: json
      The API response format will be JSON.
  • entity
    • Value: events/event
      • Refer to the event search documentation for more information.
      • Refer to event lookup documentation for more information.
      • Refer to event add documentation for more information.
    • Value: categories
      • Refer to the categories documentation for more information.
    • Value: locations
      • Refer to the locations documentation for more information.
  • param
    • Optional URL parameters used to further define an API request. A param value always acts on an API entity. When used with events the a param value might be a key that identifies a default date range to find events or the unique route used to find a single event.
    • Refer to the API entity sections for explanations of param values that can be used with each entity.
  • query
    • Value: token
      Required 96 character application identifer
      The token value is similar to a user name used for authentication and can be known by anyone.
    • Value: secret
      Required 96 character secret client identifer
      The client value is similar to a password used for authentication and should be kept secret.
      The client secret is optional when an application is in debug mode for easier testing.
    • Refer to the API entity sections for explanations of query values that can be used with each entity.

Build A Request URL

XML or JSON

The starting point of creating a request is to specify the output format the API should use.
For XML Responses: http://api.activecalendar.com/xml/
For JSON Responses: http://api.activecalendar.com/json/

What Do You Want

The entity the request is will interact with must be specified with any optional param values as well. The URL's below would be the starting point for all XML API requests.

Secure The Request

http://api.activecalendar.com/xml/events/
All API request need a token and secret to get a response for an API requests. However these parameters are the most cryptic and verbose part of the request URL and can easily cause the format of URL to become invalid. So make sure the base URL and the entity are correct then add on the token and secret to the URL.
token=MzI0NzFkZDAtZDZmMC00NTI1LWJhZ......zExZWQtNDAzZC00ZjQ3LWIxYmMtZGMwNmQ4MjcxNWFh
secret=OWVmNTNlMzItNzljNS00ZjgwLWJm..................jYzAxNg4YTQymEtN2Q2YS00MzjQtMzA1ZDE4Nzg1Njhk

Final API Request URL

Combine the all the parts to get the final API request URL (in this case, one that will return back a list of events for the next 7 days).
http://api.activecalendar.com/xml/events/?token=ZDg2ZDE...cxNjc5ZGI0&secret=OWVmNT...ZDE4Nzg1Nj