Account

API for retrieving and updating user details

Attributes

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"
email email 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"

Account Info

Info for existing account.

GET /account

Curl Example

$ curl -n -X GET https://api.dawn.dev/account

Response Example

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"
}

Account Update

Update an existing account.

PATCH /account

Optional Parameters

Name Type Description Example
password string A password. "45fancypants"
username string A String used for identifying users "ThatGuy417"

Curl Example

$ curl -n -X PATCH https://api.dawn.dev/account
-H "Content-Type: application/json" \
-d '{"username":"ThatGuy417","password":"45fancypants"}'

Response Example

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"
}

Account SSH-Keys

API for managing user SSH-keys

Attributes

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"

Account SSH-Keys Create

Create a new key.

POST /account/keys

Optional Parameters

Name Type Description Example
key string

Curl Example

$ curl -n -X POST https://api.dawn.dev/account/keys
-H "Content-Type: application/json" \
-d '{"key":null}'

Response Example

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"
}

Account SSH-Keys Delete

Delete an existing key.

DELETE /account/keys/{key_id}

Curl Example

$ curl -n -X DELETE https://api.dawn.dev/account/keys/$KEY_ID

Response Example

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"
}

Account SSH-Keys Info

Info for existing key.

GET /account/keys/{key_id}

Curl Example

$ curl -n -X GET https://api.dawn.dev/account/keys/$KEY_ID

Response Example

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"
}

Account SSH-Keys List

List existing keys.

GET /account/keys

Curl Example

$ curl -n -X GET https://api.dawn.dev/account/keys

Response Example

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"
  }
]

App

API for managing user apps

Attributes

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"

App Create

Create a new app.

POST /apps

Optional Parameters

Name Type Description Example
name string name of the App "Saucer UFO"

Curl Example

$ curl -n -X POST https://api.dawn.dev/apps
-H "Content-Type: application/json" \
-d '{"name":"Saucer UFO"}'

Response Example

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"
  }
}

App Delete

Delete an existing app.

DELETE /apps/{app_id}

Curl Example

$ curl -n -X DELETE https://api.dawn.dev/apps/$APP_ID

Response Example

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"
  }
}

App Info

Info for existing app.

GET /apps/{app_id}

Curl Example

$ curl -n -X GET https://api.dawn.dev/apps/$APP_ID

Response Example

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"
  }
}

App List

List existing apps.

GET /apps

Curl Example

$ curl -n -X GET https://api.dawn.dev/apps

Response Example

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"
    }
  }
]

App Update

Update an existing app.

PATCH /apps/{app_id}

Optional Parameters

Name Type Description Example
name string name of the App "Saucer UFO"

Curl Example

$ curl -n -X PATCH https://api.dawn.dev/apps/$APP_ID
-H "Content-Type: application/json" \
-d '{"name":"Saucer UFO"}'

Response Example

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"
  }
}

App Create Gear

Create a new gear on app.

POST /apps/{app_id}/gears

Curl Example

$ curl -n -X POST https://api.dawn.dev/apps/$APP_ID/gears

Response Example

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"
  }
}

App List Gears

List existing gears for app.

GET /apps/{app_id}/gears

Curl Example

$ curl -n -X GET https://api.dawn.dev/apps/$APP_ID/gears

Response Example

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"
    }
  }
]

App Restart Gears

Restart existing gears for app.

POST /apps/{app_id}/gears/restart

Curl Example

$ curl -n -X POST https://api.dawn.dev/apps/$APP_ID/gears/restart

Response Example

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"
  }
}

App Create Domain

Create a new domain on app.

POST /apps/{app_id}/domains

Optional Parameters

Name Type Description Example
url url domain url "catsrus.org"

Curl Example

$ curl -n -X POST https://api.dawn.dev/apps/$APP_ID/domains
-H "Content-Type: application/json" \
-d '{"url":"catsrus.org"}'

Response Example

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"
  }
}

App List Domains

List existing domains for app.

GET /apps/{app_id}/domains

Curl Example

$ curl -n -X GET https://api.dawn.dev/apps/$APP_ID/domains

Response Example

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"
    }
  }
]

App Create Drain

Create a new drain on app.

POST /apps/{app_id}/drains

Optional Parameters

Name Type Description Example
url url domain url "catsrus.org"

Curl Example

$ curl -n -X POST https://api.dawn.dev/apps/$APP_ID/drains
-H "Content-Type: application/json" \
-d '{"url":"catsrus.org"}'

Response Example

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"
  }
}

App List Drains

List existing drains for app.

GET /apps/{app_id}/drains

Curl Example

$ curl -n -X GET https://api.dawn.dev/apps/$APP_ID/drains

Response Example

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"
    }
  }
]

App Formation

List existing formation for app.

GET /apps/{app_id}/scale

Curl Example

$ curl -n -X GET https://api.dawn.dev/apps/$APP_ID/scale

Response Example

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"
  }
}

App Update Formation

Update formation for app.

POST /apps/{app_id}/scale

Curl Example

$ curl -n -X POST https://api.dawn.dev/apps/$APP_ID/scale

Response Example

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"
  }
}

App Get ENV

Get ENV for app.

GET /apps/{app_id}/env

Curl Example

$ curl -n -X GET https://api.dawn.dev/apps/$APP_ID/env

Response Example

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"
  }
}

App Update ENV

Update ENV for app.

POST /apps/{app_id}/env

Curl Example

$ curl -n -X POST https://api.dawn.dev/apps/$APP_ID/env

Response Example

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"
  }
}

App Logs

Get logs URL

GET /apps/{app_id}/logs

Curl Example

$ curl -n -X GET https://api.dawn.dev/apps/$APP_ID/logs

Response Example

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"
  }
}

App Run Command

Run command in app.

POST /apps/{app_id}/run

Optional Parameters

Name Type Description Example
command string

Curl Example

$ curl -n -X POST https://api.dawn.dev/apps/$APP_ID/run
-H "Content-Type: application/json" \
-d '{"command":null}'

Response Example

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"
  }
}

Domain

API for managing app domains

Attributes

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"

Domain Delete

Delete an existing domain.

DELETE /domains/{domain_id}

Curl Example

$ curl -n -X DELETE https://api.dawn.dev/domains/$DOMAIN_ID

Response Example

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"
}

Domain Info

Info for existing domain.

GET /domains/{domain_id}

Curl Example

$ curl -n -X GET https://api.dawn.dev/domains/$DOMAIN_ID

Response Example

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"
}

Drain

API for managing app log drains

Attributes

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"

Drain Delete

Delete an existing drain.

DELETE /drains/{drain_id}

Curl Example

$ curl -n -X DELETE https://api.dawn.dev/drains/$DRAIN_ID

Response Example

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"
}

Drain Info

Info for existing drain.

GET /drains/{drain_id}

Curl Example

$ curl -n -X GET https://api.dawn.dev/drains/$DRAIN_ID

Response Example

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"
}

Gear

API for managing app gears

Attributes

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"

Gear Delete

Delete an existing gear.

DELETE /gears/{gear_id}

Curl Example

$ curl -n -X DELETE https://api.dawn.dev/gears/$GEAR_ID

Response Example

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"
}

Gear Info

Info for existing gear.

GET /gears/{gear_id}

Curl Example

$ curl -n -X GET https://api.dawn.dev/gears/$GEAR_ID

Response Example

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"
}

Gear Restart

Restart existing gear

POST /gears/{gear_id}/restart

Curl Example

$ curl -n -X POST https://api.dawn.dev/gears/$GEAR_ID/restart

Response Example

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"
}

Gitlab Interface

API for gitlab-shell's querying

Attributes

Name Type Description Example

Gitlab Interface Info

Determine if project(name: project) is allowed

GET /api/git/allowed

Optional Parameters

Name Type Description Example
action string
key_id uuid unique identifier of key "01234567-89ab-cdef-0123-456789abcdef"
project string
ref string

Curl Example

$ curl -n -X GET https://api.dawn.dev/api/git/allowed?action=&key_id=01234567-89ab-cdef-0123-456789abcdef&project=&ref=

Response Example

HTTP/1.1 200 OK
{
}

Gitlab Interface Find User by SSH-Key

Find a User by their SSH-Key

GET /api/git/discover

Optional Parameters

Name Type Description Example
key_id uuid unique identifier of key "01234567-89ab-cdef-0123-456789abcdef"

Curl Example

$ curl -n -X GET https://api.dawn.dev/api/git/discover?key_id=01234567-89ab-cdef-0123-456789abcdef

Response Example

HTTP/1.1 200 OK
{
}

Git Stream

Responsible to streaming live to user during a git push

Attributes

Name Type Description Example

Git Stream Info

Info for existing stream.

POST /api/stream/hook

Optional Parameters

Name Type Description Example
git string

Curl Example

$ curl -n -X POST https://api.dawn.dev/api/stream/hook
-H "Content-Type: application/json" \
-d '{"git":null}'

Response Example

HTTP/1.1 200 OK
{
}

Session

API for user login/logout

Attributes

Name Type Description Example
api_key string Unique identifier used for logging into the dawn API "abfc287239862398"

Session Login

Login to the Dawn API

POST /login

Optional Parameters

Name Type Description Example
password string A password. "45fancypants"
username string A String used for identifying users "ThatGuy417"

Curl Example

$ curl -n -X POST https://api.dawn.dev/login
-H "Content-Type: application/json" \
-d '{"username":"ThatGuy417","password":"45fancypants"}'

Response Example

HTTP/1.1 200 OK
{
  "api_key": "abfc287239862398"
}