This documentation explains how standard Eagle API clients create credentials, request a session token, and make GraphQL requests against the main Eagle GraphQL endpoint.
The standard Eagle API uses client credentials to create a short-lived session token, which is then used to make GraphQL requests to the main API endpoint.
Integrators first create a client_id and client_secret in Eagle, then exchange those
credentials for a session token via the token endpoint, and finally use that token in the
Authorization header for GraphQL requests.
https://www.eagleagent.com.au/agent
/api/v3/token
/api/v3/graphql
Create API credentials in the Eagle application before requesting a session token.
https://www.eagleagent.com.au/agent and sign in.My Integration.
The /api/v3/token endpoint generates a session token that expires after 24 hours.
The Authorization header must contain the client ID, followed by a colon, followed by the client secret.
Example request using a sample client ID and client secret:
curl \
-X POST \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer 5889796789559:230408972308020237838' \
https://www.eagleagent.com.au/api/v3/token
{
"data": {
"token": {
"token": "eyJ0eXAfKV1QiLCJhbGciOiJIUzI1NiJ9....",
"expiresAt": 1582206763
}
}
}
After you receive a session token, use it in the Authorization header as
Bearer TOKEN when making requests to the GraphQL endpoint.
https://www.eagleagent.com.au/api/v3/graphql
https://api.eaglesoftware.com.au/v3/.
query GetProperties {
properties {
nodes {
id
formattedAddress
latitude
longitude
vendors {
contact {
firstName
lastName
}
}
}
}
}
The authorization header should be Bearer TOKEN, where TOKEN is the session token
returned by the token endpoint.
curl \
-X POST \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer eyJ0eXAfKV1QiLCJhbGciOiJIUzI1NiJ9....' \
--data '{
"query": "query GetProperties { properties { nodes { id formattedAddress latitude longitude vendors { contact { firstName lastName } } } } }"
}' \
https://www.eagleagent.com.au/api/v3/graphql
{
"data": {
"properties": {
"nodes": [
{
"id": "1",
"formattedAddress": "1366 May Locks, EUROA",
"latitude": 51.7247,
"longitude": 77.0944,
"vendors": []
},
{
"id": "3",
"formattedAddress": "4831 Konopelski Summit, EUROA",
"latitude": 59.8443,
"longitude": -20.4846,
"vendors": []
}
]
}
}
}
Authorization header as Bearer TOKEN.client_id and client_secret secure and do not expose them in frontend code.Main GraphQL schema explorer / reference page:
https://api.eaglesoftware.com.au/v3/
Main GraphQL request endpoint:
https://www.eagleagent.com.au/api/v3/graphql
Token endpoint: