Structify source API

The source API from Structify — 3 operation(s) for source.

OpenAPI Specification

structify-source-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  contact:
    email: team@structify.ai
    name: Structify Team
  description: Every enterprise's data team.
  license:
    name: Discuss directly with founders for license.
    url: https://structify.ai
  title: Structify account source API
  version: 0.1.0
servers:
- description: Production server
  url: https://api.structify.ai
- description: Local server
  url: http://localhost:8080
security:
- api_key: []
- session_token: []
tags:
- name: source
paths:
  /source/entity:
    delete:
      operationId: delete_source_entity
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeleteSourceEntityParams'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeleteSourceEntityResponse'
          description: Source entity deleted successfully
        '400':
          description: Bad request
        '404':
          description: Source entity not found
      tags:
      - source
  /source/get_sources:
    get:
      operationId: source_get_sources
      parameters:
      - description: Entity ID to get sources for
        in: query
        name: id
        required: true
        schema:
          $ref: '#/components/schemas/EntityId'
      - description: Optional property name to filter sources by
        in: query
        name: property
        required: false
        schema:
          nullable: true
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/Source'
                type: array
          description: Source Information
      summary: Get all sources for a given entity
      tags:
      - source
  /source/relationship:
    delete:
      operationId: delete_source_relationship
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeleteSourceRelationshipParams'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeleteSourceRelationshipResponse'
          description: Source relationship deleted successfully
        '400':
          description: Bad request
        '404':
          description: Source relationship not found
      tags:
      - source
components:
  schemas:
    DeleteSourceRelationshipParams:
      additionalProperties: false
      properties:
        source_relationship_id:
          $ref: '#/components/schemas/SourceRelationshipId'
      required:
      - source_relationship_id
      type: object
    SourceId:
      format: uuid
      type: string
    SourceLocation:
      oneOf:
      - properties:
          Text:
            properties:
              byte_offset:
                minimum: 0
                type: integer
            required:
            - byte_offset
            type: object
        required:
        - Text
        type: object
      - properties:
          Visual:
            properties:
              x:
                minimum: 0
                type: integer
              y:
                minimum: 0
                type: integer
            required:
            - x
            - y
            type: object
        required:
        - Visual
        type: object
      - properties:
          Page:
            properties:
              page_number:
                format: int32
                minimum: 0
                type: integer
            required:
            - page_number
            type: object
        required:
        - Page
        type: object
    Source:
      properties:
        created_at:
          format: date-time
          type: string
        id:
          $ref: '#/components/schemas/SourceId'
        is_summary:
          type: boolean
        link:
          allOf:
          - $ref: '#/components/schemas/SourceLink'
          nullable: true
        location:
          allOf:
          - $ref: '#/components/schemas/SourceLocation'
          nullable: true
        scraper_id:
          allOf:
          - $ref: '#/components/schemas/ScraperId'
          nullable: true
        user_specified:
          type: boolean
      required:
      - id
      - user_specified
      - is_summary
      - created_at
      type: object
    DeleteSourceEntityResponse:
      properties:
        message:
          description: Optional message about the deletion
          type: string
        success:
          description: Whether the deletion was successful
          type: boolean
      required:
      - success
      - message
      type: object
    EntityId:
      format: uuid
      type: string
    SourceEntityId:
      format: uuid
      type: string
    SourceLink:
      oneOf:
      - properties:
          Web:
            properties:
              url:
                type: string
            required:
            - url
            type: object
        required:
        - Web
        type: object
      - properties:
          Document:
            properties:
              name:
                type: string
            required:
            - name
            type: object
        required:
        - Document
        type: object
      - properties:
          SecFiling:
            properties:
              accession_number:
                type: string
              cik_number:
                type: string
            required:
            - accession_number
            - cik_number
            type: object
        required:
        - SecFiling
        type: object
    DeleteSourceEntityParams:
      additionalProperties: false
      properties:
        source_entity_id:
          $ref: '#/components/schemas/SourceEntityId'
      required:
      - source_entity_id
      type: object
    ScraperId:
      format: uuid
      type: string
    SourceRelationshipId:
      format: uuid
      type: string
    DeleteSourceRelationshipResponse:
      properties:
        message:
          description: Optional message about the deletion
          type: string
        success:
          description: Whether the deletion was successful
          type: boolean
      required:
      - success
      - message
      type: object
  securitySchemes:
    api_key:
      in: header
      name: api_key
      type: apiKey
    session_token:
      scheme: bearer
      type: http