# Doorkeeper API

This describes the resources that make up the official Doorkeeper API. If you have any problems or requests, please contact support.

**Note:** This API is in an alpha state. Breaking changes are expected to occur.

## Schema

Blank fields are included as `null` instead of being omitted.

All timestamps are returned in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ

Requests that return multiple items will be paginated to 25 items. You can specify further pages with the `?page` parameter.

## Authentication

Authenticate your account when using the API by including your Public API Access token in the request. You can manage your API tokens from your Profile. The Public API Access token only grants access to publicly information, such as a list of upcoming events on Doorkeeper, and will never be used to disclose private user information (such as user profiles).

Authentication to the API is performed via an Authorization header added to the request, as shown in the following example.
    
    
    $ curl -i -H "Authorization: Bearer your_token" https://api.doorkeeper.jp/
    HTTP/1.1 200 OK
    Cache-Control: max-age=0, private, must-revalidate
    Content-Type: application/json; charset=utf-8
    Date: Mon, 29 Feb 2016 23:13:30 GMT
    ETag: W/"c981df151f96d9412e41fc99939290b4"
    Server: nginx/1.8.0
    Status: 200 OK
    X-Content-Type-Options: nosniff
    X-Frame-Options: SAMEORIGIN
    X-Ratelimit: {"name":"authenticated API","period":300,"limit":300,"remaining":300,"until":"2016-02-29T23:15:00Z"}
    X-Request-Id: 753d59ab-44d8-4c01-bf29-c91b02b51330
    X-Runtime: 0.055490
    X-XSS-Protection: 1; mode=block
    Content-Length: 34
    Connection: keep-alive
    
    {"now":"2016-02-29T23:13:30.777Z"}
    

All API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will also fail.

## Events

There are two scopes for the events API, you can either request the events for a specific community, or all featured events on Doorkeeper.

### List a community's events
    
    
    GET /groups/:group/events
    

### List all featured events
    
    
    GET /events
    

### Parameters

To further control the results, we support the following paramters:

page
    The page offset of the results.
locale
    The localized text for an event. One of `en`, `ja`. Default: `ja`.
sort
    The order of the results. One of `published_at`, `starts_at`, `updated_at`. Default: `published_at`.
since
    Only events taking place during or after this date will be included. (ISO 8601 date) Default: Today.
until
    Only events taking place during or before this date will be included. (ISO 8601 date)
q
    Keyword to search for from the title or description fields.
callback
    JSON-P callback that wraps the results in the given function.
expand[]=group
    Expands the group object.

### Response
    
    
    [
      {
        event: {
          title: "900K records per second with Ruby, Java, and JRuby",
          id: 28319,
          starts_at: "2015-08-13T10:00:00.000Z",
          ends_at: "2015-08-13T13:00:00.000Z",
          venue_name: "VOYAGE GROUP",
          address: "東京都渋谷区神泉町8-16 渋谷ファーストプレイス8F",
          lat: "35.6553195",
          long: "139.6937795",
          ticket_limit: 45,
          published_at: "2015-07-13T23:48:29.463Z",
          updated_at: "2015-08-09T07:52:30.263Z",
          group: 24,
          description: "<h2>Agenda</h2> <h3><small>19:00 〜 19:45</small>...",
          public_url: "http://trbmeetup.checkin.dev/events/28319",
          participants: 43,
          waitlisted: 0
        }
      }
    ]
    

## Event

Show a specific event
    
    
    GET /events/:id
    

### Response
    
    
    {
      event: {
        title: "900K records per second with Ruby, Java, and JRuby",
        id: 28319,
        starts_at: "2015-08-13T10:00:00.000Z",
        ends_at: "2015-08-13T13:00:00.000Z",
        venue_name: "VOYAGE GROUP",
        address: "東京都渋谷区神泉町8-16 渋谷ファーストプレイス8F",
        lat: "35.6553195",
        long: "139.6937795",
        ticket_limit: 45,
        published_at: "2015-07-13T23:48:29.463Z",
        updated_at: "2015-08-09T07:52:30.263Z",
        group: 24,
        description: "<h2>Agenda</h2> <h3><small>19:00 〜 19:45</small>...",
        public_url: "http://trbmeetup.checkin.dev/events/28319",
        participants: 43,
        waitlisted: 0
      }
    }
    

## Cross-Origin Resource Sharing (CORS) Example

Cross-Origin Resource Sharing (CORS) allows resources on a web page to be requested from another domain outside the domain from which the first resource was served. As Doorkeeper's API supports CORS, it is possible to use the API to request data via AJAX to display in your web page. The following is an example of how you can use CORS along side with a Public API Access token.

## Application Showcase

  * イベント一括検索 is a application for searching different event services that inspired this API.
  * upmeetup
  * AZusaar
  * iCal feed



## API Terms of Use

_updated 2016-05-10_

Thank you for using the Doorkeeper Inc (“Doorkeeper” or “we”) application programming interfaces and associated tools and documentation (including all updates and other modifications thereto, the “Doorkeeper API”) to create a website or software application (including all components and content thereof, your “Application”), which will display and use certain data and content made available through the Doorkeeper API (the “Content”) or Doorkeeper’s website located at www.doorkeeper.jp and www.doorkeeperhq.com (the “Website”).

By using the Doorkeeper API, you agree to these terms of use (these “Terms of Use”) and the Doorkeeper Terms of Service (“TOS”) located at http://www.doorkeeper.jp/terms (including the Doorkeeper Privacy Policy referenced therein). If you disagree with any of the terms below or the TOS, Doorkeeper does not grant you a license to use the Doorkeeper API. In the event of any inconsistency between these Terms of Use and the TOS, these Terms of Use control.

Here are the basic rules governing your use of the Doorkeeper API:

### Ownership

The Content transmitted in connection with the Doorkeeper API belongs to Doorkeeper’s customers and/or Doorkeeper. Please keep this in mind as you plan your Application. Don’t do anything that would undermine the Content.

### Must Have Information

If you display an event, the event must include and display a link to the event webpage associated with that event on Doorkeeper, and you may not specify a nofollow or similar HTML attribute value to such link.

### Responsibility

You are responsible for your Application and any use of your Application. Among other things, this means that you are responsible for maintaining your own user agreement and privacy policy for users of your Application. Your user agreement must permit you and the users of your Application to comply with these Terms of Use and the TOS (including Doorkeeper’s Privacy Policy). Your privacy policy must be at least as stringent and user-friendly as Doorkeeper’s Privacy Policy. In general, we expect you to be thoughtful and considerate and not abuse users’ data.

### Restrictions

You shall not use the Doorkeeper APIs in, or to develop, a product or service that competes with products or services offered by Doorkeeper.