Dawnrose

Docs Reference

API reference

The 46 endpoints of https://app.dawnrose.ai/v1. Send a token as Authorization: Bearer drt_… and JSON bodies with Content-Type: application/json; see API and SDK for tokens, errors and a walkthrough. This page is generated from the server, like the OpenAPI spec.

Ids start with their kind: prj_ projects, env_ environments, svc_ services, dep_ deployments. Each endpoint shows its TypeScript SDK method; the Python, Go, Ruby and PHP SDKs use the same names in their own style, such as services.deploy_files in Python and Services.DeployFiles in Go.

Account

Who the token belongs to and which workspaces it reaches.

GET /v1/me

Who the token belongs to

Returns Me. SDK: dawnrose.me()

Request

curl -X GET https://app.dawnrose.ai/v1/me \
  -H "Authorization: Bearer $DAWNROSE_TOKEN"

Response

{
  "user": {
    "id": "string",
    "email": "string",
    "name": "string"
  },
  "workspaces": [
    {
      "id": "string",
      "name": "string",
      "slug": "string",
      "role": "string",
      "plan": "string"
    }
  ]
}

Projects

Projects hold environments, and environments hold services.

GET /v1/projects

List projects

Parameters

NameTypeDescription
orgIdstringOnly this workspace

Returns Project[]. SDK: dawnrose.projects.list()

Request

curl -X GET https://app.dawnrose.ai/v1/projects \
  -H "Authorization: Bearer $DAWNROSE_TOKEN"

Response

[
  {
    "id": "string",
    "orgId": "string",
    "name": "string",
    "description": "string",
    "region": "string",
    "restricted": false,
    "environments": [
      {
        "id": "string",
        "name": "string"
      }
    ],
    "createdAt": "string"
  }
]

POST /v1/projects

Create a project

Comes with a production environment. Not available to project tokens.

JSON body

NameTypeDescription
namestringrequiredUp to 100 characters
descriptionstringUp to 2000 characters
regionstringRegion id, e.g. eu-central; the platform’s default when left out
orgIdstringWorkspace; default your first

Returns Project. SDK: dawnrose.projects.create()

Request

curl -X POST https://app.dawnrose.ai/v1/projects \
  -H "Authorization: Bearer $DAWNROSE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "string",
    "description": "string",
    "region": "string",
    "orgId": "string"
  }'

Response

{
  "id": "string",
  "orgId": "string",
  "name": "string",
  "description": "string",
  "region": "string",
  "restricted": false,
  "environments": [
    {
      "id": "string",
      "name": "string"
    }
  ],
  "createdAt": "string"
}

GET /v1/projects/{id}

Get a project with its services

Returns the project, its environments, and the services of one environment (production unless env is given).

Parameters

NameTypeDescription
idstringrequiredIn the path.
envstringEnvironment id or name

Returns object. SDK: dawnrose.projects.get()

Request

curl -X GET https://app.dawnrose.ai/v1/projects/{id} \
  -H "Authorization: Bearer $DAWNROSE_TOKEN"

Response

{
  "project": "string",
  "environment": "string",
  "environments": [
    "string"
  ],
  "services": [
    "string"
  ]
}

PATCH /v1/projects/{id}

Rename or describe a project

Parameters

NameTypeDescription
idstringrequiredIn the path.

JSON body

NameTypeDescription
namestringUp to 100 characters
descriptionstringUp to 2000 characters

Returns Project. SDK: dawnrose.projects.update()

Request

curl -X PATCH https://app.dawnrose.ai/v1/projects/{id} \
  -H "Authorization: Bearer $DAWNROSE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "string",
    "description": "string"
  }'

Response

{
  "id": "string",
  "orgId": "string",
  "name": "string",
  "description": "string",
  "region": "string",
  "restricted": false,
  "environments": [
    {
      "id": "string",
      "name": "string"
    }
  ],
  "createdAt": "string"
}

DELETE /v1/projects/{id}

Delete a project and everything in it

Parameters

NameTypeDescription
idstringrequiredIn the path.

Returns object. SDK: dawnrose.projects.delete()

Request

curl -X DELETE https://app.dawnrose.ai/v1/projects/{id} \
  -H "Authorization: Bearer $DAWNROSE_TOKEN"

Response

{
  "deleted": "string"
}

Environments

Isolated copies of a project’s services, each with its own variables, domains and private network.

POST /v1/projects/{id}/environments

Create an environment

Parameters

NameTypeDescription
idstringrequiredIn the path.

JSON body

