Walkthrough for Streaming Insert

This walkthrough guides you through the steps for loading records using the Streaming API.
Before you can start, make sure you’ve completed the prerequisites required to set up your Ingestion API:
  • Setup Ingestion API connector
  • Create and Deploy Data Stream
  • Configure connected app
  1. Create a collection of JSON objects that matches the schema of the source objects you defined as part of your data stream. Wrap the collection in a data envelope. The payload must be less than 200 KB. For example, orders.json:
  2. Request a Customer Data Platform access token. The access_token property in the token exchange response contains the bearer token to use for the authorization header. The instance_url is the Customer Data Platform instance where the API is hosted.
  3. Use the Synchronous Record Validation method and validate that your ingestion request is configured correctly. Requests that fail validation aren’t processed into the data lake. If the request fails validation, the API returns a report indicating which records are problematic and why. Fix the request based on the validation feedback and resubmit until you received a status code in the 200 s from the API.
  4. After you’re confident the integration is properly configured, upload your JSON data via the Streaming API. You should receive a 202 Accepted response indicating your data has been accepted for processing.