openapi: 3.0.0
info:
  title: Workspace API
  description: API for retrieving workspace information
  version: 1.0.0

servers:
  - url: https://api.hivelight.com
    description: Global endpoint
  - url: https://au.api.hivelight.com
    description: Australian endpoint
paths:
  /workspace:
    get:
      summary: Get the current workspace
      description: |
        Retrieve a workspace along with its related matter types
        The API described in the [workspace.yaml](https://developers.hivelight.com/schemas/workspace.yaml) file
      responses:
        "200":
          description: Successful response with workspace data
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      type:
                        type: string
                        example: workspaces
                      id:
                        type: string
                        example: abc1234abc1234
                      attributes:
                        type: object
                        properties:
                          name:
                            type: string
                            example: Kauff + Broad LLC
                          jurisdictions:
                            type: array
                            items:
                              type: string
                            example: ["CA", "CA-QC"]
                          country:
                            type: string
                            example: CA
                          timezone:
                            type: string
                            example: Pacific/Auckland
                      relationships:
                        type: object
                        properties:
                          types:
                            type: object
                            properties:
                              data:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    type:
                                      type: string
                                      example: types
                                    id:
                                      type: string
                                      description: The ID of the matter type as per detailed in the relationship
                                      example: 5b6X9
                  included:
                    type: array
                    items:
                      type: object
                      properties:
                        type:
                          type: string
                          example: types
                        id:
                          type: string
                          example: 5b6X9
                        attributes:
                          type: object
                          properties:
                            name:
                              type: string
                              example: Intake
