Skip to content

Commands Quick Reference

Fresh

API Endpoint

http://api-fulfill.dataexchange.us-east-1.amazonaws.com/v1

All requests are HTTP POST to this URL.


Required Headers

Every API request must include all five of these headers:

HeaderValue
Content-Typeapplication/graphql
x-api-keyYour API key
x-amzn-dataexchange-data-set-idYour data set ID
revision-idYour revision ID
asset-idYour asset ID

Authentication Environment Variables

bash
# AWS credentials
export AWS_ACCESS_KEY_ID=AKIAIOSFODNN7EXAMPLE
export AWS_SECRET_ACCESS_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
export AWS_DEFAULT_REGION=us-east-1

# IMDb API credentials
export IMDB_DATA_SET_ID=your-data-set-id
export IMDB_REVISION_ID=your-revision-id
export IMDB_ASSET_ID=your-asset-id
export IMDB_API_KEY=your-api-key

Windows (PowerShell):

powershell
$env:AWS_ACCESS_KEY_ID = "AKIAIOSFODNN7EXAMPLE"
$env:AWS_SECRET_ACCESS_KEY = "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"
$env:AWS_DEFAULT_REGION = "us-east-1"
$env:IMDB_DATA_SET_ID = "your-data-set-id"
$env:IMDB_REVISION_ID = "your-revision-id"
$env:IMDB_ASSET_ID = "your-asset-id"
$env:IMDB_API_KEY = "your-api-key"

AWS CLI Command

bash
aws dataexchange send-api-asset \
  --data-set-id "$IMDB_DATA_SET_ID" \
  --revision-id "$IMDB_REVISION_ID" \
  --asset-id "$IMDB_ASSET_ID" \
  --request-headers "{\"x-api-key\":\"$IMDB_API_KEY\",\"Content-Type\":\"application/graphql\"}" \
  --method "POST" \
  --path "/" \
  --body '{"query":"{ title(id: \"tt0068646\") { titleText { text } } }"}' \
  --region us-east-1

AWS Profile Setup

bash
aws configure --profile imdb-api
# Enter: Access Key ID, Secret Access Key, region (us-east-1), output format (json)

# Use the profile
export AWS_PROFILE=imdb-api

Install Commands

TypeScript

bash
npm init -y
npm install @aws-sdk/client-dataexchange
npm install --save-dev typescript ts-node @types/node

Python

bash
pip install boto3

Java (Maven)

Add to pom.xml:

xml
<dependencyManagement>
  <dependencies>
    <dependency>
      <groupId>software.amazon.awssdk</groupId>
      <artifactId>bom</artifactId>
      <version>2.16.60</version>
      <type>pom</type>
      <scope>import</scope>
    </dependency>
  </dependencies>
</dependencyManagement>
<dependencies>
  <dependency>
    <groupId>software.amazon.awssdk</groupId>
    <artifactId>auth</artifactId>
  </dependency>
  <dependency>
    <groupId>software.amazon.awssdk</groupId>
    <artifactId>apache-client</artifactId>
  </dependency>
</dependencies>

Run Commands

TypeScript

bash
npx ts-node imdb_api_request.ts

Python

bash
python imdb_api_request.py

Java

bash
mvn package
java -jar target/imdb-api-client-1.0-SNAPSHOT.jar

RAG Setup (Documentation Chat)

After building the VitePress site, run this once to create the vector store:

bash
OPENAI_API_KEY=your-openai-key npm run setup-rag

Then add the returned OPENAI_VECTOR_STORE_ID to your Vercel environment variables.


Build and Deploy

bash
# Install dependencies
npm install

# Development server
npm run dev

# Production build
npm run build

# Preview production build locally
npm run preview

IMDb API Documentation — Internal Reference