Fieldwire S3 Tokens API

Short-lived signed AWS POST tokens for direct-to-S3 uploads.

OpenAPI Specification

fieldwire-s3-tokens-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Fieldwire Account Actual Costs S3 Tokens API
  description: 'Account-scoped (super) endpoints used to authenticate, exchange the long-lived

    API key (refresh token) for a short-lived JWT access token, and manage

    account-level users, roles, attachments, data types, custom stamps, account

    form templates, and project transfers. All requests target the global super

    host: `https://client-api.super.fieldwire.com`. Project-scoped reads/writes

    use the regional Projects API (`client-api.us.fieldwire.com` or

    `client-api.eu.fieldwire.com`).

    '
  version: v3.1
  contact:
    name: Fieldwire Developer Support
    url: https://developers.fieldwire.com/
  license:
    name: Fieldwire Terms of Service
    url: https://www.fieldwire.com/terms/
servers:
- url: https://client-api.super.fieldwire.com
  description: Global Super Host
security:
- BearerAuth: []
tags:
- name: S3 Tokens
  description: Short-lived signed AWS POST tokens for direct-to-S3 uploads.
paths:
  /projects/{project_id}/aws_post_tokens:
    post:
      operationId: addAwsPostTokens
      summary: Get AWS POST Token For Upload
      description: 'Request a one-day signed AWS POST token that the client uses to upload

        the binary directly to Amazon S3. The token contains the post URL,

        policy, and form fields required for the S3 `POST object` operation;

        clients then add a `file` form field and POST to AWS directly.

        '
      tags:
      - S3 Tokens
      parameters:
      - $ref: '#/components/parameters/ProjectId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - filename
              - content_type
              properties:
                filename:
                  type: string
                content_type:
                  type: string
                  example: image/jpeg
                size:
                  type: integer
                  format: int64
      responses:
        '200':
          description: Signed POST token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AwsPostToken'
components:
  schemas:
    AwsPostToken:
      type: object
      properties:
        id:
          type: integer
          format: int64
        post_address:
          type: string
          format: uri
          description: AWS S3 endpoint to POST to.
        fields:
          type: object
          additionalProperties:
            type: string
          description: Form fields (key, policy, signature, etc.) required by S3.
        expires_at:
          type: string
          format: date-time
  parameters:
    ProjectId:
      name: project_id
      in: path
      required: true
      schema:
        type: integer
        format: int64
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: 'Send the short-lived access token returned by `POST /api_keys/jwt` as

        `Authorization: Bearer <access_token>`. Also include the

        `Fieldwire-Version` request header and `Content-Type: application/json`.

        '