Craft.io Workspaces API

Workspaces are the areas where product teams are managing the full lifecycle of their products

OpenAPI Specification

craft-io-workspaces-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  title: Craft.io Feedback Portal Feedback items Workspaces API
  description: REST API for managing customer feedback portals, including listing portals and categories, retrieving feedback items, and submitting new feedback via POST requests.
  version: 1.0.0
  contact:
    name: Craft.io Support
    url: https://help.craft.io/
    email: support@craft.io
servers:
- url: /
tags:
- name: Workspaces
  description: Workspaces are the areas where product teams are managing the full lifecycle of their products
paths:
  /workspaces/{accountId}:
    get:
      operationId: GetWorkspaces
      responses:
        '200':
          description: A list of workspaces
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/Workspace'
                type: array
              examples:
                Example 1:
                  value:
                  - id: string
                    name: string
                    key: string
                  - id: string
                    name: string
                    key: string
        '400':
          description: Invalid account ID
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GeneralErrorResponse'
        '401':
          description: No access to account
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GeneralErrorResponse'
        '403':
          description: Access denied
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GeneralErrorResponse'
        '500':
          description: An error occurred while fetching workspaces
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GeneralErrorResponse'
      description: Get the list of your account’s workspaces (workspace ID & name)
      tags:
      - Workspaces
      security:
      - api_key:
        - read:workspace-meta:craft
      parameters:
      - in: path
        name: accountId
        required: true
        schema:
          type: string
  /workspaces:
    get:
      operationId: GetWorkspacesByKey
      responses:
        '200':
          description: A list of workspaces
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/Workspace'
                type: array
              examples:
                Example 1:
                  value:
                  - id: string
                    name: string
                    key: string
                  - id: string
                    name: string
                    key: string
        '401':
          description: No access to account
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GeneralErrorResponse'
        '403':
          description: Access denied
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GeneralErrorResponse'
        '500':
          description: An error occurred while fetching workspaces
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GeneralErrorResponse'
      description: Get the list of your account’s workspaces (workspace ID & name)
      tags:
      - Workspaces
      security:
      - api_key:
        - read:workspace-meta:craft
      parameters: []
  /workspace/{workspaceId}/custom_fields:
    get:
      operationId: GetCustomFields
      responses:
        '200':
          description: A list of workspace custom fields and their metadata
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/CustomField'
                type: array
        '400':
          description: Invalid account ID
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GeneralErrorResponse'
        '401':
          description: No access to account
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GeneralErrorResponse'
        '403':
          description: Access denied
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GeneralErrorResponse'
        '500':
          description: An error occurred while fetching custom fields
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GeneralErrorResponse'
      description: Get the list of all workspace custom fields and their metadata
      tags:
      - Workspaces
      security:
      - api_key:
        - read:workspace-meta:craft
      parameters:
      - in: path
        name: workspaceId
        required: true
        schema:
          type: string
      - in: query
        name: includeOptions
        required: false
        schema:
          default: false
          type: boolean
  /workspace/{workspaceId}/terminology:
    get:
      operationId: GetTerminology
      responses:
        '200':
          description: A list of workspace entities terminology
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TerminologyList_Terminology_'
        '400':
          description: Invalid workspace ID
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GeneralErrorResponse'
        '401':
          description: No access to account
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GeneralErrorResponse'
        '403':
          description: Access denied
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GeneralErrorResponse'
        '500':
          description: An error occurred while fetching terminology
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GeneralErrorResponse'
      description: Get the list of the workspace entities terminology
      tags:
      - Workspaces
      security:
      - api_key:
        - read:workspace-meta:craft
      parameters:
      - in: path
        name: workspaceId
        required: true
        schema:
          type: string
components:
  schemas:
    Terminology:
      properties:
        category:
          type: string
        default:
          type: string
        customSingle:
          type: string
        customPlural:
          type: string
      required:
      - category
      - default
      - customSingle
      type: object
      additionalProperties: false
    Workspace:
      properties:
        id:
          type: string
        name:
          type: string
          nullable: true
        key:
          type: string
        webUrl:
          type: string
          description: Canonical Craft.io app URL for this workspace. Computed in PublishService.
      type: object
      additionalProperties: false
    CustomFieldOption:
      properties:
        id:
          type: string
        label:
          type: string
        startDate:
          type: string
          nullable: true
        endDate:
          type: string
          nullable: true
      required:
      - id
      - label
      type: object
      additionalProperties: false
    GeneralErrorResponse:
      properties:
        message:
          type: string
      required:
      - message
      type: object
      additionalProperties: false
    OptionShape:
      type: string
      enum:
      - select
      - date
      - date_range
    CustomField:
      properties:
        id:
          type: string
        name:
          type: string
        type:
          type: string
        values:
          items:
            type: string
          type: array
        options:
          items:
            $ref: '#/components/schemas/CustomFieldOption'
          type: array
        optionShape:
          $ref: '#/components/schemas/OptionShape'
      required:
      - id
      - name
      - type
      type: object
      additionalProperties: false
    TerminologyList_Terminology_:
      properties: {}
      type: object
      additionalProperties:
        $ref: '#/components/schemas/Terminology'
  securitySchemes:
    api_key:
      type: apiKey
      in: header
      name: x-api-key