MollyBox Admin API

The Admin API from MollyBox — 1 operation(s) for admin.

OpenAPI Specification

mollybox-admin-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Arcflow Admin API
  version: 0.1.0
tags:
- name: Admin
paths:
  /api/admin/import/resources:
    post:
      summary: Import Resources
      description: Import resource snapshots into the server.
      operationId: import_resources_api_admin_import_resources_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ImportResourcesRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ImportResourcesResult'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - HTTPBearer: []
      tags:
      - Admin
components:
  schemas:
    Resource:
      properties:
        id:
          type: string
          title: Id
        url:
          type: string
          title: Url
        canonical_url:
          type: string
          title: Canonical Url
        source_type:
          $ref: '#/components/schemas/SourceType'
          default: web
        status:
          $ref: '#/components/schemas/ResourceStatus'
          default: inbox
        title:
          anyOf:
          - type: string
          - type: 'null'
          title: Title
        domain:
          anyOf:
          - type: string
          - type: 'null'
          title: Domain
        capture_count:
          type: integer
          title: Capture Count
          default: 1
        metadata_status:
          $ref: '#/components/schemas/MetadataStatus'
          default: pending
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
        last_opened_at:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Last Opened At
      type: object
      required:
      - url
      - canonical_url
      title: Resource
      description: Core domain object representing a captured URL resource.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationError
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ImportResourcesRequest:
      properties:
        resources:
          items:
            $ref: '#/components/schemas/Resource'
          type: array
          title: Resources
      type: object
      title: ImportResourcesRequest
      description: API request body for importing resource snapshots.
    ImportResourcesResult:
      properties:
        created_count:
          type: integer
          title: Created Count
          default: 0
        merged_count:
          type: integer
          title: Merged Count
          default: 0
      type: object
      title: ImportResourcesResult
      description: Outcome summary for a resource import operation.
    MetadataStatus:
      type: string
      enum:
      - pending
      - fetched
      - failed
      title: MetadataStatus
      description: Metadata enrichment lifecycle for a resource.
    SourceType:
      type: string
      enum:
      - github
      - x
      - wechat
      - web
      title: SourceType
      description: Origin platform of a resource URL.
    ResourceStatus:
      type: string
      enum:
      - inbox
      - next
      - doing
      - done
      - archived
      title: ResourceStatus
      description: Learning status of a resource.
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer