Skip to content

Overview

Kason Chan edited this page Jun 18, 2015 · 9 revisions

This describes the resources that make up the PlayChat API v0.1. The goal of this API is to be RESTful and as simple as needed.

Current Version

By default, all requests receive the v0.1 version of the API.

Schema

All API access is over HTTP, and accessed from the 45.55.86.67:9000 All data is sent and received as JSON.

$ curl -i http://45.55.86.67:9000/api/v0.1

HTTP/1.1 200 OK
Content-Security-Policy: default-src 'self'
Content-Type: application/json; charset=utf-8
X-Content-Type-Options: nosniff
X-Frame-Options: DENY
X-Permitted-Cross-Domain-Policies: master-only
X-XSS-Protection: 1; mode=block
Content-Length: 260

{
  "current_user_url" : "/api/v0.1/user",
  "user_url" : "/api/v0.1/users/{user}",
  "user_rooms_url" : "/api/v0.1/user/rooms",
  "user_messages_url" : "/api/v0.1/user/room/messages",
  "documentation_url" : "https://github.com/KasonChan/play-chat-api/wiki"
}

All timestamps are returned in long format:

1432441527583

Authentication

Basic Authentication is the way to authenticate through PlayChat API v0.1. Requests that require authentication will return 401 Unauthorized, instead of 403 Forbidden, in some places. This is to prevent the accidental leakage of private repositories to unauthorized users.

Clone this wiki locally