Oneschema Importer Embeds API

Importer Embed operations

OpenAPI Specification

oneschema-importer-embeds-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: OneSchema AWS Secrets Manager AWS Secrets Manager Accounts Importer Embeds API
  version: '1'
  description: Configure AWS Secrets Manager account connections and managed secret references for use in Multi FileFeeds.
  contact:
    name: OneSchema Support
    email: support@oneschema.co
  termsOfService: https://www.oneschema.co/terms-and-conditions
  license:
    name: proprietary
    url: https://www.oneschema.co/terms-and-conditions
servers:
- url: https://api.oneschema.co
  description: Production server (hosted in the US)
- url: https://api.eu.oneschema.co
  description: Production server (hosted in the EU)
- url: https://api.ca.oneschema.co
  description: Production server (hosted in Canada)
- url: https://api.au.oneschema.co
  description: Production server (hosted in Australia)
security:
- ApiKeyAuth: []
tags:
- name: Importer Embeds
  description: Importer Embed operations
paths:
  /v1/embeds:
    get:
      operationId: get-embeds
      summary: List embeds
      description: Returns a list of Importer embed sessions for the organization in a summarized representation.
      parameters: []
      responses:
        '200':
          description: '200'
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/EmbedSummary'
        '422':
          description: '422'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/empty-response'
      tags:
      - Importer Embeds
  /v1/embeds/{embed_id}:
    delete:
      operationId: delete-embed
      summary: Delete an embed
      description: Deletes an embed from OneSchema.
      parameters:
      - $ref: '#/components/parameters/EmbedIdDestroyPath'
      responses:
        '200':
          description: '200'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeleteEmbedResponse'
        '400':
          description: '400'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/empty-response'
      tags:
      - Importer Embeds
    get:
      operationId: get-embed
      summary: Get embed
      description: Retrieve a detailed representation of the embed resource.
      parameters:
      - $ref: '#/components/parameters/EmbedIdPath'
      responses:
        '200':
          description: '200'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EmbedDetail'
        '422':
          description: '422'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/empty-response'
      tags:
      - Importer Embeds
  /v1/embeds/{embed_id}/error-summary:
    get:
      operationId: get-error-summary-for-an-embed-file
      summary: Get error summary for an embed file
      description: Retrieve an error summary for an embed file.
      parameters:
      - $ref: '#/components/parameters/EmbedIdPath'
      - name: row_filter
        in: query
        required: false
        description: Which rows should be included in the export.
        schema:
          type: string
          enum:
          - all
          - errors
        explode: false
      - name: file_format
        in: query
        required: true
        description: The type of file that should be generated with an error summary
        schema:
          type: string
          enum:
          - json
          - excel
        explode: false
      responses:
        '200':
          description: '200'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UrlResponse'
        '422':
          description: '422'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/empty-response'
      tags:
      - Importer Embeds
  /v1/embeds/{embed_id}/imported-file-url:
    get:
      operationId: get-imported-file-url-for-an-embed
      summary: Get imported file url for an embed
      description: Retrieve a URL linking to the imported csv file for an embed. The returned URL is valid for 15 minutes.
      parameters:
      - $ref: '#/components/parameters/EmbedIdPath'
      - name: row_filter
        in: query
        required: false
        description: Which rows should be included
        schema:
          type: string
          enum:
          - all
          - clean
          - errors
          default: all
        explode: false
      - name: file_format
        in: query
        required: false
        description: Format of exported file.
        schema:
          type: string
          enum:
          - csv
          default: csv
        explode: false
      responses:
        '200':
          description: '200'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UrlResponse'
        '422':
          description: '422'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/empty-response'
      tags:
      - Importer Embeds
  /v1/embeds/{embed_id}/imported-rows:
    get:
      operationId: get-imported-rows-for-embed
      summary: Get imported rows for an embed file
      description: Retrieve validated data from an embed file with optional pagination.
      parameters:
      - $ref: '#/components/parameters/EmbedIdPath'
      - name: start_row
        in: query
        required: false
        description: The (0-based) row index of the first row to include.
        schema:
          type: integer
          format: int32
          default: 0
        explode: false
      - name: count
        in: query
        required: false
        description: The number of rows to retrieve (default is all rows).
        schema:
          type: integer
          format: int32
        explode: false
      responses:
        '200':
          description: '200'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ImportedRowsResponse'
        '422':
          description: '422'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/empty-response'
      tags:
      - Importer Embeds
  /v1/embeds/{embed_id}/uploaded-file-url:
    get:
      operationId: get-uploaded-file-url-for-an-embed
      summary: Get uploaded file url for an embed
      description: Retrieve a URL linking to the uploaded file for an embed.  The returned URL is valid for 15 minutes.
      parameters:
      - $ref: '#/components/parameters/EmbedIdPath'
      responses:
        '200':
          description: '200'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UrlResponse'
        '400':
          description: '400'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/empty-response'
      tags:
      - Importer Embeds
