DreamFactory App API

Application and API key management

OpenAPI Specification

dreamfactory-app-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: DreamFactory System Admin App API
  description: The DreamFactory System API provides administrative management capabilities for DreamFactory instances. It allows administrators to manage services, apps, roles, users, CORS configurations, email templates, environment settings, lookups, events, scripts, and more. All system resources are accessible under the /api/v2/system/ base path. Authentication requires either an X-DreamFactory-Session-Token header (for system admins) or an X-DreamFactory-API-Key header (for users with appropriate permissions).
  version: 2.0.0
  contact:
    name: DreamFactory Support
    url: https://www.dreamfactory.com/support
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
  termsOfService: https://www.dreamfactory.com/terms-of-use
servers:
- url: https://{instance}/api/v2
  description: DreamFactory instance
  variables:
    instance:
      default: example.dreamfactory.com
      description: Your DreamFactory instance hostname
security:
- sessionToken: []
- apiKey: []
tags:
- name: App
  description: Application and API key management
paths:
  /system/app:
    get:
      operationId: listApps
      summary: DreamFactory List applications
      description: Retrieve a list of registered applications and their API keys.
      tags:
      - App
      parameters:
      - $ref: '#/components/parameters/fields'
      - $ref: '#/components/parameters/filter'
      - $ref: '#/components/parameters/limit'
      - $ref: '#/components/parameters/offset'
      - $ref: '#/components/parameters/order'
      - $ref: '#/components/parameters/related'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AppListResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/InternalError'
    post:
      operationId: createApp
      summary: DreamFactory Create application
      description: Create a new application registration.
      tags:
      - App
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AppRequest'
      responses:
        '201':
          description: App created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AppResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/InternalError'
  /system/app/{id}:
    get:
      operationId: getApp
      summary: DreamFactory Get application
      description: Retrieve a specific application by ID.
      tags:
      - App
      parameters:
      - $ref: '#/components/parameters/id'
      - $ref: '#/components/parameters/fields'
      - $ref: '#/components/parameters/related'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AppResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalError'
    patch:
      operationId: updateApp
      summary: DreamFactory Update application
      description: Update a specific application by ID.
      tags:
      - App
      parameters:
      - $ref: '#/components/parameters/id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AppRequest'
      responses:
        '200':
          description: App updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AppResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalError'
    delete:
      operationId: deleteApp
      summary: DreamFactory Delete application
      description: Delete a specific application by ID.
      tags:
      - App
      parameters:
      - $ref: '#/components/parameters/id'
      responses:
        '200':
          description: App deleted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuccessResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  parameters:
    id:
      name: id
      in: path
      required: true
      description: Resource identifier.
      schema:
        type: integer
    limit:
      name: limit
      in: query
      description: Maximum number of records to return.
      schema:
        type: integer
        default: 0
    related:
      name: related
      in: query
      description: Comma-delimited list of related resources to include.
      schema:
        type: string
    filter:
      name: filter
      in: query
      description: SQL-like filter to limit results.
      schema:
        type: string
    fields:
      name: fields
      in: query
      description: Comma-delimited list of fields to return.
      schema:
        type: string
    order:
      name: order
      in: query
      description: SQL-like order containing field and direction.
      schema:
        type: string
    offset:
      name: offset
      in: query
      description: Number of records to skip for pagination.
      schema:
        type: integer
        default: 0
  responses:
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    InternalError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Unauthorized:
      description: Unauthorized - invalid or missing session token or API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    BadRequest:
      description: Bad request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  schemas:
    AppListResponse:
      type: object
      properties:
        resource:
          type: array
          items:
            $ref: '#/components/schemas/AppResponse'
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: integer
              description: Error code.
            message:
              type: string
              description: Error message.
            context:
              type: object
              description: Additional error context.
    SuccessResponse:
      type: object
      properties:
        success:
          type: boolean
    AppRequest:
      type: object
      properties:
        name:
          type: string
          description: Name of the application.
        api_key:
          type: string
          description: API key for the application.
        description:
          type: string
          description: Description of the application.
        is_active:
          type: boolean
          description: Whether the application is active.
        type:
          type: integer
          description: Application type identifier.
        role_id:
          type: integer
          description: Default role ID for the application.
      required:
      - name
    AppResponse:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
        api_key:
          type: string
        description:
          type: string
        is_active:
          type: boolean
        type:
          type: integer
        role_id:
          type: integer
        created_date:
          type: string
          format: date-time
        last_modified_date:
          type: string
          format: date-time
  securitySchemes:
    sessionToken:
      type: apiKey
      name: X-DreamFactory-Session-Token
      in: header
      description: Session token obtained after admin login.
    apiKey:
      type: apiKey
      name: X-DreamFactory-API-Key
      in: header
      description: API key associated with a registered application.
externalDocs:
  description: DreamFactory Documentation
  url: https://guide.dreamfactory.com/docs/