Openwork Resources API

The Resources API from Openwork — 1 operation(s) for resources.

OpenAPI Specification

openwork-resources-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Den Admin Resources API
  description: 'OpenAPI spec for the Den control plane API.


    Authentication:

    - Use `Authorization: Bearer <session-token>` for user-authenticated routes that require a Den session.

    - Use `x-api-key: <den-api-key>` for API-key-authenticated routes that accept organization API keys.

    - Public routes like health and documentation do not require authentication.


    Swagger tip: use the security schemes in the Authorize dialog to set either `bearerAuth` or `denApiKey` before trying protected endpoints.'
  version: dev
servers:
- url: https://api.openworklabs.com
tags:
- name: Resources
paths:
  /v1/resources:
    get:
      operationId: getV1Resources
      tags:
      - Resources
      summary: Get accessible resource snapshot
      description: Returns IDs and update timestamps for cloud resources visible to the current organization member.
      responses:
        '200':
          description: Accessible resource snapshot returned successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceSnapshotResponse'
        '401':
          description: The caller must be signed in to list resources.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
components:
  schemas:
    UnauthorizedError:
      type: object
      properties:
        error:
          type: string
          const: unauthorized
      required:
      - error
    ResourceSnapshotResponse:
      type: object
      properties:
        organizationId:
          type: string
        orgMemberId:
          type: string
        teamIds:
          type: array
          items:
            type: string
        resources:
          type: object
          properties:
            llmProviders:
              type: object
              propertyNames:
                type: string
              additionalProperties:
                type: string
                format: date-time
                pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
            marketplaces:
              type: object
              propertyNames:
                type: string
              additionalProperties:
                type: object
                properties:
                  lastUpdatedAt:
                    type: string
                    format: date-time
                    pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                  plugins:
                    type: array
                    items:
                      type: object
                      properties:
                        pluginId:
                          type: string
                        lastUpdatedAt:
                          type: string
                          format: date-time
                          pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                        configItems:
                          type: array
                          items:
                            type: object
                            properties:
                              configItemId:
                                type: string
                              lastUpdatedAt:
                                type: string
                                format: date-time
                                pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                            required:
                            - configItemId
                            - lastUpdatedAt
                      required:
                      - pluginId
                      - lastUpdatedAt
                      - configItems
                required:
                - lastUpdatedAt
                - plugins
          required:
          - llmProviders
          - marketplaces
      required:
      - organizationId
      - orgMemberId
      - teamIds
      - resources
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: session-token
      description: 'Session token passed as `Authorization: Bearer <session-token>` for user-authenticated Den routes.'
    denApiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: Organization API key passed as the `x-api-key` header for API-key-authenticated Den routes.