API Docs

APIs provide access to various Codenvy resources. Our API is completely RESTful and organized to represent the core functions offered within the environment.

Authentication

We only support HTTPS. Authentication is required to get a temporary token or a cookies that will be used to call other REST API.

We recommend using a temporary token as query parameter to all calls. Yet, identifying the user with a session cookie can be a more convenient way to handle API calls with browser-based clients.

Use the Authentication API to retrieve a token.

Example Requests

Sample example API calls are provided with cURL, a standard command line tool. All you need to do is drop in your specific parameters to be able to make API calls directly from a terminal. You can find a tutorial on how to use cURL with APIs here.

We also recommend POSTMAN, a Chrome extension that can be used to make API calls.

Endpoints

All API requests are made to https://codenvy.com/api and all requests are served over HTTPS. The current version is V1.

Input/Output Formats

We use JSON for both request and response data. Our APIs accept JSON in two formats: either as application/json or as part of a multi-part form. When passing in data as application/json, add ‘-H “Content-Type: application/json”‘ to your curl commands. When passing in data as multi-part form data add ‘-F <name_of_parameter>=<json_data>’ to your curl commands.

Date Format

All dates, both in requests and responses must respect the format used in our examples. We support RFC 3339 timestamps only. The preferred way to pass in a date is by giving the UTC time like this: “2014-01-10T11:22:33-00:00″.

Error Codes

Codenvy APIs provide errors through standard HTTP status codes paired with an error envelope.

Error Envelope:

Status: 403 Forbidden
{
    "status": 403,
    "message": "The specified resource was not found: '/v1/fake'"
}

Error codes

CodeDescription
200Request succeeded
201The request to POST or PUT a record was successful. A Location HTTP header is returned
204The request to DELETE a record was successful
400The request was not formatted correctly
401Invalid token or cookie
402Token or cookie suspended
403Access denied
404Selected resource was not found (ie. a user asked for a non-existent item or URL)
405Invalid method type (GET when you should POST, etc)
500Application error or server error
503Service Temporarily Unavailable