NameTypeDescription
namestringrequiredLowercased to letters, digits and dashes, up to 32 characters
fromstringCopy the services of this environment

Returns Environment. SDK: dawnrose.environments.create()

Request

curl -X POST https://app.dawnrose.ai/v1/projects/{id}/environments \
  -H "Authorization: Bearer $DAWNROSE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "string",
    "from": "string"
  }'

Response

{
  "id": "string",
  "projectId": "string",
  "name": "string",
  "kind": "string",
  "createdAt": "string"
}

PATCH /v1/environments/{id}

Rename an environment

Parameters

NameTypeDescription
idstringrequiredIn the path.

JSON body

NameTypeDescription
namestringrequiredLowercased to letters, digits and dashes, up to 32 characters

Returns Environment. SDK: dawnrose.environments.rename()

Request

curl -X PATCH https://app.dawnrose.ai/v1/environments/{id} \
  -H "Authorization: Bearer $DAWNROSE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "string"
  }'

Response

{
  "id": "string",
  "projectId": "string",
  "name": "string",
  "kind": "string",
  "createdAt": "string"
}

DELETE /v1/environments/{id}

Delete an environment and its services

Parameters

NameTypeDescription
idstringrequiredIn the path.

Returns object. SDK: dawnrose.environments.delete()

Request

curl -X DELETE https://app.dawnrose.ai/v1/environments/{id} \
  -H "Authorization: Bearer $DAWNROSE_TOKEN"

Response

{
  "deleted": "string"
}

GET /v1/environments/{id}/logs

Runtime logs of every service in the environment

Parameters

NameTypeDescription
idstringrequiredIn the path.
filterstringFilter expression, e.g. @level:error; @service:name narrows to one service
tailintegerLast N lines, 1-3000; default 300

Returns LogLine[]. SDK: dawnrose.environments.logs()

Request

curl -X GET https://app.dawnrose.ai/v1/environments/{id}/logs \
  -H "Authorization: Bearer $DAWNROSE_TOKEN"

Response

[
  {
    "ts": "string",
    "message": "string",
    "level": "string",
    "stream": "string",
    "replica": "string"
  }
]

POST /v1/environments/{id}/deploy

Deploy every service with pending changes

Parameters

NameTypeDescription
idstringrequiredIn the path.

JSON body

NameTypeDescription
messagestringShown with the deployment, up to 1000 characters

Returns object. SDK: dawnrose.environments.deployChanges()

Request

curl -X POST https://app.dawnrose.ai/v1/environments/{id}/deploy \
  -H "Authorization: Bearer $DAWNROSE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "message": "string"
  }'

Response

{
  "deployments": [
    "string"
  ]
}

Services

A service runs one image: from a Docker image, a GitHub repository, or code you send.

POST /v1/environments/{id}/services

Create a service

With an image or a repo, the first deploy starts at once (deployment in the response). Without a source, send code with the files or upload endpoints. generateDomain gives it a public *.up.dawnrose.ai URL.

Parameters

NameTypeDescription
idstringrequiredIn the path.

JSON body

NameTypeDescription
namestringUp to 60 characters; taken from the source when left out
sourceobjectWhere the code comes from. Leave it out to send code later with the files or upload endpoints.
variables{ [name]: string }Name to value. Values may reference other services: ${{ Postgres.DATABASE_URL }}
buildobjectHow the service is built
deployobjectHow the service runs
volumeobjectA persistent volume
generateDomainbooleanGive it a public URL on the platform domain
deployNowbooleanDefault true when there is a source

Returns Service. SDK: dawnrose.services.create()

Request

curl -X POST https://app.dawnrose.ai/v1/environments/{id}/services \
  -H "Authorization: Bearer $DAWNROSE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "string",
    "source": {
      "image": "string",
      "repo": "string",
      "branch": "string",
      "rootDir": "string",
      "registryUsername": "string",
      "registryPassword": "string"
    },
    "variables": {
      "name": "string"
    },
    "build": {
      "builder": "auto",
      "dockerfilePath": "string",
      "buildCommand": "string",
      "installCommand": "string",
      "watchPaths": [
        "string"
      ]
    },
    "deploy": {
      "startCommand": "string",
      "preDeployCommand": "string",
      "port": 0,
      "replicas": 0,
      "restartPolicy": "ON_FAILURE",
      "healthcheckPath": "string",
      "healthcheckTimeout": 0,
      "cronSchedule": "string"
    },
    "volume": {
      "mountPath": "string",
      "sizeGb": 0
    },
    "generateDomain": false,
    "deployNow": false
  }'

