Introduction
Sauron is the GraphQL API your application’s server will call to request the data you seek using the data key.Check out the GraphQL Schema Reference to see details on all Queries, Mutations, Types and their descriptions.
Sauron Helper Packages
We provide packages that makes it super easy to interact with the Sauron API. They completely abstract away the complexity of authentication and interacting with the GraphQL APIs.- Node.js
- Python
- Go
Read more about getActivity's parameters.
Read more about getActivity's parameters.
This is the key that gives you permission to access the user’s data. Read how to get one
here.
This is how you specify which service you want to retrieve activity from. This can be
NETFLIX
,
AMAZON
, PLAYSTATION
.The number of activity records to be retrieved (per page). The maximum per request is 300 records.
Read more about getTraits's parameters.
Read more about getTraits's parameters.
This is the key that gives you permission to access the user’s data. Read how to get one
here.
This is how you specify which service you want to retrieve traits from. This can be
UBER
,
AMAZON
, etc.The labels of the traits you want to retrieve traits from. This can be
RATING
, TRIP_COUNT
, PRIME_SUBSCRIBER
etcRoll Your Own
Every request to the Sauron API needs to be authenticated using yourprivateKey
. This is required to validate that the data request is truly coming from your application.
The packages above handle all of this authentication stuff automagically! You might want to consider using them
instead.
1
Prepare the signature
Start by creating a digital signature of your request’s body. You’ll need to hash the body of your request using
SHA-256 and then sign the hash with ECDSA using your
privateKey
.2
Encode the signature
After signing, encode the digital signature using Base64.
3
Add signature header
Add the Base64-encoded signature to the request’s headers with the key
X-Gandalf-Signature
.Securing your
privateKey
is extremely important. All requests to Sauron should be made server-side.Every Query or Mutation in the Sauron GraphQL API is accessible in the helper packages as a function/method. You can read about all
Queries, Mutations & Types in the Schema Reference.