Koyeb Domains API

The Domains API from Koyeb — 3 operation(s) for domains.

OpenAPI Specification

koyeb-domains-api-openapi.yml Raw ↑
swagger: '2.0'
info:
  title: Koyeb Rest activity Domains API
  description: 'The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests.

    '
  version: 1.0.0
host: app.koyeb.com
schemes:
- https
security:
- Bearer: []
tags:
- name: Domains
paths:
  /v1/domains:
    get:
      summary: List Domains
      operationId: ListDomains
      responses:
        '200':
          description: A successful response.
          schema:
            $ref: '#/definitions/ListDomainsReply'
        '400':
          description: Validation error
          schema:
            $ref: '#/definitions/ErrorWithFields'
        '401':
          description: Returned when the token is not valid.
          schema:
            $ref: '#/definitions/Error'
        '403':
          description: Returned when the user does not have permission to access the resource.
          schema:
            $ref: '#/definitions/Error'
        '404':
          description: Returned when the resource does not exist.
          schema:
            $ref: '#/definitions/Error'
        '500':
          description: Returned in case of server error.
          schema:
            $ref: '#/definitions/Error'
        '503':
          description: Service is unavailable.
          schema:
            $ref: '#/definitions/Error'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/google.rpc.Status'
      parameters:
      - name: limit
        description: (Optional) The number of items to return
        in: query
        required: false
        type: string
      - name: offset
        description: (Optional) The offset in the list of item to return
        in: query
        required: false
        type: string
      - name: types
        description: "(Optional) A filter for types\n\n - AUTOASSIGNED: Domain like <appName>-<orgName>.koyeb.app"
        in: query
        required: false
        type: array
        items:
          type: string
          enum:
          - AUTOASSIGNED
          - CUSTOM
        collectionFormat: multi
      - name: statuses
        description: (Optional) A filter for statuses
        in: query
        required: false
        type: array
        items:
          type: string
          enum:
          - PENDING
          - ACTIVE
          - ERROR
          - DELETING
          - DELETED
        collectionFormat: multi
      - name: app_ids
        description: (Optional) A filter for apps
        in: query
        required: false
        type: array
        items:
          type: string
        collectionFormat: multi
      - name: name
        description: (Optional) A filter for name
        in: query
        required: false
        type: string
      - name: project_id
        description: (Optional) A filter for the project ID
        in: query
        required: false
        type: string
      tags:
      - Domains
    post:
      summary: Create Domain
      operationId: CreateDomain
      responses:
        '200':
          description: A successful response.
          schema:
            $ref: '#/definitions/CreateDomainReply'
        '400':
          description: Validation error
          schema:
            $ref: '#/definitions/ErrorWithFields'
        '401':
          description: Returned when the token is not valid.
          schema:
            $ref: '#/definitions/Error'
        '403':
          description: Returned when the user does not have permission to access the resource.
          schema:
            $ref: '#/definitions/Error'
        '404':
          description: Returned when the resource does not exist.
          schema:
            $ref: '#/definitions/Error'
        '500':
          description: Returned in case of server error.
          schema:
            $ref: '#/definitions/Error'
        '503':
          description: Service is unavailable.
          schema:
            $ref: '#/definitions/Error'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/google.rpc.Status'
      parameters:
      - name: domain
        in: body
        required: true
        schema:
          $ref: '#/definitions/CreateDomain'
      tags:
      - Domains
  /v1/domains/{id}:
    get:
      summary: Get Domain
      operationId: GetDomain
      responses:
        '200':
          description: A successful response.
          schema:
            $ref: '#/definitions/GetDomainReply'
        '400':
          description: Validation error
          schema:
            $ref: '#/definitions/ErrorWithFields'
        '401':
          description: Returned when the token is not valid.
          schema:
            $ref: '#/definitions/Error'
        '403':
          description: Returned when the user does not have permission to access the resource.
          schema:
            $ref: '#/definitions/Error'
        '404':
          description: Returned when the resource does not exist.
          schema:
            $ref: '#/definitions/Error'
        '500':
          description: Returned in case of server error.
          schema:
            $ref: '#/definitions/Error'
        '503':
          description: Service is unavailable.
          schema:
            $ref: '#/definitions/Error'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/google.rpc.Status'
      parameters:
      - name: id
        in: path
        required: true
        type: string
      tags:
      - Domains
    delete:
      summary: Delete Domain
      operationId: DeleteDomain
      responses:
        '200':
          description: A successful response.
          schema:
            $ref: '#/definitions/DeleteDomainReply'
        '400':
          description: Validation error
          schema:
            $ref: '#/definitions/ErrorWithFields'
        '401':
          description: Returned when the token is not valid.
          schema:
            $ref: '#/definitions/Error'
        '403':
          description: Returned when the user does not have permission to access the resource.
          schema:
            $ref: '#/definitions/Error'
        '404':
          description: Returned when the resource does not exist.
          schema:
            $ref: '#/definitions/Error'
        '500':
          description: Returned in case of server error.
          schema:
            $ref: '#/definitions/Error'
        '503':
          description: Service is unavailable.
          schema:
            $ref: '#/definitions/Error'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/google.rpc.Status'
      parameters:
      - name: id
        in: path
        required: true
        type: string
      tags:
      - Domains
    patch:
      summary: Update Domain
      operationId: UpdateDomain
      responses:
        '200':
          description: A successful response.
          schema:
            $ref: '#/definitions/UpdateDomainReply'
        '400':
          description: Validation error
          schema:
            $ref: '#/definitions/ErrorWithFields'
        '401':
          description: Returned when the token is not valid.
          schema:
            $ref: '#/definitions/Error'
        '403':
          description: Returned when the user does not have permission to access the resource.
          schema:
            $ref: '#/definitions/Error'
        '404':
          description: Returned when the resource does not exist.
          schema:
            $ref: '#/definitions/Error'
        '500':
          description: Returned in case of server error.
          schema:
            $ref: '#/definitions/Error'
        '503':
          description: Service is unavailable.
          schema:
            $ref: '#/definitions/Error'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/google.rpc.Status'
      parameters:
      - name: id
        in: path
        required: true
        type: string
      - name: domain
        in: body
        required: true
        schema:
          $ref: '#/definitions/UpdateDomain'
      - name: update_mask
        in: query
        required: false
        type: string
      - name: dry_run
        description: If set, run validation and check that the domain is available.
        in: query
        required: false
        type: boolean
      tags:
      - Domains
  /v1/domains/{id}/refresh:
    post:
      summary: Refresh Domain Status
      operationId: RefreshDomainStatus
      responses:
        '200':
          description: A successful response.
          schema:
            $ref: '#/definitions/RefreshDomainStatusReply'
        '400':
          description: Validation error
          schema:
            $ref: '#/definitions/ErrorWithFields'
        '401':
          description: Returned when the token is not valid.
          schema:
            $ref: '#/definitions/Error'
        '403':
          description: Returned when the user does not have permission to access the resource.
          schema:
            $ref: '#/definitions/Error'
        '404':
          description: Returned when the resource does not exist.
          schema:
            $ref: '#/definitions/Error'
        '500':
          description: Returned in case of server error.
          schema:
            $ref: '#/definitions/Error'
        '503':
          description: Service is unavailable.
          schema:
            $ref: '#/definitions/Error'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/google.rpc.Status'
      parameters:
      - name: id
        in: path
        required: true
        type: string
      tags:
      - Domains