components:
  schemas:
    SheetMetadata:
      type: object
      properties:
        original_file_name:
          type: string
          examples:
          - original-file.csv
    ImportedRowRecord:
      type: object
      properties:
        account_name:
          type: string
          examples:
          - Box
        first_name:
          type: string
          examples:
          - Aditi
        last_name:
          type: string
          examples:
          - Goel
        owner:
          type: string
          examples:
          - Akshay Goel
        lead_source:
          type: string
          examples:
          - website
        date_added:
          type: string
          examples:
          - 11/15/2020
        country_code:
          type: string
          examples:
          - US
        mailing_address:
          type: string
          examples:
          - 925 N Rossiter Blvd, Mount Dora, FL, 32757
        timezone:
          type: string
          examples:
          - America/New_York
        market_segment:
          type: string
          examples:
          - SMB
        title:
          type: string
          examples:
          - Information Systems Manager
        email_opt_out:
          type: string
          examples:
          - 'FALSE'
        primary_phone:
          type: string
          examples:
          - ''
        average_spend:
          type: string
          examples:
          - $7,937.18
    ImportedRowsResponse:
      type: object
      properties:
        template_key:
          type: string
          examples:
          - contacts
        workspace_id:
          type: integer
          examples:
          - 313174
          default: 0
        workspace_metadata:
          $ref: '#/components/schemas/empty-response'
        sheet_id:
          type: integer
          examples:
          - 88914
          default: 0
        sheet_metadata:
          $ref: '#/components/schemas/SheetMetadata'
        columns:
          type: array
          items:
            $ref: '#/components/schemas/ImportedRowsColumn'
        count:
          type: integer
          examples:
          - 995
          default: 0
        records:
          type: array
          items:
            $ref: '#/components/schemas/ImportedRowRecord'
        error_records:
          type: array
          items:
            $ref: '#/components/schemas/empty-response'
    EmbedDetail:
      type: object
      properties:
        columns:
          type: array
          items:
            $ref: '#/components/schemas/EmbedColumn'
      allOf:
      - $ref: '#/components/schemas/EmbedSummary'
    EmbedSummary:
      type: object
      properties:
        id:
          type: integer
          examples:
          - 41559
          default: 0
        token:
          type: string
          examples:
          - 5fd6a161-86f1-4514-9e92-0660e19ad5c2
        template_key:
          type: string
          examples:
          - employees
        status:
          type: string
          examples:
          - columns_mapped
        user_jwt:
          type: string
          examples:
          - REPLACE_WITH_JWT
        imported_row_count:
          type: integer
          description: Total number of imported rows. Only present when the embed status is "imported".
          examples:
          - 995
    DeleteEmbedResponse:
      type: object
      properties:
        success:
          type: boolean
    EmbedColumn:
      type: object
      properties:
        id:
          type: integer
          examples:
          - 227897
          default: 0
        name:
          type: string
          examples:
          - DD/MM/YYYY
        template_column_key:
          type: string
          examples:
          - ddmmyyyy
        is_custom:
          type: boolean
          examples:
          - false
          default: true
    empty-response:
      type: object
      properties: {}
    ImportedRowsColumn:
      type: object
      properties:
        sheet_column_name:
          type: string
          examples:
          - First Name
        template_column_name:
          type: string
          examples:
          - First Name
        template_column_key:
          type: string
          examples:
          - first_name
    UrlResponse:
      type: object
      required:
      - url
      properties:
        url:
          type: string
          examples:
          - https://my-bucket.s3.us-west-2.amazonaws.com
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY