Moesif Workspaces API

The Workspaces API from Moesif — 8 operation(s) for workspaces.

OpenAPI Specification

moesif-workspaces-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  description: Management API to query data in Moesif. You can use the management API to export data for custom reports or to build custom dashboards.
  contact:
  - email: support@moesif.com
  - email: support@moesif.com
  termsOfService: https://www.moesif.com/terms
  version: '1'
  title: Management Applications Workspaces API
servers:
- url: https://api.moesif.com/v1
  description: Management API V1
- url: https://api.moesif.com/v1
  description: Management API V1
consumes:
- application/json
- application/json
produces:
- application/json
- application/json
tags:
- name: Workspaces
paths:
  /workspaces/access_token:
    get:
      security:
      - managementAPIToken:
        - read:workspaces
      description: Get a new Workspace Access Token
      tags:
      - Workspaces
      operationId: getWorkspaceToken
      summary: Get new Workspace Token
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SignedTokenDTO'
  /workspaces/public/{id}:
    get:
      security:
      - managementAPIToken:
        - read:public_workspaces
      tags:
      - Workspaces
      operationId: getPublicWorkspace
      parameters:
      - schema:
          type: string
        in: path
        name: id
        required: true
      summary: Get a Public Workspace
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkspaceDocument'
  /~/workspaces:
    post:
      security:
      - managementAPIToken:
        - create:workspaces
        - create:public_workspaces
      tags:
      - Workspaces
      operationId: createWorkspace
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WorkspaceCreateItem'
      parameters:
      - schema:
          type: string
        in: path
        name: orgId
        required: true
      - schema:
          default: '~'
          type: string
        in: query
        name: app_id
        required: false
      - schema:
          type: string
          format: date-time
        in: query
        name: expiration
        required: false
      summary: Create New Workspace
      responses:
        '201':
          description: success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkspaceDocument'
    get:
      security:
      - managementAPIToken:
        - read:workspaces
      tags:
      - Workspaces
      operationId: getWorkspaces
      parameters:
      - schema:
          type: string
        in: path
        name: orgId
        required: true
      - schema:
          default: '~'
          type: string
        in: query
        name: app_id
        required: false
      - schema:
          format: int32
          type: integer
        in: query
        name: take
        required: true
      - schema:
          default: None
          type: string
        in: query
        name: before_id
        required: false
      - schema:
          default: sequence
          type: string
        in: query
        name: '`type`'
        required: false
      - schema:
          type: array
          items:
            type: string
        in: query
        name: access
        required: true
      summary: Get Workspaces
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/WorkspaceDocument'
  /~/workspaces/templates:
    get:
      security:
      - managementAPIToken:
        - read:workspaces
      tags:
      - Workspaces
      operationId: getWorkspaceTemplates
      parameters:
      - schema:
          type: string
        in: path
        name: orgId
        required: true
      - schema:
          default: '~'
          type: string
        in: query
        name: app_id
        required: false
      summary: Get Workspace Templates
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/WorkspaceDocument'
  /~/workspaces/{id}:
    post:
      body: null
      security:
      - managementAPIToken:
        - update:workspaces
        - update:public_workspaces
      tags:
      - Workspaces
      operationId: updateWorkspace
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WorkspaceUpdateItem'
      parameters:
      - schema:
          type: string
        in: path
        name: orgId
        required: true
      - schema:
          default: '~'
          type: string
        in: query
        name: app_id
        required: false
      - schema:
          type: string
        in: path
        name: id
        required: true
      summary: Update a Workspace
      responses:
        '200':
          description: success
    get:
      security:
      - managementAPIToken:
        - read:workspaces
      tags:
      - Workspaces
      operationId: getWorkspace
      parameters:
      - schema:
          type: string
        in: path
        name: orgId
        required: true
      - schema:
          default: '~'
          type: string
        in: query
        name: app_id
        required: false
      - schema:
          type: string
        in: path
        name: id
        required: true
      summary: Get a Workspace
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkspaceDocument'
    delete:
      security:
      - managementAPIToken:
        - delete:workspaces
      tags:
      - Workspaces
      operationId: deleteWorkspace
      parameters:
      - schema:
          type: string
        in: path
        name: orgId
        required: true
      - schema:
          default: '~'
          type: string
        in: query
        name: app_id
        required: false
      - schema:
          type: string
        in: path
        name: id
        required: true
      summary: Delete a Workspace
      responses:
        '200':
          description: success
  /~/workspaces/{id}/comments:
    post:
      security:
      - managementAPIToken:
        - update:workspaces
      tags:
      - Workspaces
      operationId: createComment
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CommentItem'
      parameters:
      - schema:
          type: string
        in: path
        name: orgId
        required: true
      - schema:
          default: '~'
          type: string
        in: query
        name: app_id
        required: false
      - schema:
          type: string
        in: path
        name: id
        required: true
      summary: Create a New Comment
      responses:
        '201':
          description: success
    get:
      security:
      - managementAPIToken:
        - read:workspaces
      tags:
      - Workspaces
      operationId: getComments
      parameters:
      - schema:
          type: string
        in: path
        name: orgId
        required: true
      - schema:
          default: '~'
          type: string
        in: query
        name: app_id
        required: false
      - schema:
          type: string
        in: path
        name: id
        required: true
      summary: Get all Comments
      responses:
        '200':
          description: success
  /~/workspaces/{id}/comments/{commentId}:
    post:
      security:
      - managementAPIToken:
        - update:workspaces
      tags:
      - Workspaces
      operationId: updateComment
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CommentItem'
      parameters:
      - schema:
          type: string
        in: path
        name: orgId
        required: true
      - schema:
          default: '~'
          type: string
        in: query
        name: app_id
        required: false
      - schema:
          type: string
        in: path
        name: id
        required: true
      - schema:
          type: string
        in: path
        name: commentId
        required: true
      summary: Update Existing Comment
      responses:
        '201':
          description: success
    delete:
      security:
      - managementAPIToken:
        - update:workspaces
      tags:
      - Workspaces
      operationId: deleteComment
      parameters:
      - schema:
          type: string
        in: path
        name: orgId
        required: true
      - schema:
          default: '~'
          type: string
        in: query
        name: app_id
        required: false
      - schema:
          type: string
        in: path
        name: id
        required: true
      - schema:
          type: string
        in: path
        name: commentId
        required: true
      summary: Delete a Comment
      responses:
        '204':
          description: success
  /~/workspaces/{id}/policy/acl:
    post:
      security:
      - managementAPIToken:
        - create:workspaces
      tags:
      - Workspaces
      operationId: addACLPermissions
      parameters:
      - schema:
          type: string
        in: path
        name: orgId
        required: true
      - schema:
          default: '~'
          type: string
        in: query
        name: app_id
        required: false
      - schema:
          type: string
        in: path
        name: id
        required: true
      - schema:
          type: string
        in: query
        name: grantee
        required: false
      - schema:
          default: None
          type: string
        in: query
        name: permission
        required: false
      summary: Add ACL permission
      responses:
        '200':
          description: success
    delete:
      security:
      - managementAPIToken:
        - delete:workspaces
      tags:
      - Workspaces
      operationId: deleteACLPermissions
      parameters:
      - schema:
          type: string
        in: path
        name: orgId
        required: true
      - schema:
          default: '~'
          type: string
        in: query
        name: app_id
        required: false
      - schema:
          type: string
        in: path
        name: id
        required: true
      - schema:
          type: string
        in: query
        name: grantee
        required: true
      summary: Delete ACL permission
      responses:
        '200':
          description: success
