GoodData Logical Data Model API

Retrieve and set the workspace logical data model (datasets, attributes, facts, references) as an all-in-one declarative document at /api/v1/layout/workspaces/{workspaceId}/logicalModel.

OpenAPI Specification

gooddata-openapi.yml Raw ↑
openapi: 3.0.1
info:
  title: GoodData Cloud API
  description: >-
    REST API for GoodData Cloud, covering the Entity API
    (/api/v1/entities), the Declarative / Layout API (/api/v1/layout),
    and the Action API (/api/v1/actions). The API manages workspaces,
    data sources, the logical data model, metrics, visualizations,
    dashboards, AFM executions, users, and permissions. Authentication
    uses a Bearer API token in the Authorization header.
  termsOfService: https://www.gooddata.com/legal/
  contact:
    name: GoodData Support
    url: https://support.gooddata.com
  version: '1.0'
servers:
  - url: https://{domain}.gooddata.com
    description: GoodData Cloud organization host
    variables:
      domain:
        default: your-organization
        description: Your GoodData Cloud organization subdomain.
security:
  - bearerAuth: []
paths:
  /api/v1/entities/workspaces:
    get:
      operationId: getWorkspaces
      tags:
        - Workspaces
      summary: List all workspaces in the organization.
      parameters:
        - $ref: '#/components/parameters/Size'
        - $ref: '#/components/parameters/Page'
      responses:
        '200':
          description: A collection of workspaces.
    post:
      operationId: createWorkspace
      tags:
        - Workspaces
      summary: Create a new workspace.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Workspace'
      responses:
        '201':
          description: The created workspace.
  /api/v1/entities/workspaces/{workspaceId}:
    parameters:
      - $ref: '#/components/parameters/WorkspaceId'
    get:
      operationId: getWorkspace
      tags:
        - Workspaces
      summary: Get a single workspace by id.
      responses:
        '200':
          description: The requested workspace.
    put:
      operationId: updateWorkspace
      tags:
        - Workspaces
      summary: Update a workspace.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Workspace'
      responses:
        '200':
          description: The updated workspace.
    delete:
      operationId: deleteWorkspace
      tags:
        - Workspaces
      summary: Delete a workspace.
      responses:
        '204':
          description: Workspace deleted.
  /api/v1/entities/dataSources:
    get:
      operationId: getDataSources
      tags:
        - Data Sources
      summary: List all data sources.
      parameters:
        - $ref: '#/components/parameters/Size'
        - $ref: '#/components/parameters/Page'
      responses:
        '200':
          description: A collection of data sources.
    post:
      operationId: createDataSource
      tags:
        - Data Sources
      summary: Register a new data source.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DataSource'
      responses:
        '201':
          description: The created data source.
  /api/v1/entities/dataSources/{dataSourceId}:
    parameters:
      - $ref: '#/components/parameters/DataSourceId'
    get:
      operationId: getDataSource
      tags:
        - Data Sources
      summary: Get a single data source by id.
      responses:
        '200':
          description: The requested data source.
    delete:
      operationId: deleteDataSource
      tags:
        - Data Sources
      summary: Delete a data source.
      responses:
        '204':
          description: Data source deleted.
  /api/v1/actions/dataSources/{dataSourceId}/test:
    parameters:
      - $ref: '#/components/parameters/DataSourceId'
    post:
      operationId: testDataSource
      tags:
        - Data Sources
      summary: Test a data source connection.
      responses:
        '200':
          description: Connection test result.
  /api/v1/layout/workspaces/{workspaceId}/logicalModel:
    parameters:
      - $ref: '#/components/parameters/WorkspaceId'
    get:
      operationId: getLogicalModel
      tags:
        - Logical Data Model
      summary: Get the declarative logical data model of a workspace.
      responses:
        '200':
          description: The workspace logical data model.
    put:
      operationId: setLogicalModel
      tags:
        - Logical Data Model
      summary: Set the declarative logical data model of a workspace.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
      responses:
        '200':
          description: The updated logical data model.
  /api/v1/entities/workspaces/{workspaceId}/metrics:
    parameters:
      - $ref: '#/components/parameters/WorkspaceId'
    get:
      operationId: getMetrics
      tags:
        - Metrics
      summary: List all metrics in a workspace.
      parameters:
        - $ref: '#/components/parameters/Size'
        - $ref: '#/components/parameters/Page'
      responses:
        '200':
          description: A collection of metrics.
    post:
      operationId: createMetric
      tags:
        - Metrics
      summary: Create a MAQL metric in a workspace.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Metric'
      responses:
        '201':
          description: The created metric.
  /api/v1/entities/workspaces/{workspaceId}/metrics/{objectId}:
    parameters:
      - $ref: '#/components/parameters/WorkspaceId'
      - $ref: '#/components/parameters/ObjectId'
    get:
      operationId: getMetric
      tags:
        - Metrics
      summary: Get a single metric by id.
      responses:
        '200':
          description: The requested metric.
    delete:
      operationId: deleteMetric
      tags:
        - Metrics
      summary: Delete a metric.
      responses:
        '204':
          description: Metric deleted.
  /api/v1/entities/workspaces/{workspaceId}/visualizationObjects:
    parameters:
      - $ref: '#/components/parameters/WorkspaceId'
    get:
      operationId: getVisualizationObjects
      tags:
        - Visualizations
      summary: List all visualization objects (insights) in a workspace.
      parameters:
        - $ref: '#/components/parameters/Size'
        - $ref: '#/components/parameters/Page'
      responses:
        '200':
          description: A collection of visualization objects.
    post:
      operationId: createVisualizationObject
      tags:
        - Visualizations
      summary: Create a visualization object (insight).
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
      responses:
        '201':
          description: The created visualization object.
  /api/v1/entities/workspaces/{workspaceId}/analyticalDashboards:
    parameters:
      - $ref: '#/components/parameters/WorkspaceId'
    get:
      operationId: getAnalyticalDashboards
      tags:
        - Dashboards
      summary: List all analytical dashboards in a workspace.
      parameters:
        - $ref: '#/components/parameters/Size'
        - $ref: '#/components/parameters/Page'
      responses:
        '200':
          description: A collection of analytical dashboards.
    post:
      operationId: createAnalyticalDashboard
      tags:
        - Dashboards
      summary: Create an analytical dashboard.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
      responses:
        '201':
          description: The created analytical dashboard.
  /api/v1/actions/workspaces/{workspaceId}/execution/afm/execute:
    parameters:
      - $ref: '#/components/parameters/WorkspaceId'
    post:
      operationId: computeReport
      tags:
        - Execution
      summary: Execute an AFM (Analytical Foundation Model) computation.
      description: >-
        Accepts an AFM execution definition and returns a result link
        (resultId) that can be retrieved from the execution result endpoint.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AfmExecution'
      responses:
        '200':
          description: An execution response containing a resultId.
  /api/v1/actions/workspaces/{workspaceId}/execution/afm/execute/result/{resultId}:
    parameters:
      - $ref: '#/components/parameters/WorkspaceId'
      - name: resultId
        in: path
        required: true
        schema:
          type: string
    get:
      operationId: retrieveResult
      tags:
        - Execution
      summary: Retrieve the computed data for an AFM execution result.
      parameters:
        - name: offset
          in: query
          schema:
            type: string
        - name: limit
          in: query
          schema:
            type: string
      responses:
        '200':
          description: The computed execution result data.
  /api/v1/entities/users:
    get:
      operationId: getUsers
      tags:
        - Users
      summary: List all users in the organization.
      parameters:
        - $ref: '#/components/parameters/Size'
        - $ref: '#/components/parameters/Page'
      responses:
        '200':
          description: A collection of users.
    post:
      operationId: createUser
      tags:
        - Users
      summary: Create a user.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
      responses:
        '201':
          description: The created user.
  /api/v1/entities/users/{userId}:
    parameters:
      - name: userId
        in: path
        required: true
        schema:
          type: string
    get:
      operationId: getUser
      tags:
        - Users
      summary: Get a single user by id.
      responses:
        '200':
          description: The requested user.
    delete:
      operationId: deleteUser
      tags:
        - Users
      summary: Delete a user.
      responses:
        '204':
          description: User deleted.
  /api/v1/entities/userGroups:
    get:
      operationId: getUserGroups
      tags:
        - Users
      summary: List all user groups in the organization.
      parameters:
        - $ref: '#/components/parameters/Size'
        - $ref: '#/components/parameters/Page'
      responses:
        '200':
          description: A collection of user groups.
    post:
      operationId: createUserGroup
      tags:
        - Users
      summary: Create a user group.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
      responses:
        '201':
          description: The created user group.
  /api/v1/layout/workspaces/{workspaceId}/permissions:
    parameters:
      - $ref: '#/components/parameters/WorkspaceId'
    get:
      operationId: getWorkspacePermissions
      tags:
        - Permissions
      summary: Get the declarative permissions assigned for a workspace.
      responses:
        '200':
          description: The workspace permission assignments.
    put:
      operationId: setWorkspacePermissions
      tags:
        - Permissions
      summary: Set the declarative permissions for a workspace.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
      responses:
        '200':
          description: The updated workspace permissions.
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: "GoodData Cloud API token passed as 'Authorization: Bearer <API_TOKEN>'."
  parameters:
    WorkspaceId:
      name: workspaceId
      in: path
      required: true
      description: The id of the workspace.
      schema:
        type: string
    DataSourceId:
      name: dataSourceId
      in: path
      required: true
      description: The id of the data source.
      schema:
        type: string
    ObjectId:
      name: objectId
      in: path
      required: true
      description: The id of the entity object.
      schema:
        type: string
    Size:
      name: size
      in: query
      description: The number of objects to return. The default is 20.
      schema:
        type: integer
        default: 20
    Page:
      name: page
      in: query
      description: The zero-based pagination index of the collection set to return.
      schema:
        type: integer
        default: 0
  schemas:
    Workspace:
      type: object
      properties:
        data:
          type: object
          properties:
            id:
              type: string
            type:
              type: string
              example: workspace
            attributes:
              type: object
              properties:
                name:
                  type: string
                description:
                  type: string
    DataSource:
      type: object
      properties:
        data:
          type: object
          properties:
            id:
              type: string
            type:
              type: string
              example: dataSource
            attributes:
              type: object
              properties:
                name:
                  type: string
                type:
                  type: string
                  example: POSTGRESQL
                url:
                  type: string
                schema:
                  type: string
    Metric:
      type: object
      properties:
        data:
          type: object
          properties:
            id:
              type: string
            type:
              type: string
              example: metric
            attributes:
              type: object
              properties:
                title:
                  type: string
                content:
                  type: object
                  properties:
                    maql:
                      type: string
                      example: SELECT SUM({fact/order_amount})
                    format:
                      type: string
    AfmExecution:
      type: object
      properties:
        execution:
          type: object
          properties:
            afm:
              type: object
              properties:
                measures:
                  type: array
                  items:
                    type: object
                attributes:
                  type: array
                  items:
                    type: object
                filters:
                  type: array
                  items:
                    type: object
            resultSpec:
              type: object
        settings:
          type: object