Quickstart
This quickstart assumes your platform team has already given you a Cognito domain, app client id, and any client secret required for your integration.
1. Choose the environment
Section titled “1. Choose the environment”Use the docs site for the same environment you are calling. The examples below are rewritten during deployment so the API and Cognito URLs match the environment serving the docs.
2. Get a token
Section titled “2. Get a token”Machine-to-machine integrations usually use Cognito’s client credentials grant. Request only the scopes your integration needs.
TOKEN="$( curl -s -X POST "https://streamline-staging-streamline-auth.auth.ap-southeast-2.amazoncognito.com/oauth2/token" \ -H "Content-Type: application/x-www-form-urlencoded" \ -d "grant_type=client_credentials" \ -d "client_id=<app-client-id>" \ -d "client_secret=<app-client-secret>" \ -d "scope=streamline/read_models streamline/run_inference" \ | jq -r .access_token)"Human users sign in with their Cognito username and password using the user-pool
app client provided by your platform team. Their access token includes groups
such as admin or client:{client_id}. Send that access token to PIE as a
bearer token.
Authorization: Bearer <access_token>3. Check liveness
Section titled “3. Check liveness”GET /v2/health is public and does not require a token.
curl "https://staging-pie.streamline.enterprises/v2/health"4. Call a protected route
Section titled “4. Call a protected route”List models to confirm your token has access to the API.
curl "https://staging-pie.streamline.enterprises/v2/models" \ -H "Authorization: Bearer ${TOKEN}"If this returns 401, the token is missing, expired, or rejected. If it returns
403, the token is valid but does not grant the permission required by the
operation.
5. Use concepts before workflows
Section titled “5. Use concepts before workflows”Before wiring a production flow, read: