Runkod API Docs (0.0.1)

Download OpenAPI specification:Download

Runkod provides hosting platform and management tools for modern javascript applications and static web sites.

Runkod API offers simple yet powerful REST interface to interact with Runkod ecosystem.

Getting Started

API Key

All endpoints require API Key authentication. You can get yours in Account section on Management Console.

Once you have your API Key you can pass it in HTTP headers like below.

curl -X GET "http://api.runkod.com/me" -H "X-Runkod-Api-Key: fdx0.6FrIdvOEY6NizSDSGHJywL4Jj6j8grcAOSicR9GzVZXkiD3T"

Rate Limiting

Maximum 1000 requests per hour is allowed for each api key.

When the limit reached the api returns an error message with 429 status code.

{
  "code": 5,
  "message": "Rate limit exceeded. Only 1000 requests per hour is allowed."
}



Deployment limiting

There is an additional rate limiting on new deployment endpoint which allows 60 requests per hour.

Authentication

RunkodAuth

Security Scheme Type API Key
Header parameter name: X-Runkod-Api-Key

Projects

List

Returns a list of projects.

Authorizations:

Responses

200

OK

get /projects
https://api.runkod.com/projects

Response samples

Content type
application/json
Copy
Expand all Collapse all
[
  • {
    }
]

Create

Creates a new project with the name given. If name is empty then creates project with a random name.

Authorizations:
Request Body schema: application/json
name
string Nullable

Responses

201

Created

406

Not Acceptable

409

Conflict

post /projects
https://api.runkod.com/projects

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "name": "string"
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "id": 12351,
  • "name": "my-app",
  • "address": "my-app.runkodapps.com",
  • "status": 1,
  • "routing": true,
  • "cors":
    [
    ],
  • "auth":
    [
    ],
  • "created": "2020-04-11T21:32:00+00:00",
  • "deployment":
    {
    },
  • "domainRecord":
    {
    }
}

Get

Returns a specific project by id.

Authorizations:
path Parameters
project_id
required
integer <int64>

Responses

200

OK

404

Not Found

get /projects/{project_id}
https://api.runkod.com/projects/{project_id}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "id": 12351,
  • "name": "my-app",
  • "address": "my-app.runkodapps.com",
  • "status": 1,
  • "routing": true,
  • "cors":
    [
    ],
  • "auth":
    [
    ],
  • "created": "2020-04-11T21:32:00+00:00",
  • "deployment":
    {
    },
  • "domainRecord":
    {
    }
}

Delete

Deletes a project.

Authorizations:
path Parameters
project_id
required
integer <int64>

Responses

202

OK

404

Not Found

delete /projects/{project_id}
https://api.runkod.com/projects/{project_id}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{ }

Update status

Updates status of a project.

Authorizations:
path Parameters
project_id
required
integer <int64>
Request Body schema: application/json
status
required
integer

Options:

  • 1 - On
  • 2 - Maintenance Mode
  • 3 - Off

Responses

202

Accepted

403

Forbidden

404

Not Found

put /projects/{project_id}/status
https://api.runkod.com/projects/{project_id}/status

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "status": 1
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "id": 12351,
  • "name": "my-app",
  • "address": "my-app.runkodapps.com",
  • "status": 1,
  • "routing": true,
  • "cors":
    [
    ],
  • "auth":
    [
    ],
  • "created": "2020-04-11T21:32:00+00:00",
  • "deployment":
    {
    },
  • "domainRecord":
    {
    }
}

Toggle routing

Toggles client side routing setting.

Authorizations:
path Parameters
project_id
required
integer <int64>

Responses

202

Accepted

403

Forbidden

404

Not Found

put /projects/{project_id}/routing
https://api.runkod.com/projects/{project_id}/routing

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "id": 12351,
  • "name": "my-app",
  • "address": "my-app.runkodapps.com",
  • "status": 1,
  • "routing": true,
  • "cors":
    [
    ],
  • "auth":
    [
    ],
  • "created": "2020-04-11T21:32:00+00:00",
  • "deployment":
    {
    },
  • "domainRecord":
    {
    }
}

Update CORS

Updates Cross-Origin Resource Sharing.

Authorizations:
path Parameters
project_id
required
integer <int64>
Request Body schema: application/json
data
required
string
Pass a multiline list of websites:

https://www.website1.com
https://www.website2.com

OR

Pass * to allow all

OR

Pass empty string to reset

Maximum 1000 characters

Responses

202

Accepted

403

Forbidden

404

Not Found

put /projects/{project_id}/cors
https://api.runkod.com/projects/{project_id}/cors

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "data": "*"
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "id": 12351,
  • "name": "my-app",
  • "address": "my-app.runkodapps.com",
  • "status": 1,
  • "routing": true,
  • "cors":
    [
    ],
  • "auth":
    [
    ],
  • "created": "2020-04-11T21:32:00+00:00",
  • "deployment":
    {
    },
  • "domainRecord":
    {
    }
}

Update HTTP Authentication

Updates HTTP Authentication credentials.

Authorizations:
path Parameters
project_id
required
integer <int64>
Request Body schema: application/json
username
required
string

Maximum 10 characters

password
required
string

Maximum 10 characters

Responses

202

Accepted

403

Forbidden

404

Not Found

put /projects/{project_id}/auth
https://api.runkod.com/projects/{project_id}/auth

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "username": "admin",
  • "password": "1q2w3e"
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "id": 12351,
  • "name": "my-app",
  • "address": "my-app.runkodapps.com",
  • "status": 1,
  • "routing": true,
  • "cors":
    [
    ],
  • "auth":
    [
    ],
  • "created": "2020-04-11T21:32:00+00:00",
  • "deployment":
    {
    },
  • "domainRecord":
    {
    }
}

Disable HTTP Authentication

Removed credentials and disables HTTP Authentication.

Authorizations:
path Parameters
project_id
required
integer <int64>

Responses

202

Accepted

403

Forbidden

404

Not Found

delete /projects/{project_id}/auth
https://api.runkod.com/projects/{project_id}/auth

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "id": 12351,
  • "name": "my-app",
  • "address": "my-app.runkodapps.com",
  • "status": 1,
  • "routing": true,
  • "cors":
    [
    ],
  • "auth":
    [
    ],
  • "created": "2020-04-11T21:32:00+00:00",
  • "deployment":
    {
    },
  • "domainRecord":
    {
    }
}

Get stats

Returns project's basic traffic statistics.

Authorizations:
path Parameters
project_id
required
integer <int64>

Responses

200

OK

404

Not Found

get /projects/{project_id}/stat
https://api.runkod.com/projects/{project_id}/stat

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "handled": 3243,
  • "served": 2132131
}

Deployments

List

Returns a list of deployments under the project.

Authorizations:
path Parameters
project_id
required
integer <int64>

Responses

200

OK

get /projects/{project_id}/deployments
https://api.runkod.com/projects/{project_id}/deployments

Response samples