Response

{
  "id": "string",
  "name": "string",
  "state": "string",
  "url": "string",
  "privateDomain": "string",
  "source": {
    "type": "none",
    "image": "string",
    "repo": "string",
    "branch": "string"
  },
  "domains": [
    "string"
  ],
  "activeDeployment": "string"
}

GET /v1/services/{id}

Get a service: state, URL, domains and deployments

Parameters

NameTypeDescription
idstringrequiredIn the path.

Returns Service. SDK: dawnrose.services.get()

Request

curl -X GET https://app.dawnrose.ai/v1/services/{id} \
  -H "Authorization: Bearer $DAWNROSE_TOKEN"

Response

{
  "id": "string",
  "name": "string",
  "state": "string",
  "url": "string",
  "privateDomain": "string",
  "source": {
    "type": "none",
    "image": "string",
    "repo": "string",
    "branch": "string"
  },
  "domains": [
    "string"
  ],
  "activeDeployment": "string"
}

PATCH /v1/services/{id}

Change a service

Changes are staged; deploy to apply them.

Parameters

NameTypeDescription
idstringrequiredIn the path.

JSON body

NameTypeDescription
namestringUp to 60 characters
sourceobjectWhere the code comes from. Leave it out to send code later with the files or upload endpoints.
buildobjectHow the service is built
deployobjectHow the service runs
autoDeploybooleanDeploy on git push

Returns Service. SDK: dawnrose.services.update()

Request

curl -X PATCH https://app.dawnrose.ai/v1/services/{id} \
  -H "Authorization: Bearer $DAWNROSE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "string",
    "source": {
      "image": "string",
      "repo": "string",
      "branch": "string",
      "rootDir": "string",
      "registryUsername": "string",
      "registryPassword": "string"
    },
    "build": {
      "builder": "auto",
      "dockerfilePath": "string",
      "buildCommand": "string",
      "installCommand": "string",
      "watchPaths": [
        "string"
      ]
    },
    "deploy": {
      "startCommand": "string",
      "preDeployCommand": "string",
      "port": 0,
      "replicas": 0,
      "restartPolicy": "ON_FAILURE",
      "healthcheckPath": "string",
      "healthcheckTimeout": 0,
      "cronSchedule": "string"
    },
    "autoDeploy": false
  }'

Response

{
  "id": "string",
  "name": "string",
  "state": "string",
  "url": "string",
  "privateDomain": "string",
  "source": {
    "type": "none",
    "image": "string",
    "repo": "string",
    "branch": "string"
  },
  "domains": [
    "string"
  ],
  "activeDeployment": "string"
}

DELETE /v1/services/{id}

Delete a service

Parameters

NameTypeDescription
idstringrequiredIn the path.

Returns object. SDK: dawnrose.services.delete()

Request

curl -X DELETE https://app.dawnrose.ai/v1/services/{id} \
  -H "Authorization: Bearer $DAWNROSE_TOKEN"

Response

{
  "deleted": "string"
}

POST /v1/services/{id}/deploy

Deploy the service from its source

Parameters

NameTypeDescription
idstringrequiredIn the path.

JSON body

NameTypeDescription
messagestringShown with the deployment, up to 1000 characters

Returns Deployment. SDK: dawnrose.services.deploy()

Request

curl -X POST https://app.dawnrose.ai/v1/services/{id}/deploy \
  -H "Authorization: Bearer $DAWNROSE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "message": "string"
  }'

Response

{
  "id": "string",
  "serviceId": "string",
  "status": "QUEUED",
  "trigger": "string",
  "message": "string",
  "commitSha": "string",
  "image": "string",
  "port": 0
}

POST /v1/services/{id}/restart

Restart the running deployment

Parameters

NameTypeDescription
idstringrequiredIn the path.

Returns any. SDK: dawnrose.services.restart()

Request

curl -X POST https://app.dawnrose.ai/v1/services/{id}/restart \
  -H "Authorization: Bearer $DAWNROSE_TOKEN"

Response

"string"

GET /v1/services/{id}/deployments

List deployments, newest first

Parameters

NameTypeDescription
idstringrequiredIn the path.
limitinteger1-200; default 30

Returns Deployment[]. SDK: dawnrose.services.deployments()

Request

curl -X GET https://app.dawnrose.ai/v1/services/{id}/deployments \
  -H "Authorization: Bearer $DAWNROSE_TOKEN"

Response

