1. Home
  2. Docs
  3. API
  4. Websites

Websites

Two queries are available:

websites: [Website!]! @all @whereAuth(relation: "user")
website(id: ID! @eq): Website @whereAuth(relation: "user") @find

Websites

This query will return all websites in your account. Here is the Website type:

type Website {
    id: ID!
    www: Boolean!
    domain: String!
    path: String
    ssl: Boolean!
    up: Boolean!
    ssl_is_valid: Boolean
    ssl_issuer: String
    ssl_organization: String
    ssl_expiration_date: DateTime
    ssl_days_until_expiration: Int
    created_at: DateTime!
    updated_at: DateTime!
    downtimes: [Downtime!] @hasMany(maxCount: 50, defaultCount: 15, type: PAGINATOR)
}

Website

With the website query, you can retrieve the fields above and all the downtimes of the site (ordered by the most recent first).

Here is the Downtime type:

type Downtime {
    id: ID!
    down_at: DateTime!
    up_at: DateTime
    duration: Int
}