Host Platform (djaodjin.com) API reference
Authentication
Authenticate your account by including your API key in API requests. You can manage your API keys on your profile page. Your API keys carry many privileges, so be sure to keep them secure! Do not share your secret API keys in publicly accessible areas such GitHub, client-side code, and so forth.
Authentication to the API is performed via HTTP Basic Auth. Provide your API key as the basic auth username value. You do not need to provide a password.
All API requests must be made over HTTPS. Calls made over plain HTTP will fail.
Example request
curl https://api.djaodjin.com/api/ \ -u BQokikJOvBiI2HlWgH4olfQ24ret3awZ:
curl uses the -u flag to pass basic auth credentials. (Adding a colon after your API key prevents curl from asking for a password.)
Containers
GET /containers/{organization}/apps/
TODO should there be a containers namespace, considering that we are dealing with apps here. Also container should be -> image List all containers that serve application business logic for you Software-as-a-Service (SaaS).
Query parameters
A page number within the paginated result set.
Responses
200
count null |
integer
|
||||||||||||||||||
next null |
string
|
||||||||||||||||||
previous null |
string
|
||||||||||||||||||
results null |
array of Container
|
Examples
GET https://api.djaodjin.com/api/containers/cowork/apps HTTP/1.1
{
"count": 1,
"next": null,
"previous": null,
"results": [
{
"slug": "cowork-master",
"dataset": "testing",
"location": "https://01.dk.ecr.us-west-2.amazon.com/cowork:master",
"role_name": "arn:aws:iam::01:cowork-deploy"
"env": [
{"name": "DEBUG", "value": "0"},
],
"domain": "cowork.djaoapp.com",
"from_email": "support@djaoapp.com"
}
]
}
POST /containers/{organization}/apps/
Creates a new container to serve application business logic for you Software-as-a-Service (SaaS).
Request body
slug null |
string
required
unique identifier for the site (also serves as subdomain)
|
||||
location null |
string
Docker repository on AWS
|
||||
role_name null |
string
AWS Role ARN that grants DjaoDjin read access to your Docker repository
|
||||
env null |
array of Variable
|
||||
dataset null |
string
dataset used for accounts and billing (i.e. production or testing)
|
Responses
201
slug null |
string
unique identifier for the site (also serves as subdomain)
|
||||
version null |
string
The version of DjaoApp templates to use with this app
|
||||
location null |
string
Docker repository on AWS
|
||||
role_name null |
string
AWS Role ARN that grants DjaoDjin read access to your Docker repository
|
||||
env null |
array of Variable
|
||||
dataset null |
string
dataset used for accounts and billing (i.e. production or testing)
|
||||
external_id null |
string
|
400
detail null |
string
describes the reason for the error in plain text
|
Examples
POST https://api.djaodjin.com/api/containers/cowork/apps/ HTTP/1.1
{
"slug": "cowork",
"dataset": "production",
"location": "https://01.dk.ecr.us-west-2.amazon.com/cowork:master",
"role_name": "arn:aws:iam::01:cowork-deploy"
"env": [
{"name": "DEBUG", "value": "0"},
],
"domain": "cowork.djaoapp.com",
"from_email": "support@djaoapp.com"
}
GET /containers/{organization}/apps/{app}/
Retrieves information about a container
Responses
200
slug null |
string
unique identifier for the site (also serves as subdomain)
|
||||
version null |
string
The version of DjaoApp templates to use with this app
|
||||
location null |
string
Docker repository on AWS
|
||||
role_name null |
string
AWS Role ARN that grants DjaoDjin read access to your Docker repository
|
||||
env null |
array of Variable
|
||||
dataset null |
string
dataset used for accounts and billing (i.e. production or testing)
|
||||
external_id null |
string
|
Examples
GET https://api.djaodjin.com/api/containers/cowork/apps/cowork-master/ HTTP/1.1
{
"slug": "cowork-master",
"dataset": "testing",
"location": "https://01.dk.ecr.us-west-2.amazon.com/cowork:master",
"role_name": "arn:aws:iam::01:cowork-deploy"
"env": [
{"name": "DEBUG", "value": "0"},
]
}
POST /containers/{organization}/apps/{app}/
Update a container to serve backend business logic on your SaaS website. The container will be forcibly restarted.
Request body
version null |
string
The version of DjaoApp templates to use with this app
|
||||
location null |
string
Docker repository on AWS
|
||||
role_name null |
string
AWS Role ARN that grants DjaoDjin read access to your Docker repository
|
||||
env null |
array of Variable
|
||||
dataset null |
string
dataset used for accounts and billing (i.e. production or testing)
|
||||
external_id null |
string
|
Responses
201
slug null |
string
unique identifier for the site (also serves as subdomain)
|
||||
version null |
string
The version of DjaoApp templates to use with this app
|
||||
location null |
string
Docker repository on AWS
|
||||
role_name null |
string
AWS Role ARN that grants DjaoDjin read access to your Docker repository
|
||||
env null |
array of Variable
|
||||
dataset null |
string
dataset used for accounts and billing (i.e. production or testing)
|
||||
external_id null |
string
|
Examples
POST https://api.djaodjin.com/api/containers/cowork/apps/cowork-master/ HTTP/1.1
Forcibly restart an already configured `cowork-master` container.
PUT /containers/{organization}/apps/{app}/
Update information on a container. If the location, role_name or any environment variables have been changed, the container will be restarted.
Request body
version null |
string
The version of DjaoApp templates to use with this app
|
||||
location null |
string
Docker repository on AWS
|
||||
role_name null |
string
AWS Role ARN that grants DjaoDjin read access to your Docker repository
|
||||
env null |
array of Variable
|
||||
dataset null |
string
dataset used for accounts and billing (i.e. production or testing)
|
||||
external_id null |
string
|
Responses
200
slug null |
string
unique identifier for the site (also serves as subdomain)
|
||||
version null |
string
The version of DjaoApp templates to use with this app
|
||||
location null |
string
Docker repository on AWS
|
||||
role_name null |
string
AWS Role ARN that grants DjaoDjin read access to your Docker repository
|
||||
env null |
array of Variable
|
||||
dataset null |
string
dataset used for accounts and billing (i.e. production or testing)
|
||||
external_id null |
string
|
Examples
PUT https://api.djaodjin.com/api/containers/cowork/apps/cowork-master/ HTTP/1.1
{
"dataset": "testing",
"location": "https://01.dk.ecr.us-west-2.amazon.com/cowork:master",
"role_name": "arn:aws:iam::01:cowork-deploy"
"env": [
{"name": "DEBUG", "value": "0"},
]
}
Examples
DELETE /api/containers/cowork/apps/cowork-master/ HTTP/1.1
GET /containers/{organization}/apps/{app}/logs/
Read the lastest log entries from a container.
Responses
200
content null |
string
Last log entries from a containerthat were printed on stdout/stderr.
|
Examples
Domains
GET /domains/
List all domains
Query parameters
A page number within the paginated result set.
Responses
200
count null |
integer
|
||||||||||||||||||||||||||||||
next null |
string
|
||||||||||||||||||||||||||||||
previous null |
string
|
||||||||||||||||||||||||||||||
results null |
array of Domain
|
Examples
GET https://api.djaodjin.com/api/domains/ HTTP/1.1
Response
{
"count": 1,
"results": [{
"domain": "cowork.djaoapp.com",
"ssl_certificate": "...",
"ssl_certificate_key": "...",
}]
}
POST /domains/
Create a new domain.
Request body
domain null |
string
|
ssl_certificate_key null |
string
The private key content for the TLS certificate
|
ssl_certificate null |
string
The public fullchain cert content for the TLS certificate
|
from_email null |
string
|
email_host null |
string
host name for the stmp server.
|
email_port null |
integer
port for the stmp server.
|
email_host_user null |
string
username to authenticate with the stmp server.
|
email_host_password null |
string
password to authenticate with the stmp server
|
Responses
201
slug null |
string
unique identifier for the container.
|
domain null |
string
|
url null |
string
|
ssl_certificate null |
string
The public fullchain cert content for the TLS certificate
|
cert_type null |
string
The type of certificate ('default' when generated by DjaoDjin and 'custom' when uploaded by a user)
|
from_email null |
string
|
email_host null |
string
host name for the stmp server.
|
email_port null |
integer
port for the stmp server.
|
email_host_user null |
string
username to authenticate with the stmp server.
|
authentication null |
string
|
billing null |
string
|
state null |
string
|
account null |
string
|
plan null |
string
|
subscription_days_left null |
string
|
Examples
POST https://api.djaodjin.com/api/domains/ HTTP/1.1
{
slug: ""
}
Response
{
"domain": "cowork.djaoapp.com",
"ssl_certificate": "...",
}
GET /domains/{organization}/
List all domains
Responses
200
slug null |
string
unique identifier for the container.
|
domain null |
string
|
url null |
string
|
ssl_certificate null |
string
The public fullchain cert content for the TLS certificate
|
cert_type null |
string
The type of certificate ('default' when generated by DjaoDjin and 'custom' when uploaded by a user)
|
from_email null |
string
|
email_host null |
string
host name for the stmp server.
|
email_port null |
integer
port for the stmp server.
|
email_host_user null |
string
username to authenticate with the stmp server.
|
authentication null |
string
|
billing null |
string
|
state null |
string
|
account null |
string
|
plan null |
string
|
subscription_days_left null |
string
|
Examples
GET https://api.djaodjin.com/api/domains/ HTTP/1.1
Response
{
"count": 1,
"results": [{
"domain": "cowork.djaoapp.com",
"ssl_certificate": "...",
"ssl_certificate_key": "...",
}]
}
POST /domains/{organization}/
Create a new domain.
Request body
domain null |
string
|
ssl_certificate_key null |
string
The private key content for the TLS certificate
|
ssl_certificate null |
string
The public fullchain cert content for the TLS certificate
|
from_email null |
string
|
email_host null |
string
host name for the stmp server.
|
email_port null |
integer
port for the stmp server.
|
email_host_user null |
string
username to authenticate with the stmp server.
|
email_host_password null |
string
password to authenticate with the stmp server
|
Responses
201
slug null |
string
unique identifier for the container.
|
domain null |
string
|
url null |
string
|
ssl_certificate null |
string
The public fullchain cert content for the TLS certificate
|
cert_type null |
string
The type of certificate ('default' when generated by DjaoDjin and 'custom' when uploaded by a user)
|
from_email null |
string
|
email_host null |
string
host name for the stmp server.
|
email_port null |
integer
port for the stmp server.
|
email_host_user null |
string
username to authenticate with the stmp server.
|
authentication null |
string
|
billing null |
string
|
state null |
string
|
account null |
string
|
plan null |
string
|
subscription_days_left null |
string
|
Examples
POST https://api.djaodjin.com/api/domains/ HTTP/1.1
{
slug: ""
}
Response
{
"domain": "cowork.djaoapp.com",
"ssl_certificate": "...",
}
GET /domains/{organization}/{domain}/
Get the domain name at which your SaaS application is available on the Internet and the public SSL certificate used to serve requests securely.
Responses
200
slug null |
string
unique identifier for the container.
|
domain null |
string
|
url null |
string
|
ssl_certificate null |
string
The public fullchain cert content for the TLS certificate
|
cert_type null |
string
The type of certificate ('default' when generated by DjaoDjin and 'custom' when uploaded by a user)
|
from_email null |
string
|
email_host null |
string
host name for the stmp server.
|
email_port null |
integer
port for the stmp server.
|
email_host_user null |
string
username to authenticate with the stmp server.
|
authentication null |
string
|
billing null |
string
|
state null |
string
|
account null |
string
|
plan null |
string
|
subscription_days_left null |
string
|
Examples
GET https://api.djaodjin.com/api/domains/cowork/ HTTP/1.1
Response
{
"domain": "cowork.djaoapp.com"
}
PUT /domains/{organization}/{domain}/
Update the domain name and SSL certificate that present the site on the Internet.
Request body
domain null |
string
|
ssl_certificate_key null |
string
The private key content for the TLS certificate
|
ssl_certificate null |
string
The public fullchain cert content for the TLS certificate
|
from_email null |
string
|
email_host null |
string
host name for the stmp server.
|
email_port null |
integer
port for the stmp server.
|
email_host_user null |
string
username to authenticate with the stmp server.
|
email_host_password null |
string
password to authenticate with the stmp server
|
Responses
200
slug null |
string
unique identifier for the container.
|
domain null |
string
|
url null |
string
|
ssl_certificate null |
string
The public fullchain cert content for the TLS certificate
|
cert_type null |
string
The type of certificate ('default' when generated by DjaoDjin and 'custom' when uploaded by a user)
|
from_email null |
string
|
email_host null |
string
host name for the stmp server.
|
email_port null |
integer
port for the stmp server.
|
email_host_user null |
string
username to authenticate with the stmp server.
|
authentication null |
string
|
billing null |
string
|
state null |
string
|
account null |
string
|
plan null |
string
|
subscription_days_left null |
string
|
Examples
PUT https://api.djaodjin.com/api/domains/cowork/ HTTP/1.1
{
"domain": "cowork.djaoapp.com",
"ssl_certificate": "...",
"ssl_certificate_key": "...",
}
Response
{
"domain": "cowork.djaoapp.com",
"ssl_certificate": "...",
}
Examples
DELETE /api/domains/cowork/cowork-master/certificates/ HTTP/1.1
POST /domains/{organization}/{domain}/newcert/
Create a private key for a SSL certificate and return the CSR content to upload to the 3rd party SSL certificate issuer.
Responses
201
csr null |
string
The CSR content to upload to the 3rd party SSL issuer.
|
Examples
POST https://api.djaodjin.com/api/domains/cowork/cowork-master/newcert/ HTTP/1.1
Response
{
"csr": "..."
}
PUT /domains/{organization}/{domain}/reset/
Resets the database for a domain.
Responses
200
slug null |
string
unique identifier for the container.
|
domain null |
string
|
url null |
string
|
ssl_certificate null |
string
The public fullchain cert content for the TLS certificate
|
cert_type null |
string
The type of certificate ('default' when generated by DjaoDjin and 'custom' when uploaded by a user)
|
from_email null |
string
|
email_host null |
string
host name for the stmp server.
|
email_port null |
integer
port for the stmp server.
|
email_host_user null |
string
username to authenticate with the stmp server.
|
authentication null |
string
|
billing null |
string
|
state null |
string
|
account null |
string
|
plan null |
string
|
subscription_days_left null |
string
|
Examples
PUT https://api.djaodjin.com/api/domains/cowork/reset/ HTTP/1.1
Response
{
"domain": "cowork.djaoapp.com"
}
POST /domains/{organization}/{domain}/test-email/
Send yourself a test e-mail using the mail server setup for the site.
Responses
201
Examples
POST https://api.djaodjin.com/api/notifications/cowork/test-email/ HTTP/1.1