[
  {
    "id": "string",
    "serviceId": "string",
    "status": "QUEUED",
    "trigger": "string",
    "message": "string",
    "commitSha": "string",
    "image": "string",
    "port": 0
  }
]

GET /v1/services/{id}/logs

Runtime logs

Parameters

NameTypeDescription
idstringrequiredIn the path.
tailintegerLast N lines, 1-5000; default 500
sincestringISO timestamp
filterstringFilter expression, e.g. @level:error -healthcheck
deploymentIdstringOnly this deployment (dep_…)

Returns LogLine[]. SDK: dawnrose.services.logs()

Request

curl -X GET https://app.dawnrose.ai/v1/services/{id}/logs \
  -H "Authorization: Bearer $DAWNROSE_TOKEN"

Response

[
  {
    "ts": "string",
    "message": "string",
    "level": "string",
    "stream": "string",
    "replica": "string"
  }
]

GET /v1/services/{id}/metrics

CPU, memory, network and HTTP metrics

Parameters

NameTypeDescription
idstringrequiredIn the path.
minutesintegerWindow, up to 43,200 (30 days); default 60. HTTP stats cover at most 24 hours

Returns any. SDK: dawnrose.services.metrics()

Request

curl -X GET https://app.dawnrose.ai/v1/services/{id}/metrics \
  -H "Authorization: Bearer $DAWNROSE_TOKEN"

Response

"string"

POST /v1/services/{id}/exec

Run a command in the service

Parameters

NameTypeDescription
idstringrequiredIn the path.

JSON body

NameTypeDescription
commandstringrequiredShell command, up to 64 KB
timeoutSecinteger1-600; default 60

Returns object. SDK: dawnrose.services.exec()

Request

curl -X POST https://app.dawnrose.ai/v1/services/{id}/exec \
  -H "Authorization: Bearer $DAWNROSE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "command": "string",
    "timeoutSec": 0
  }'

Response

{
  "exitCode": 0,
  "output": "string",
  "timedOut": false
}

POST /v1/services/{id}/http

Send an HTTP request to the service over the private network

Works without a public domain. The body is cut at 20 KB.

Parameters

NameTypeDescription
idstringrequiredIn the path.

JSON body

NameTypeDescription
methodstringLetters only, default GET
pathstringDefault /
headers{ [name]: string }Request headers
bodystringRequest body as text
portinteger1-65535; default the port the app listens on

Returns object. SDK: dawnrose.services.request()

Request

curl -X POST https://app.dawnrose.ai/v1/services/{id}/http \
  -H "Authorization: Bearer $DAWNROSE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "method": "string",
    "path": "string",
    "headers": {
      "name": "string"
    },
    "body": "string",
    "port": 0
  }'

Response

{
  "status": 0,
  "headers": {
    "name": "string"
  },
  "body": "string"
}

Code

Send code and Dawnrose builds and deploys it: files as JSON, or a .tar.gz archive.

POST /v1/services/{id}/files

Deploy code sent as files

Builds and deploys exactly these files, like a git push without git. Up to 20 MB in total; send larger sources as an archive with upload.

Parameters

NameTypeDescription
idstringrequiredIn the path.

JSON body

NameTypeDescription
filesobject[]requiredAt most 10,000 files and 20 MB in all; relative paths up to 1024 characters and 40 levels deep
messagestringShown with the deployment, up to 1000 characters

Returns Deployment. SDK: dawnrose.services.deployFiles()

Request

curl -X POST https://app.dawnrose.ai/v1/services/{id}/files \
  -H "Authorization: Bearer $DAWNROSE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "files": [
      {
        "path": "string",
        "content": "string",
        "encoding": "utf8"
      }
    ],
    "message": "string"
  }'

Response

{
  "id": "string",
  "serviceId": "string",
  "status": "QUEUED",
  "trigger": "string",
  "message": "string",
  "commitSha": "string",
  "image": "string",
  "port": 0
}

POST /v1/services/{id}/upload

Deploy a .tar.gz archive

Parameters

NameTypeDescription
idstringrequiredIn the path.
messagestringShown with the deployment, up to 1000 characters

Body

application/gzip: A gzipped tar of the app’s directory, up to 500 MB

Returns Deployment. SDK: dawnrose.services.upload()

Request

curl -X POST https://app.dawnrose.ai/v1/services/{id}/upload \
  -H "Authorization: Bearer $DAWNROSE_TOKEN"

Response

{
  "id": "string",
  "serviceId": "string",
  "status": "QUEUED",
  "trigger": "string",
  "message": "string",
  "commitSha": "string",
  "image": "string",
  "port": 0
}

