|
API
Rejaw API documentation
IntroductionRejaw offers a full set of API so that developers can build tools that interoperate with Rejaw's functionality. This document is a reference for the API. BasicsHTTP methodsThe Rejaw API allows both GET or POST. We recommend that you comply with the design principles of Representational State Transfer (REST) as long as possible, but if you can't for some reason, it's also fine that you simply use GET for everything. FormatsRejaw supports JSON, XML as data formats. Unless otherwise stated, all API methods support XML and JSON as a response format, in the form of extension such as .json and .xml respectively. When the extension is omitted, XML is used by default.
When JSON is specified, all methods accept a callback parameter, which will pass the JSON object to a given function so that you can simply eval the response. For instance, when callback=myFunc is given, the response body will look like this: myFunc({"status": "ok", "session": "2lA42FcLddH"})Character EncodingRejaw uses and expects UTF-8 encoding everywhere. That's the long and short of it. TimestampsAll timestamps are given in the format of ISO 8601 standard with UTC timezone. 2008-04-16T22:53:20Z API KeysTo use the Rejaw API, you need to have an API key. To generate a key, you need to register your application. Session and AuthenticationThere are two types of API methods: The ones that require authentication, and the ones that don't. With an API that requires authentication, you'll find yourself doing the following steps all the time:
Rate LimitingThe API currently has no limit on the number of requests applications can make, but we reserve the right to apply rate limiting at our discretion. Please be kind to the API and try to use the minimum number of requests to accomplish a task. If you need help figuring out how to efficiently perform a task, feel free to ask in the Discussion. Flash/ActionScript DevelopersThe crossdomain.xml is located at http://api.rejaw.com/crossdomain.xml. Error CodesWhen an API call fails, it returns an error code describing what went wrong. A complete list of error codes is available here. TutorialIf your system has curl, you’ve already got a great way to poke around the Rejaw API. Here are some examples:
Replace {YOUR_API_KEY}, {YOUR_USERNAME} and {A_CONVERSATION_ID} to real ones. If you want more, here's the tutorial to learn the overview of how the Rejaw API works. API MethodsSession
Authentication
User
Conversation
Room
Subscription
Event
Timeline
Search
FeedsHere's the list of available feeds on Rejaw. ResourcesRecent Changes
Got a comment?If you've got something to say about the API reference, please let us know in the Rejaw Google Groups. |