Log in to your dashboard by visiting pulse.ingedata.ai. If you don’t have an account,
contact your account manager.
Create an API Key
Go to Profile > API Keys.
Click Create API Key, name it, and confirm.
Set permissions (refer to the documentation for details).
Copy and store your API Key securely. It will start with PULSE_ followed by a hexadecimal string.
Test Your API Key
CURL
Python
Ruby
Node
You can use curl and jq to fetch your token and verify that you can access the platform:
PULSE_API_TOKEN=$(curl -X POST "https://pulse.ingedata.ai/api/v3/iam/auth/api/login"\-H"accept: application/json"-H"Content-Type: application/json"\-d"{ \"key\": \"PULSE_xxxxxxxxxxxx\"}" | jq -r .meta.token)
curl -X GET "https://pulse.ingedata.ai/api/v3/iam/accounts/me"-H"Authorization: Bearer $PULSE_API_TOKEN"
importrequests# Login to get the token
login_url="https://pulse.ingedata.ai/api/v3/iam/auth/api/login"login_headers={"Accept":"application/json","Content-Type":"application/json"}login_payload={"key":"PULSE_xxxxxxxxxxxx"}login_response=requests.post(login_url,json=login_payload,headers=login_headers)login_data=login_response.json()# Extract the token from the response JSON
token=login_data.get("meta",{}).get("token")iftoken:# Use the token to call the /api/v3/iam/accounts/me endpoint
me_url="https://pulse.ingedata.ai/api/v3/iam/accounts/me"me_headers={"Authorization":f"Bearer {token}"}me_response=requests.get(me_url,headers=me_headers)print(me_response.json())else:print("Error retrieving token")
require'net/http'require'uri'require'json'# Login to get the tokenlogin_uri=URI.parse("https://pulse.ingedata.ai/api/v3/iam/auth/api/login")login_http=Net::HTTP.new(login_uri.host,login_uri.port)login_http.use_ssl=truelogin_headers={"Accept"=>"application/json","Content-Type"=>"application/json"}login_payload={key: "PULSE_xxxxxxxxxxxx"}.to_jsonlogin_request=Net::HTTP::Post.new(login_uri.request_uri,login_headers)login_request.body=login_payloadlogin_response=login_http.request(login_request)login_data=JSON.parse(login_response.body)token=login_data.dig("meta","token")iftoken# Use the token to call the /api/v3/iam/accounts/me endpointme_uri=URI.parse("https://pulse.ingedata.ai/api/v3/iam/accounts/me")me_request=Net::HTTP::Get.new(me_uri.request_uri)me_request["Authorization"]="Bearer #{token}"me_response=login_http.request(me_request)putsme_response.bodyelseputs"Error retrieving token"end
This example is using axios package
constaxios=require('axios');(async ()=>{try{// Login to get the tokenconstloginResponse=awaitaxios.post('https://pulse.ingedata.ai/api/v3/iam/auth/api/login',{key:'PULSE_xxxxxxxxxxxx'},{headers:{'Accept':'application/json','Content-Type':'application/json'}});consttoken=loginResponse.data.meta.token;// Use the token to call the /api/v3/iam/accounts/me endpointconstmeResponse=awaitaxios.get('https://pulse.ingedata.ai/api/v3/iam/accounts/me',{headers:{'Authorization':`Bearer ${token}`}});console.log(meResponse.data);}catch (error){console.error('Error:',error.response?error.response.data:error.message);}})();
This will return your account details if the key is valid.
Token expiration
The token generated by the login action is valid an hour. Once expired, you will need to generate a new token.