Deployments

Every build and rollout. Wait on one to know when your code is live.

GET /v1/deployments/{id}

Get a deployment

Parameters

NameTypeDescription
idstringrequiredIn the path.

Returns Deployment. SDK: dawnrose.deployments.get()

Request

curl -X GET https://app.dawnrose.ai/v1/deployments/{id} \
  -H "Authorization: Bearer $DAWNROSE_TOKEN"

Response

{
  "id": "string",
  "serviceId": "string",
  "status": "QUEUED",
  "trigger": "string",
  "message": "string",
  "commitSha": "string",
  "image": "string",
  "port": 0
}

GET /v1/deployments/{id}/wait

Wait until a deployment finishes

Returns as soon as it is no longer queued, building or deploying, or when the timeout runs out.

Parameters

NameTypeDescription
idstringrequiredIn the path.
timeoutintegerSeconds, default 600, at most 1800

Returns Deployment. SDK: dawnrose.deployments.wait()

Request

curl -X GET https://app.dawnrose.ai/v1/deployments/{id}/wait \
  -H "Authorization: Bearer $DAWNROSE_TOKEN"

Response

{
  "id": "string",
  "serviceId": "string",
  "status": "QUEUED",
  "trigger": "string",
  "message": "string",
  "commitSha": "string",
  "image": "string",
  "port": 0
}

GET /v1/deployments/{id}/logs

Build and deploy logs

Parameters

NameTypeDescription
idstringrequiredIn the path.
phase"build" | "deploy"Both when left out
tailintegerLast N lines, 1-20,000; default 5000

Returns any[]. SDK: dawnrose.deployments.logs()

Request

curl -X GET https://app.dawnrose.ai/v1/deployments/{id}/logs \
  -H "Authorization: Bearer $DAWNROSE_TOKEN"

Response

[
  "string"
]

POST /v1/deployments/{id}/cancel

Cancel a deployment in progress

Parameters

NameTypeDescription
idstringrequiredIn the path.

Returns Deployment. SDK: dawnrose.deployments.cancel()

Request

curl -X POST https://app.dawnrose.ai/v1/deployments/{id}/cancel \
  -H "Authorization: Bearer $DAWNROSE_TOKEN"

Response

{
  "id": "string",
  "serviceId": "string",
  "status": "QUEUED",
  "trigger": "string",
  "message": "string",
  "commitSha": "string",
  "image": "string",
  "port": 0
}

POST /v1/deployments/{id}/redeploy

Deploy the same source again

Parameters

NameTypeDescription
idstringrequiredIn the path.

Returns Deployment. SDK: dawnrose.deployments.redeploy()

Request

curl -X POST https://app.dawnrose.ai/v1/deployments/{id}/redeploy \
  -H "Authorization: Bearer $DAWNROSE_TOKEN"

Response

{
  "id": "string",
  "serviceId": "string",
  "status": "QUEUED",
  "trigger": "string",
  "message": "string",
  "commitSha": "string",
  "image": "string",
  "port": 0
}

POST /v1/deployments/{id}/rollback

Roll back to this deployment’s image

Parameters

NameTypeDescription
idstringrequiredIn the path.

Returns Deployment. SDK: dawnrose.deployments.rollback()

Request

curl -X POST https://app.dawnrose.ai/v1/deployments/{id}/rollback \
  -H "Authorization: Bearer $DAWNROSE_TOKEN"

Response

{
  "id": "string",
  "serviceId": "string",
  "status": "QUEUED",
  "trigger": "string",
  "message": "string",
  "commitSha": "string",
  "image": "string",
  "port": 0
}

Variables

Service and shared variables. Values can reference other services: ${{ Postgres.DATABASE_URL }}.

GET /v1/services/{id}/variables

A service’s variables

Parameters

NameTypeDescription
idstringrequiredIn the path.
resolved"1"Include resolved values

Returns Variables. SDK: dawnrose.variables.list()

Request

curl -X GET https://app.dawnrose.ai/v1/services/{id}/variables \
  -H "Authorization: Bearer $DAWNROSE_TOKEN"

Response

{
  "variables": [
    {
      "key": "string",
      "value": "string",
      "sealed": false
    }
  ]
}

PATCH /v1/services/{id}/variables

Set or delete a service’s variables

Staged until the next deploy.

Parameters

NameTypeDescription
idstringrequiredIn the path.

JSON body

NameTypeDescription
variables{ [name]: string | null }Set these; null deletes
rawstring.env text, as an alternative to variables
replacebooleanDelete every variable not in this request
sealedstring[]Names whose values can never be read back

