All Collections
API
API Ingestion Guide for AppEQ
API Ingestion Guide for AppEQ

A step-by-step guide to API Ingestion

Mano avatar
Written by Mano
Updated over a week ago

This API ingestion guide will walk you through the steps of ingesting data into AppEQ, from your Database platform itself. This guide includes two Segments (Authentication &Methods of application), One for the Team Admin and the other for the team of Developers.

Authentication

Obtaining Code for Authentication: Here, the Team Admin has an important role to play in obtaining the unique Token code, which will be used later in the API ingestion process.

The following steps will show you how to carry this out

Step 1: Log into your AppEQ Account, you can do so by clicking here

Step 2: Click on "Data Source" which is under the "Data settings" options on the menu on menu to the left of your screen

Step 3: Click on the connect button towards the top right of your screen

Step 4: Click on the API Ingestion option (AppEQ Logo)

Step 5: Write the Business object and proceed to click on Next


( Business Object is the purpose or the way how you are using the app. It defines how the data will be treated. For example, the salesforce can have three business objects- accounts, opportunities, and contacts.)

Step 6: Copy the instructions that are provided that is provided

Step 7: Once you are in possession of the instructions, along with the unique code you will have to hand it over to the Developer's team

Methods

Applying Authentication: This segment is for the Developer team, who will be making use of the unique token code obtained in the Authentication segment to Complete the API Ingestion.
โ€‹
There are two main ways to go about it

Single API Method:

1. Use the following details to perform a single upload:

- Request Method: `POST`

CURL

curl  -X POST \
'https://api1.appeq.ai/ingest-data/single' \
--header 'Accept: */*' \
--header 'Content-Type: application/json' \
--data-raw '{
"business_object_name": "product Usage",
"token": "jg3LKar2kvzs3JVpvuWwz4vono8",
"account_domain": "tesla.com",
"account_id":"1",
"data": {
"Id": 1,
"domain": "tesla.com",
"health": "green"
}
}

NodeJS

import axios from 'axios';

const response = await axios.post(
'https://api1.appeq.ai/ingest-data/single',

{
'business_object_name': 'Product Usage',
'token': 'jg3LKar2kvzs3JVpvuWwz4vono8',
'account_domain': 'tesla.com',
'account_id': '1',
'data': {
'Id': 1,
'domain': 'tesla.com',
'health': 'green'
}
},
{
headers: {
'Accept': '*/*',
'Content-Type': 'application/json'
}
}
);

Python

import requests

headers = {
'Accept': '*/*',
'Content-Type': 'application/json',
}

json_data = {
'business_object_name': 'Product Usage',
'token': 'jg3LKar2kvzs3JVpvuWwz4vono8',
'account_domain': 'tesla.com',
'account_id': '1',
'data': {
'Id': 1,
'domain': 'tesla.com',
'health': 'green',
},
}

response = requests.post('https://api1.appeq.ai/ingest-data/single', headers=headers, json=json_data)

*Product Usage, refers to the business object, which was entered in Step 5

2. Replace "token"` field in the payload with the token obtained by the admin, which has been passed to you from.

3. Customize the payload by providing the relevant data for the account you want to upload.

Bulk API Method:

1. Use the following details to perform a bulk upload:

- Request Method: `POST`

CURL

curl  -X POST \
'https://api1.appeq.ai/ingest-data/bulk' \
--header 'Accept: */*' \
--header 'Content-Type: application/json' \
--data-raw '{
"business_object_name": "Product Usage",
"token": "jg3LKar2kvzs3JVpvuWwz4vomb8",
"account_domain_key_name": "domain",
"account_id_key_name": "Id",
"data": [
{
"Id": 1,
"domain":"bmw.com",
"health":"red"
},
{
"Id": 2,
"domain":"appeq.com",
"health":"green"
}
]
}'

NodeJS

import axios from 'axios';

const response = await axios.post(
'https://api1.appeq.ai/ingest-data/bulk',
{
'business_object_name': 'Product Usage',
'token': 'jg3LKar2kvzs3JVpvuWwz4vomb8',
'account_domain_key_name': 'domain',
'account_id_key_name': 'Id',
'data': [
{
'Id': 1,
'domain': 'bmw.com',
'health': 'red'
},
{
'Id': 2,
'domain': 'appeq.com',
'health': 'green'
}
]
},
{
headers: {
'Accept': '*/*',
'Content-Type': 'application/json'
}
}
);

Python

import requests

headers = {
'Accept': '*/*',
'Content-Type': 'application/json',
}

json_data = {
'business_object_name': 'Product Usage',
'token': 'jg3LKar2kvzs3JVpvuWwz4vomb8',
'account_domain_key_name': 'domain',
'account_id_key_name': 'Id',
'data': [
{
'Id': 1,
'domain': 'bmw.com',
'health': 'red',
},
{
'Id': 2,
'domain': 'appeq.com',
'health': 'green',
},
],
}

response = requests.post('https://api1.appeq.ai/ingest-data/bulk', headers=headers, json=json_data)

*Product Usage, refers to the business object, which was entered in Step 5

2. Replace `"token"` with the token obtained by the admin, which has been passed to you .

3. Customize the payload by providing the relevant data for each account you want to upload. You can include multiple account objects within the `"data"` array.

Note:-

If you want to ingest data which is not accounts data then you can simply leave the

"account_domain_key_name" and "account_id_key_name"field empty as below:

curl  -X POST \
'https://api1.appeq.ai/ingest-data/bulk' \
--header 'Accept: */*' \
--header 'Content-Type: application/json' \
--data-raw '{
"business_object_name": "productuseage",
"token": "jg3LKar2kvzs3JVpvuWwz4vomo8",
"account_domain_key_name": "",
"account_id_key_name": "",
"data": [
{
"name": "abc",
"emp":"10",
"health":"red"
},
{
"name": "def",
"emp":"40",
"health":"green"
}
]
}'

By following these steps, you can effortlessly ingest data into AppEQ via API. These methods provide flexibility for uploading single or bulk data, depending on your requirements.

If you have any questions or need further assistance during the API ingestion process, our support team is here to help. We aim to empower you with the tools and knowledge needed to succeed with AppEQ!

Remember, by integrating your data with AppEQ, you can unlock valuable insights and drive customer success like never before.

Did this answer your question?