API for retrieving and updating user details
| Name | Type | Description | Example |
|---|---|---|---|
| api_key | string | Unique identifier used for logging into the dawn API | "abfc287239862398" |
| created_at | date-time | when account was created | "2012-01-01T12:00:00Z" |
| User email | "wearethatguy@gmail.com" |
||
| id | uuid | unique identifier of account | "01234567-89ab-cdef-0123-456789abcdef" |
| updated_at | date-time | when account was updated | "2012-01-01T12:00:00Z" |
| username | string | A String used for identifying users | "ThatGuy417" |
Info for existing account.
GET /account
$ curl -n -X GET https://api.dawn.dev/account
HTTP/1.1 200 OK
{
"created_at": "2012-01-01T12:00:00Z",
"id": "01234567-89ab-cdef-0123-456789abcdef",
"updated_at": "2012-01-01T12:00:00Z",
"username": "ThatGuy417",
"api_key": "abfc287239862398",
"email": "wearethatguy@gmail.com"
}
Update an existing account.
PATCH /account
| Name | Type | Description | Example |
|---|---|---|---|
| password | string | A password. | "45fancypants" |
| username | string | A String used for identifying users | "ThatGuy417" |
$ curl -n -X PATCH https://api.dawn.dev/account
-H "Content-Type: application/json" \
-d '{"username":"ThatGuy417","password":"45fancypants"}'
HTTP/1.1 200 OK
{
"created_at": "2012-01-01T12:00:00Z",
"id": "01234567-89ab-cdef-0123-456789abcdef",
"updated_at": "2012-01-01T12:00:00Z",
"username": "ThatGuy417",
"api_key": "abfc287239862398",
"email": "wearethatguy@gmail.com"
}
API for managing user SSH-keys
| Name | Type | Description | Example |
|---|---|---|---|
| created_at | date-time | when key was created | "2012-01-01T12:00:00Z" |
| fingerprint | string | Fingerprint | "c0:ca:bf:73:c1:da:2e:23:48:82:55:98:17:33:1c:06" |
| id | uuid | unique identifier of key | "01234567-89ab-cdef-0123-456789abcdef" |
| key | string | Key | "..." |
| updated_at | date-time | when key was updated | "2012-01-01T12:00:00Z" |
Create a new key.
POST /account/keys
| Name | Type | Description | Example |
|---|---|---|---|
| key | string |
$ curl -n -X POST https://api.dawn.dev/account/keys
-H "Content-Type: application/json" \
-d '{"key":null}'
HTTP/1.1 201 Created
{
"created_at": "2012-01-01T12:00:00Z",
"id": "01234567-89ab-cdef-0123-456789abcdef",
"updated_at": "2012-01-01T12:00:00Z",
"key": "...",
"fingerprint": "c0:ca:bf:73:c1:da:2e:23:48:82:55:98:17:33:1c:06"
}
Delete an existing key.
DELETE /account/keys/{key_id}
$ curl -n -X DELETE https://api.dawn.dev/account/keys/$KEY_ID
HTTP/1.1 200 OK
{
"created_at": "2012-01-01T12:00:00Z",
"id": "01234567-89ab-cdef-0123-456789abcdef",
"updated_at": "2012-01-01T12:00:00Z",
"key": "...",
"fingerprint": "c0:ca:bf:73:c1:da:2e:23:48:82:55:98:17:33:1c:06"
}
Info for existing key.
GET /account/keys/{key_id}
$ curl -n -X GET https://api.dawn.dev/account/keys/$KEY_ID
HTTP/1.1 200 OK
{
"created_at": "2012-01-01T12:00:00Z",
"id": "01234567-89ab-cdef-0123-456789abcdef",
"updated_at": "2012-01-01T12:00:00Z",
"key": "...",
"fingerprint": "c0:ca:bf:73:c1:da:2e:23:48:82:55:98:17:33:1c:06"
}
List existing keys.
GET /account/keys
$ curl -n -X GET https://api.dawn.dev/account/keys
HTTP/1.1 200 OK
[
{
"created_at": "2012-01-01T12:00:00Z",
"id": "01234567-89ab-cdef-0123-456789abcdef",
"updated_at": "2012-01-01T12:00:00Z",
"key": "...",
"fingerprint": "c0:ca:bf:73:c1:da:2e:23:48:82:55:98:17:33:1c:06"
}
]
API for managing user apps
| Name | Type | Description | Example |
|---|---|---|---|
| created_at | date-time | when app was created | "2012-01-01T12:00:00Z" |
| env | object | ENV variables | ["HYBRID","true"] |
| formation | object | ["web",1] |
|
| git | string | repo name for app | "grave-pare-24" |
| id | uuid | unique identifier of app | "01234567-89ab-cdef-0123-456789abcdef" |
| name | string | name of the App | "Saucer UFO" |
| updated_at | date-time | when app was updated | "2012-01-01T12:00:00Z" |
Create a new app.
POST /apps
| Name | Type | Description | Example |
|---|---|---|---|
| name | string | name of the App | "Saucer UFO" |
$ curl -n -X POST https://api.dawn.dev/apps
-H "Content-Type: application/json" \
-d '{"name":"Saucer UFO"}'
HTTP/1.1 201 Created
{
"created_at": "2012-01-01T12:00:00Z",
"id": "01234567-89ab-cdef-0123-456789abcdef",
"updated_at": "2012-01-01T12:00:00Z",
"name": "Saucer UFO",
"git": "grave-pare-24",
"formation": {
"web": 1
},
"env": {
"HYBRID": "true"
}
}
Delete an existing app.
DELETE /apps/{app_id}
$ curl -n -X DELETE https://api.dawn.dev/apps/$APP_ID
HTTP/1.1 200 OK
{
"created_at": "2012-01-01T12:00:00Z",
"id": "01234567-89ab-cdef-0123-456789abcdef",
"updated_at": "2012-01-01T12:00:00Z",
"name": "Saucer UFO",
"git": "grave-pare-24",
"formation": {
"web": 1
},
"env": {
"HYBRID": "true"
}
}
Info for existing app.
GET /apps/{app_id}
$ curl -n -X GET https://api.dawn.dev/apps/$APP_ID
HTTP/1.1 200 OK
{
"created_at": "2012-01-01T12:00:00Z",
"id": "01234567-89ab-cdef-0123-456789abcdef",
"updated_at": "2012-01-01T12:00:00Z",
"name": "Saucer UFO",
"git": "grave-pare-24",
"formation": {
"web": 1
},
"env": {
"HYBRID": "true"
}
}
List existing apps.
GET /apps
$ curl -n -X GET https://api.dawn.dev/apps
HTTP/1.1 200 OK
[
{
"created_at": "2012-01-01T12:00:00Z",
"id": "01234567-89ab-cdef-0123-456789abcdef",
"updated_at": "2012-01-01T12:00:00Z",
"name": "Saucer UFO",
"git": "grave-pare-24",
"formation": {
"web": 1
},
"env": {
"HYBRID": "true"
}
}
]
Update an existing app.
PATCH /apps/{app_id}
| Name | Type | Description | Example |
|---|---|---|---|
| name | string | name of the App | "Saucer UFO" |
$ curl -n -X PATCH https://api.dawn.dev/apps/$APP_ID
-H "Content-Type: application/json" \
-d '{"name":"Saucer UFO"}'
HTTP/1.1 200 OK
{
"created_at": "2012-01-01T12:00:00Z",
"id": "01234567-89ab-cdef-0123-456789abcdef",
"updated_at": "2012-01-01T12:00:00Z",
"name": "Saucer UFO",
"git": "grave-pare-24",
"formation": {
"web": 1
},
"env": {
"HYBRID": "true"
}
}
Create a new gear on app.
POST /apps/{app_id}/gears
$ curl -n -X POST https://api.dawn.dev/apps/$APP_ID/gears
HTTP/1.1 201 Created
{
"created_at": "2012-01-01T12:00:00Z",
"id": "01234567-89ab-cdef-0123-456789abcdef",
"updated_at": "2012-01-01T12:00:00Z",
"name": "Saucer UFO",
"git": "grave-pare-24",
"formation": {
"web": 1
},
"env": {
"HYBRID": "true"
}
}
List existing gears for app.
GET /apps/{app_id}/gears
$ curl -n -X GET https://api.dawn.dev/apps/$APP_ID/gears
HTTP/1.1 200 OK
[
{
"created_at": "2012-01-01T12:00:00Z",
"id": "01234567-89ab-cdef-0123-456789abcdef",
"updated_at": "2012-01-01T12:00:00Z",
"name": "Saucer UFO",
"git": "grave-pare-24",
"formation": {
"web": 1
},
"env": {
"HYBRID": "true"
}
}
]
Restart existing gears for app.
POST /apps/{app_id}/gears/restart
$ curl -n -X POST https://api.dawn.dev/apps/$APP_ID/gears/restart
HTTP/1.1 200 OK
{
"created_at": "2012-01-01T12:00:00Z",
"id": "01234567-89ab-cdef-0123-456789abcdef",
"updated_at": "2012-01-01T12:00:00Z",
"name": "Saucer UFO",
"git": "grave-pare-24",
"formation": {
"web": 1
},
"env": {
"HYBRID": "true"
}
}
Create a new domain on app.
POST /apps/{app_id}/domains
| Name | Type | Description | Example |
|---|---|---|---|
| url | url | domain url | "catsrus.org" |
$ curl -n -X POST https://api.dawn.dev/apps/$APP_ID/domains
-H "Content-Type: application/json" \
-d '{"url":"catsrus.org"}'
HTTP/1.1 201 Created
{
"created_at": "2012-01-01T12:00:00Z",
"id": "01234567-89ab-cdef-0123-456789abcdef",
"updated_at": "2012-01-01T12:00:00Z",
"name": "Saucer UFO",
"git": "grave-pare-24",
"formation": {
"web": 1
},
"env": {
"HYBRID": "true"
}
}
List existing domains for app.
GET /apps/{app_id}/domains
$ curl -n -X GET https://api.dawn.dev/apps/$APP_ID/domains
HTTP/1.1 200 OK
[
{
"created_at": "2012-01-01T12:00:00Z",
"id": "01234567-89ab-cdef-0123-456789abcdef",
"updated_at": "2012-01-01T12:00:00Z",
"name": "Saucer UFO",
"git": "grave-pare-24",
"formation": {
"web": 1
},
"env": {
"HYBRID": "true"
}
}
]
Create a new drain on app.
POST /apps/{app_id}/drains
| Name | Type | Description | Example |
|---|---|---|---|
| url | url | domain url | "catsrus.org" |
$ curl -n -X POST https://api.dawn.dev/apps/$APP_ID/drains
-H "Content-Type: application/json" \
-d '{"url":"catsrus.org"}'
HTTP/1.1 201 Created
{
"created_at": "2012-01-01T12:00:00Z",
"id": "01234567-89ab-cdef-0123-456789abcdef",
"updated_at": "2012-01-01T12:00:00Z",
"name": "Saucer UFO",
"git": "grave-pare-24",
"formation": {
"web": 1
},
"env": {
"HYBRID": "true"
}
}
List existing drains for app.
GET /apps/{app_id}/drains
$ curl -n -X GET https://api.dawn.dev/apps/$APP_ID/drains
HTTP/1.1 200 OK
[
{
"created_at": "2012-01-01T12:00:00Z",
"id": "01234567-89ab-cdef-0123-456789abcdef",
"updated_at": "2012-01-01T12:00:00Z",
"name": "Saucer UFO",
"git": "grave-pare-24",
"formation": {
"web": 1
},
"env": {
"HYBRID": "true"
}
}
]
List existing formation for app.
GET /apps/{app_id}/scale
$ curl -n -X GET https://api.dawn.dev/apps/$APP_ID/scale
HTTP/1.1 200 OK
{
"created_at": "2012-01-01T12:00:00Z",
"id": "01234567-89ab-cdef-0123-456789abcdef",
"updated_at": "2012-01-01T12:00:00Z",
"name": "Saucer UFO",
"git": "grave-pare-24",
"formation": {
"web": 1
},
"env": {
"HYBRID": "true"
}
}
Update formation for app.
POST /apps/{app_id}/scale
$ curl -n -X POST https://api.dawn.dev/apps/$APP_ID/scale
HTTP/1.1 200 OK
{
"created_at": "2012-01-01T12:00:00Z",
"id": "01234567-89ab-cdef-0123-456789abcdef",
"updated_at": "2012-01-01T12:00:00Z",
"name": "Saucer UFO",
"git": "grave-pare-24",
"formation": {
"web": 1
},
"env": {
"HYBRID": "true"
}
}
Get ENV for app.
GET /apps/{app_id}/env
$ curl -n -X GET https://api.dawn.dev/apps/$APP_ID/env
HTTP/1.1 200 OK
{
"created_at": "2012-01-01T12:00:00Z",
"id": "01234567-89ab-cdef-0123-456789abcdef",
"updated_at": "2012-01-01T12:00:00Z",
"name": "Saucer UFO",
"git": "grave-pare-24",
"formation": {
"web": 1
},
"env": {
"HYBRID": "true"
}
}
Update ENV for app.
POST /apps/{app_id}/env
$ curl -n -X POST https://api.dawn.dev/apps/$APP_ID/env
HTTP/1.1 200 OK
{
"created_at": "2012-01-01T12:00:00Z",
"id": "01234567-89ab-cdef-0123-456789abcdef",
"updated_at": "2012-01-01T12:00:00Z",
"name": "Saucer UFO",
"git": "grave-pare-24",
"formation": {
"web": 1
},
"env": {
"HYBRID": "true"
}
}
Get logs URL
GET /apps/{app_id}/logs
$ curl -n -X GET https://api.dawn.dev/apps/$APP_ID/logs
HTTP/1.1 200 OK
{
"created_at": "2012-01-01T12:00:00Z",
"id": "01234567-89ab-cdef-0123-456789abcdef",
"updated_at": "2012-01-01T12:00:00Z",
"name": "Saucer UFO",
"git": "grave-pare-24",
"formation": {
"web": 1
},
"env": {
"HYBRID": "true"
}
}
Run command in app.
POST /apps/{app_id}/run
| Name | Type | Description | Example |
|---|---|---|---|
| command | string |
$ curl -n -X POST https://api.dawn.dev/apps/$APP_ID/run
-H "Content-Type: application/json" \
-d '{"command":null}'
HTTP/1.1 200 OK
{
"created_at": "2012-01-01T12:00:00Z",
"id": "01234567-89ab-cdef-0123-456789abcdef",
"updated_at": "2012-01-01T12:00:00Z",
"name": "Saucer UFO",
"git": "grave-pare-24",
"formation": {
"web": 1
},
"env": {
"HYBRID": "true"
}
}
API for managing app domains
| Name | Type | Description | Example |
|---|---|---|---|
| created_at | date-time | when domain was created | "2012-01-01T12:00:00Z" |
| id | uuid | unique identifier of domain | "01234567-89ab-cdef-0123-456789abcdef" |
| updated_at | date-time | when domain was updated | "2012-01-01T12:00:00Z" |
| url | url | domain url | "catsrus.org" |
Delete an existing domain.
DELETE /domains/{domain_id}
$ curl -n -X DELETE https://api.dawn.dev/domains/$DOMAIN_ID
HTTP/1.1 200 OK
{
"created_at": "2012-01-01T12:00:00Z",
"id": "01234567-89ab-cdef-0123-456789abcdef",
"updated_at": "2012-01-01T12:00:00Z",
"url": "catsrus.org"
}
Info for existing domain.
GET /domains/{domain_id}
$ curl -n -X GET https://api.dawn.dev/domains/$DOMAIN_ID
HTTP/1.1 200 OK
{
"created_at": "2012-01-01T12:00:00Z",
"id": "01234567-89ab-cdef-0123-456789abcdef",
"updated_at": "2012-01-01T12:00:00Z",
"url": "catsrus.org"
}
API for managing app log drains
| Name | Type | Description | Example |
|---|---|---|---|
| created_at | date-time | when drain was created | "2012-01-01T12:00:00Z" |
| id | uuid | unique identifier of drain | "01234567-89ab-cdef-0123-456789abcdef" |
| updated_at | date-time | when drain was updated | "2012-01-01T12:00:00Z" |
| url | url | domain url | "catsrus.org" |
Delete an existing drain.
DELETE /drains/{drain_id}
$ curl -n -X DELETE https://api.dawn.dev/drains/$DRAIN_ID
HTTP/1.1 200 OK
{
"created_at": "2012-01-01T12:00:00Z",
"id": "01234567-89ab-cdef-0123-456789abcdef",
"updated_at": "2012-01-01T12:00:00Z",
"url": "catsrus.org"
}
Info for existing drain.
GET /drains/{drain_id}
$ curl -n -X GET https://api.dawn.dev/drains/$DRAIN_ID
HTTP/1.1 200 OK
{
"created_at": "2012-01-01T12:00:00Z",
"id": "01234567-89ab-cdef-0123-456789abcdef",
"updated_at": "2012-01-01T12:00:00Z",
"url": "catsrus.org"
}
API for managing app gears
| Name | Type | Description | Example |
|---|---|---|---|
| created_at | date-time | when gear was created | "2012-01-01T12:00:00Z" |
| id | uuid | unique identifier of gear | "01234567-89ab-cdef-0123-456789abcdef" |
| name | string | name of the gear. | "Happy Henry" |
| number | number | gear number | "1" |
| type | string | gear type | "web" |
| updated_at | date-time | when gear was updated | "2012-01-01T12:00:00Z" |
| uptime | number | duration of the gear's run | "11191" |
Delete an existing gear.
DELETE /gears/{gear_id}
$ curl -n -X DELETE https://api.dawn.dev/gears/$GEAR_ID
HTTP/1.1 200 OK
{
"created_at": "2012-01-01T12:00:00Z",
"id": "01234567-89ab-cdef-0123-456789abcdef",
"updated_at": "2012-01-01T12:00:00Z",
"name": "Happy Henry",
"number": "1",
"type": "web",
"uptime": "11191"
}
Info for existing gear.
GET /gears/{gear_id}
$ curl -n -X GET https://api.dawn.dev/gears/$GEAR_ID
HTTP/1.1 200 OK
{
"created_at": "2012-01-01T12:00:00Z",
"id": "01234567-89ab-cdef-0123-456789abcdef",
"updated_at": "2012-01-01T12:00:00Z",
"name": "Happy Henry",
"number": "1",
"type": "web",
"uptime": "11191"
}
Restart existing gear
POST /gears/{gear_id}/restart
$ curl -n -X POST https://api.dawn.dev/gears/$GEAR_ID/restart
HTTP/1.1 200 OK
{
"created_at": "2012-01-01T12:00:00Z",
"id": "01234567-89ab-cdef-0123-456789abcdef",
"updated_at": "2012-01-01T12:00:00Z",
"name": "Happy Henry",
"number": "1",
"type": "web",
"uptime": "11191"
}
API for gitlab-shell's querying
| Name | Type | Description | Example |
|---|
Determine if project(name: project) is allowed
GET /api/git/allowed
| Name | Type | Description | Example |
|---|---|---|---|
| action | string | ||
| key_id | uuid | unique identifier of key | "01234567-89ab-cdef-0123-456789abcdef" |
| project | string | ||
| ref | string |
$ curl -n -X GET https://api.dawn.dev/api/git/allowed?action=&key_id=01234567-89ab-cdef-0123-456789abcdef&project=&ref=
HTTP/1.1 200 OK
{
}
Find a User by their SSH-Key
GET /api/git/discover
| Name | Type | Description | Example |
|---|---|---|---|
| key_id | uuid | unique identifier of key | "01234567-89ab-cdef-0123-456789abcdef" |
$ curl -n -X GET https://api.dawn.dev/api/git/discover?key_id=01234567-89ab-cdef-0123-456789abcdef
HTTP/1.1 200 OK
{
}
Responsible to streaming live to user during a git push
| Name | Type | Description | Example |
|---|
Info for existing stream.
POST /api/stream/hook
| Name | Type | Description | Example |
|---|---|---|---|
| git | string |
$ curl -n -X POST https://api.dawn.dev/api/stream/hook
-H "Content-Type: application/json" \
-d '{"git":null}'
HTTP/1.1 200 OK
{
}
API for user login/logout
| Name | Type | Description | Example |
|---|---|---|---|
| api_key | string | Unique identifier used for logging into the dawn API | "abfc287239862398" |
Login to the Dawn API
POST /login
| Name | Type | Description | Example |
|---|---|---|---|
| password | string | A password. | "45fancypants" |
| username | string | A String used for identifying users | "ThatGuy417" |
$ curl -n -X POST https://api.dawn.dev/login
-H "Content-Type: application/json" \
-d '{"username":"ThatGuy417","password":"45fancypants"}'
HTTP/1.1 200 OK
{
"api_key": "abfc287239862398"
}