Returns VariablesChanged. SDK: dawnrose.variables.set()

Request

curl -X PATCH https://app.dawnrose.ai/v1/services/{id}/variables \
  -H "Authorization: Bearer $DAWNROSE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "variables": {
      "name": "string"
    },
    "raw": "string",
    "replace": false,
    "sealed": [
      "string"
    ]
  }'

Response

{
  "changed": [
    "string"
  ],
  "removed": [
    "string"
  ],
  "hint": "string"
}

GET /v1/environments/{id}/variables

Shared variables of an environment

Parameters

NameTypeDescription
idstringrequiredIn the path.

Returns Variables. SDK: dawnrose.variables.listShared()

Request

curl -X GET https://app.dawnrose.ai/v1/environments/{id}/variables \
  -H "Authorization: Bearer $DAWNROSE_TOKEN"

Response

{
  "variables": [
    {
      "key": "string",
      "value": "string",
      "sealed": false
    }
  ]
}

PATCH /v1/environments/{id}/variables

Set or delete shared variables

Parameters

NameTypeDescription
idstringrequiredIn the path.

JSON body

NameTypeDescription
variables{ [name]: string | null }Set these; null deletes
rawstring.env text, as an alternative to variables
replacebooleanDelete every variable not in this request
sealedstring[]Names whose values can never be read back

Returns VariablesChanged. SDK: dawnrose.variables.setShared()

Request

curl -X PATCH https://app.dawnrose.ai/v1/environments/{id}/variables \
  -H "Authorization: Bearer $DAWNROSE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "variables": {
      "name": "string"
    },
    "raw": "string",
    "replace": false,
    "sealed": [
      "string"
    ]
  }'

Response

{
  "changed": [
    "string"
  ],
  "removed": [
    "string"
  ],
  "hint": "string"
}

Domains

Generated *.up.dawnrose.ai domains and your own, with automatic TLS.

GET /v1/services/{id}/domains

A service’s domains

Parameters

NameTypeDescription
idstringrequiredIn the path.

Returns Domain[]. SDK: dawnrose.domains.list()

Request

curl -X GET https://app.dawnrose.ai/v1/services/{id}/domains \
  -H "Authorization: Bearer $DAWNROSE_TOKEN"

Response

[
  {
    "id": "string",
    "serviceId": "string",
    "hostname": "string",
    "url": "string",
    "kind": "generated",
    "targetPort": 0,
    "verified": false,
    "tlsStatus": "string"
  }
]

POST /v1/services/{id}/domains

Generate a domain, or add your own

Without hostname, generates a domain on up.dawnrose.ai. With hostname, adds a custom domain; the response lists the DNS records to create.

Parameters

NameTypeDescription
idstringrequiredIn the path.

JSON body

NameTypeDescription
hostnamestringYour domain, e.g. app.example.com; leave out to generate one
targetPortintegerContainer port, 1-65535; default the port the app listens on

Returns Domain. SDK: dawnrose.domains.add()

Request

curl -X POST https://app.dawnrose.ai/v1/services/{id}/domains \
  -H "Authorization: Bearer $DAWNROSE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "hostname": "string",
    "targetPort": 0
  }'

Response

{
  "id": "string",
  "serviceId": "string",
  "hostname": "string",
  "url": "string",
  "kind": "generated",
  "targetPort": 0,
  "verified": false,
  "tlsStatus": "string"
}

POST /v1/domains/{id}/verify

Check a custom domain’s DNS now

Parameters

NameTypeDescription
idstringrequiredIn the path.

Returns Domain. SDK: dawnrose.domains.verify()

Request

curl -X POST https://app.dawnrose.ai/v1/domains/{id}/verify \
  -H "Authorization: Bearer $DAWNROSE_TOKEN"

Response

{
  "id": "string",
  "serviceId": "string",
  "hostname": "string",
  "url": "string",
  "kind": "generated",
  "targetPort": 0,
  "verified": false,
  "tlsStatus": "string"
}

DELETE /v1/domains/{id}

Remove a domain

Parameters

NameTypeDescription
idstringrequiredIn the path.

Returns any. SDK: dawnrose.domains.delete()

Request

curl -X DELETE https://app.dawnrose.ai/v1/domains/{id} \
  -H "Authorization: Bearer $DAWNROSE_TOKEN"

Response

"string"

Functions

A service from one TypeScript or Python file: an HTTP handler, or a job on a cron schedule.

POST /v1/environments/{id}/functions

Create a function from one file

Deploys at once. The file is a small server that listens on $PORT; leave out code to start from a working example. With schedule, it runs as a job on that cron schedule and exits.

Parameters

NameTypeDescription
idstringrequiredIn the path.

JSON body

NameTypeDescription
namestringService name; function, or job with a schedule, when left out
runtime"typescript" | "python"Default typescript
codestringDefault: a starter handler
schedulestring | null5-field UTC crontab; runs as a job instead of serving HTTP

Returns any. SDK: dawnrose.functions.create()

Request

curl -X POST https://app.dawnrose.ai/v1/environments/{id}/functions \
  -H "Authorization: Bearer $DAWNROSE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "string",
    "runtime": "typescript",
    "code": "string",
    "schedule": "string"
  }'

Response

"string"

GET /v1/services/{id}/function

A function’s code

Parameters

NameTypeDescription
idstringrequiredIn the path.

Returns Function. SDK: dawnrose.functions.get()

Request

curl -X GET https://app.dawnrose.ai/v1/services/{id}/function \
  -H "Authorization: Bearer $DAWNROSE_TOKEN"

Response

{
  "serviceId": "string",
  "name": "string",
  "runtime": "typescript",
  "file": "string",
  "code": "string",
  "schedule": "string",
  "updatedAt": "string"
}

PUT /v1/services/{id}/function

Replace a function’s code and deploy it

Parameters

NameTypeDescription
idstringrequiredIn the path.

JSON body

NameTypeDescription
codestringrequiredThe whole new file, up to 256 KB
schedulestring | null5-field UTC crontab; null or an empty string removes it

Returns any. SDK: dawnrose.functions.update()

Request

curl -X PUT https://app.dawnrose.ai/v1/services/{id}/function \
  -H "Authorization: Bearer $DAWNROSE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "code": "string",
    "schedule": "string"
  }'

Response

"string"

Templates

Databases and apps that deploy in one call.

GET /v1/templates

List templates

Parameters

NameTypeDescription
qstringMatches id, name, description, tags and category; all when left out

Returns Template[]. SDK: dawnrose.templates.list()

Request

curl -X GET https://app.dawnrose.ai/v1/templates \
  -H "Authorization: Bearer $DAWNROSE_TOKEN"

Response

[
  {
    "id": "string",
    "name": "string",
    "description": "string",
    "category": "string",
    "tags": [
      "string"
    ],
    "services": [
      {
        "name": "string"
      }
    ]
  }
]

POST /v1/environments/{id}/templates/{templateId}

Deploy a template into an environment

postgres, mysql, redis, mongo, n8n, drizzle-studio and the rest of GET /templates. Variables override the template’s per service.

Parameters

NameTypeDescription
idstringrequiredIn the path.
templateIdstringrequiredIn the path.

JSON body

NameTypeDescription
variables{ [name]: { [name]: string } }Service name to the variables to set on it
deploybooleanDefault true; false only creates the services
serviceNamestringName for the service of a single-service template

Returns object. SDK: dawnrose.templates.deploy()

Request

curl -X POST https://app.dawnrose.ai/v1/environments/{id}/templates/{templateId} \
  -H "Authorization: Bearer $DAWNROSE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "variables": {
      "name": {
        "name": "string"
      }
    },
    "deploy": false,
    "serviceName": "string"
  }'

Response

{
  "template": "string",
  "services": [
    "string"
  ],
  "deployments": [
    "string"
  ]
}

Tokens

Project tokens: limited to one project, for code that creates and deploys services there.

GET /v1/projects/{id}/tokens

List a project’s tokens

Needs admin on the project.

Parameters

NameTypeDescription
idstringrequiredIn the path.

Returns Token[]. SDK: dawnrose.tokens.list()

Request

curl -X GET https://app.dawnrose.ai/v1/projects/{id}/tokens \
  -H "Authorization: Bearer $DAWNROSE_TOKEN"

Response

[
  {
    "id": "string",
    "name": "string",
    "prefix": "string",
    "projectId": "string",
    "lastUsedAt": "string",
    "createdAt": "string"
  }
]

POST /v1/projects/{id}/tokens

Create a project token

The token reaches only this project and acts with your permissions there. Not available to project tokens.

Parameters

NameTypeDescription
idstringrequiredIn the path.

JSON body

NameTypeDescription
namestringUp to 100 characters

Returns CreatedToken. SDK: dawnrose.tokens.create()

Request

curl -X POST https://app.dawnrose.ai/v1/projects/{id}/tokens \
  -H "Authorization: Bearer $DAWNROSE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "string"
  }'