definitions:
  ErrorField:
    type: object
    properties:
      field:
        type: string
      description:
        type: string
  Domain.LoadBalancerCloudflare:
    type: object
  GetDomainReply:
    type: object
    properties:
      domain:
        $ref: '#/definitions/Domain'
  DeleteDomainReply:
    type: object
  google.rpc.Status:
    type: object
    properties:
      code:
        type: integer
        format: int32
      message:
        type: string
      details:
        type: array
        items:
          $ref: '#/definitions/google.protobuf.Any'
  CreateDomain:
    type: object
    properties:
      name:
        type: string
      type:
        $ref: '#/definitions/Domain.Type'
      app_id:
        type: string
        title: to auto-attach to an app. Optional
      cloudflare:
        $ref: '#/definitions/Domain.LoadBalancerCloudflare'
      koyeb:
        $ref: '#/definitions/Domain.LoadBalancerKoyeb'
        description: Only applicable to auto-assigned domains, for organizations on the Scale plan.
      project_id:
        type: string
        title: (Optional) The project ID to associate with the domain
  CreateDomainReply:
    type: object
    properties:
      domain:
        $ref: '#/definitions/Domain'
  Domain.Status:
    type: string
    enum:
    - PENDING
    - ACTIVE
    - ERROR
    - DELETING
    - DELETED
    default: PENDING
  Domain.Type:
    type: string
    enum:
    - AUTOASSIGNED
    - CUSTOM
    default: AUTOASSIGNED
    title: '- AUTOASSIGNED: Domain like <appName>-<orgName>.koyeb.app'
  ErrorWithFields:
    type: object
    properties:
      status:
        type: integer
        format: int32
      code:
        type: string
      message:
        type: string
      fields:
        type: array
        items:
          $ref: '#/definitions/ErrorField'
  ListDomainsReply:
    type: object
    properties:
      domains:
        type: array
        items:
          $ref: '#/definitions/Domain'
      limit:
        type: integer
        format: int64
        title: The limit in the request
      offset:
        type: integer
        format: int64
        title: The offset in the request
      count:
        type: integer
        format: int64
        title: The total number of items
  UpdateDomain:
    type: object
    properties:
      app_id:
        type: string
        description: To attach or detach from an app for custom domain.
      subdomain:
        type: string
        description: To change subdomain for auto-assigned domain.
  google.protobuf.Any:
    type: object
    properties:
      '@type':
        type: string
    additionalProperties: {}
  Domain.LoadBalancerKoyeb:
    type: object
    properties:
      request_timeout_seconds:
        type: integer
        format: int64
        title: Between 100 and 900
  Domain:
    type: object
    properties:
      id:
        type: string
      organization_id:
        type: string
      name:
        type: string
      created_at:
        type: string
        format: date-time
      updated_at:
        type: string
        format: date-time
      status:
        $ref: '#/definitions/Domain.Status'
      type:
        $ref: '#/definitions/Domain.Type'
      app_id:
        type: string
      deployment_group:
        type: string
      verified_at:
        type: string
        format: date-time
      intended_cname:
        type: string
      messages:
        type: array
        items:
          type: string
      version:
        type: string
        format: uint64
      cloudflare:
        $ref: '#/definitions/Domain.LoadBalancerCloudflare'
      koyeb:
        $ref: '#/definitions/Domain.LoadBalancerKoyeb'
  UpdateDomainReply:
    type: object
    properties:
      domain:
        $ref: '#/definitions/Domain'
  Error:
    type: object
    properties:
      status:
        type: integer
        format: int32
      code:
        type: string
      message:
        type: string
  RefreshDomainStatusReply:
    type: object
securityDefinitions:
  Bearer:
    type: apiKey
    name: Authorization
    in: header
x-tagGroups:
- name: Introduction
  tags:
  - intro
- name: API
  tags:
  - Profile
  - Sessions
  - Users
  - organization
  - OrganizationMembers
  - OrganizationInvitations
  - OrganizationConfirmations
  - Subscriptions
  - Coupons
  - Credentials
  - Secrets
  - activity
  - Apps
  - Services
  - Deployments
  - Archives
  - RegionalDeployments
  - Instances
  - Domains
  - PersistentVolumes
  - Snapshots
  - Compose
  - Repositories
  - Logs
  - Metrics
  - Catalog
  - CatalogRegions
  - CatalogInstances
  - Usages
  - Summary
  - DockerHelper