components:
  schemas:
    SequenceItem:
      properties:
        delay:
          type: integer
          format: int32
        submit_data:
          $ref: '#/components/schemas/SubmitData'
      required:
      - delay
      - submit_data
    KeyValuePair:
      properties:
        key:
          type: string
        val:
          type: string
      required:
      - key
      - val
    Summary:
      properties:
        count:
          type: integer
          format: int32
        latest_comment:
          $ref: '#/components/schemas/CreateCommentItem'
      required:
      - count
    WorkspaceDocument:
      properties:
        name:
          type: string
        is_default:
          type: boolean
        view_count:
          type: integer
          format: int32
        _id:
          type: string
        is_template:
          type: boolean
        dashboard:
          type: object
        auth_user_id:
          type: string
        colors:
          type: object
        sequence:
          type: array
          items:
            $ref: '#/components/schemas/SequenceItem'
        drawings:
          type: array
          items:
            $ref: '#/components/schemas/DrawingItem'
        chart:
          $ref: '#/components/schemas/ChartItem'
        template:
          $ref: '#/components/schemas/TemplateItem'
        app_id:
          type: string
        type:
          type: string
        width:
          type: number
          format: double
        sort_order:
          type: number
          format: double
        policy:
          $ref: '#/components/schemas/PolicyItem'
        org_id:
          type: string
        migration:
          type: object
        created:
          type: string
          format: date-time
        comments:
          $ref: '#/components/schemas/Comments'
      required:
      - auth_user_id
      - org_id
      - app_id
      - created
      - view_count
    DrawingItem:
      properties:
        name:
          type: string
        direction:
          type: string
        id:
          type: string
        type:
          type: string
        value:
          type: number
          format: double
      required:
      - id
      - name
      - type
      - value
      - direction
    CommentItem:
      properties:
        message:
          type: string
        mentions:
          type: array
          items:
            type: string
    TemplateItem:
      properties:
        dynamic_fields:
          type: array
          items:
            type: string
        dynamic_time:
          type: boolean
      required:
      - dynamic_fields
    SubmitData:
      properties:
        body:
          type: object
        url:
          type: string
        params:
          type: array
          items:
            $ref: '#/components/schemas/KeyValuePair'
        verb:
          type: string
        headers:
          type: array
          items:
            $ref: '#/components/schemas/KeyValuePair'
      required:
      - url
      - verb
    CreateCommentItem:
      properties:
        auth_user_id:
          type: string
        comment_id:
          type: string
        mentions:
          type: array
          items:
            type: string
        partner_user_id:
          type: string
        message:
          type: string
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    PolicyItem:
      properties:
        acl:
          type: array
          items:
            $ref: '#/components/schemas/ACLItem'
        resource:
          type: object
        api_scopes:
          type: array
          items:
            type: string
        original_encoded_resource:
          type: string
      required:
      - acl
      - resource
    ChartItem:
      properties:
        original_encoded_view_elements:
          type: string
        funnel_query:
          type: object
        url_query:
          type: string
        to:
          type: string
        view_elements:
          type: object
        from:
          type: string
        original_encoded_funnel_query:
          type: string
        es_query:
          type: object
        args:
          type: string
        original_encoded_query:
          type: string
        time_zone:
          type: string
        view:
          type: string
      required:
      - view
      - url_query
    Comments:
      properties:
        summary:
          $ref: '#/components/schemas/Summary'
      required:
      - summary
    SignedTokenDTO:
      properties:
        _id:
          type: string
        token:
          type: string
        url:
          type: string
      required:
      - _id
      - token
    WorkspaceCreateItem:
      properties:
        name:
          type: string
        is_default:
          type: boolean
        view_count:
          type: integer
          format: int32
        dashboard:
          type: object
        colors:
          type: object
        drawings:
          type: array
          items:
            $ref: '#/components/schemas/DrawingItem'
        chart:
          $ref: '#/components/schemas/ChartItem'
        template:
          $ref: '#/components/schemas/TemplateItem'
        type:
          type: string
        width:
          type: number
          format: double
        sort_order:
          type: number
          format: double
        policy:
          $ref: '#/components/schemas/PolicyItem'
      required:
      - name
      - policy
      - chart
    ACLItem:
      properties:
        grantee:
          type: string
        permission:
          type: string
      required:
      - grantee
      - permission
    WorkspaceUpdateItem:
      properties:
        name:
          type: string
        colors:
          type: object
        drawings:
          type: array
          items:
            $ref: '#/components/schemas/DrawingItem'
        chart:
          $ref: '#/components/schemas/ChartItem'
        template:
          $ref: '#/components/schemas/TemplateItem'
        width:
          type: number
          format: double
        sort_order:
          type: number
          format: double
        policy:
          $ref: '#/components/schemas/PolicyItem'
  securitySchemes:
    managementAPIToken:
      type: oauth2
      description: "Your Management API token must be added to the request _Authorization_ header using the following format:\n\n `Authorization: Bearer YOUR_MANAGEMENT_API_KEY`"
      flows:
        password:
          tokenUrl: https://api.moesif.com/v1/:orgId/oauth/access_tokens
          scopes:
            create:encrypted_keys: Create encrypted Keys for the Moesif secure proxy
            delete:dashboards: Delete existing dashboards
            update:dashboards: Update existing dashboards
            create:dashboards: Create a new team dashboard that can be shared
            read:public_workspaces: Read public workspaces/shared links
            read:virtual_eventtypes: Read existing virtual events/tags
            update:companies: Update existing companies and associated company metadata
            create:companies: Create new companies and associated company metadata
            create:reports: Create a new report such as SmartDiff
            delete:workspaces: Delete existing workspaces
            create:workspaces: Create a new workspace/chart that can be shared
            read:workspaces: Read existing workspaces
            update:virtual_eventtypes: Update existing virtual events/tags
            create:cohorts: Save new customer cohorts
            delete:encrypted_keys: Delete encrypted Keys for the Moesif secure proxy
            read:dashboards: Read existing dashboards
            read:events: Read/query events and associated event metadata
            create:events: Create new events and associated event metadata
            read:cohorts: Read previously saved customer cohorts
            read:encrypted_keys: Read encrypted Keys for the Moesif secure proxy
            update:apps: Update an existing application
            update:encrypted_keys: Update encrypted Keys for the Moesif secure proxy
            update:organizations: Update an existing application
            create:access_tokens: Create new tokens to access the Management API or Collector API
            create:users: Create new users and associated user metadata
            create:apps: Create a new application/project under the organization
            update:workspaces: Update existing workspaces
            delete:cohorts: Delete previously saved customer cohorts
            read:users: Read/query users and associated user metadata
            delete:virtual_eventtypes: Delete existing virtual events/tags
            read:reports: Read reports such as SmartDiff
            delete:reports: Delete existing reports such as SmartDiff
            update:users: Update existing users and associated user metadata
            update:cohorts: Update previously saved customer cohorts
            read:companies: Read/query companies and associated company metadata
            create:virtual_eventtypes: Create virtual events/tags
            delete:apps: Delete an existing application
            delete:companies: Delete existing companies and associated company metadata
            read:apps: Read the organization's applications
            create:eth_abi: Create/upload new Ethereum ABI Entries
            delete:users: Delete existing users and associated user metadata
externalDocs:
  description: Developer Docs
  url: https://moesif.com/docs