Response

{
  "id": "string",
  "name": "string",
  "token": "string",
  "prefix": "string",
  "projectId": "string"
}

DELETE /v1/projects/{id}/tokens/{tokenId}

Revoke a project token

Parameters

NameTypeDescription
idstringrequiredIn the path.
tokenIdstringrequiredIn the path.

Returns object. SDK: dawnrose.tokens.delete()

Request

curl -X DELETE https://app.dawnrose.ai/v1/projects/{id}/tokens/{tokenId} \
  -H "Authorization: Bearer $DAWNROSE_TOKEN"

Response

{
  "deleted": "string"
}

Objects

The main fields of what the endpoints return. Responses can carry more fields than listed.

Me

NameTypeDescription
userobjectWho the token belongs to
workspacesobject[]Workspaces the token reaches, with your role and their plan

Environment

NameTypeDescription
idstringenv_…
projectIdstringprj_…
namestringe.g. production or staging
kindstringproduction, custom or pr
createdAtstringISO timestamp

Project

NameTypeDescription
idstringprj_…
orgIdstringThe workspace (org_…)
namestringUp to 100 characters
descriptionstringUp to 2000 characters
regionstringRegion id
restrictedbooleanOnly people added to the project can see it
environmentsobject[]Its environments
createdAtstringISO timestamp
updatedAtstringISO timestamp

Deployment

NameTypeDescription
idstringdep_…
serviceIdstringsvc_…
status"QUEUED" | "INITIALIZING" | "BUILDING" | "DEPLOYING" | "SUCCESS" | "FAILED" | "CRASHED" | "SLEEPING" | "REMOVING" | "REMOVED" | "CANCELLED" | "SKIPPED"Where it is: in progress, live, stopped or over
triggerstringWhat started it, e.g. manual, mcp, webhook, upload, rollback, redeploy, changes or pr
messagestringThe deploy or commit message
commitShastring | nullThe commit built, for repository sources
imagestring | nullThe image it runs, once built
portnumber | nullThe port traffic goes to
errorstring | nullWhy it failed
createdAtstringISO timestamp
finishedAtstring | nullWhen it went live or stopped; ISO timestamp

Domain

NameTypeDescription
idstringdom_…
serviceIdstringsvc_…
hostnamestringe.g. app.example.com
urlstringhttps:// and the hostname
kind"generated" | "custom"generated on the platform domain, or your own
targetPortnumber | nullContainer port; null means the port the app listens on
verifiedbooleanOwnership proven; generated domains always are
tlsStatusstringpending, active or error

Service

NameTypeDescription
idstringsvc_…
namestringUnique in its environment
statestringonline, deploying, building, crashed, failed, sleeping, cron or idle
urlstring | nullThe public URL, once the service has a domain
privateDomainstringReachable from the other services in the environment
sourceobjectWhere its code comes from
domainsany[]Its domains, as Domain objects
activeDeploymentany | nullThe deployment serving traffic
latestDeploymentany | nullThe newest deployment, which may still be in progress
createdAtstringISO timestamp

Variables

NameTypeDescription
variablesobject[]Each name with its value; the value is null when sealed

VariablesChanged

NameTypeDescription
changedstring[]Names set
removedstring[]Names deleted
hintstringWhat to do next, usually deploy

LogLine

NameTypeDescription
tsstringISO timestamp
messagestringThe line as the app wrote it
levelstringdebug, info, warn or error
streamstringstdout or stderr
replicastringThe replica that wrote it

Function

NameTypeDescription
serviceIdstringsvc_…
namestringThe function’s service name
runtime"typescript" | "python"typescript runs on Node 22
filestringindex.ts or main.py
codestringThe whole file
schedulestring | nullIts crontab; null for an HTTP function
updatedAtstringISO timestamp

Template

NameTypeDescription
idstringPass it to templates.deploy
namestringDisplay name
descriptionstringWhat it is, in a sentence
categorystringe.g. database
tagsstring[]Words it is found by
servicesobject[]The services it creates

Token

NameTypeDescription
idstringtok_…
namestringThe name you gave it
prefixstringThe token’s first characters, to tell it apart
projectIdstring | nullThe one project it reaches
lastUsedAtstring | nullISO timestamp; null if never used
createdAtstringISO timestamp

CreatedToken

NameTypeDescription
idstringtok_…
namestringThe name you gave it
tokenstringShown once
prefixstringThe token’s first characters, to tell it apart
projectIdstring | nullThe one project it reaches