Preconditions for API Ingestion

Programming environment with the following variables:

  • {{token}} and {{secret}} of your Piazza account
  • {{file-base}} is the base URL for ‘Asset Locker’ API calls: https://file-api.oneflowcloud.com
  • {{piazza-base}} is the base URL for ‘Piazza’ API calls: https://product-api.oneflowcloud.com
  • {{assets-base}} is the base path for adding new file assets to Piazza:  /Piazza/Assets
  • In this guide, Postman is used as an example vehicle. The same procedures can be achieved via any programming language that supports REST-API calls.
  • Before executing requests, a corresponding pre-request script can be run to generate any required variables for the request headers.
    • For example, most API calls require the following calculated headers:
      • x-oneflow-date: {{timestamp}}
      • x-oneflow-authorization: {{hmacHeader}}
  • Standard request headers are not repeatedly mentioned and are assumed to be handled per need. Examples:
    1. Host             <calculated before request is sent>
    2. Accept            */*
    3. Accept-Encoding        gzip, deflate, br
    4. Connection            keep-alive
    5. Content-Type        application/pdf
    6. Content-Length        <calculated before request is sent>