Login to Pulse

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

Test Your API Key

CURL

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"

Python

import requests

# 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")

if token:
    # 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")

Ruby

require 'net/http'
require 'uri'
require 'json'

# Login to get the token
login_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 = true

login_headers = {
  "Accept" => "application/json",
  "Content-Type" => "application/json"
}
login_payload = { key: "PULSE_xxxxxxxxxxxx" }.to_json

login_request = Net::HTTP::Post.new(login_uri.request_uri, login_headers)
login_request.body = login_payload

login_response = login_http.request(login_request)
login_data = JSON.parse(login_response.body)
token = login_data.dig("meta", "token")

if token
  # Use the token to call the /api/v3/iam/accounts/me endpoint
  me_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)
  puts me_response.body
else
  puts "Error retrieving token"
end

Node

This example is using axios package

const axios = require('axios');

(async () => {
  try {
    // Login to get the token
    const loginResponse = await axios.post(
      'https://pulse.ingedata.ai/api/v3/iam/auth/api/login',
      {
        key: 'PULSE_xxxxxxxxxxxx'
      },
      {
        headers: {
          'Accept': 'application/json',
          'Content-Type': 'application/json'
        }
      }
    );

    const token = loginResponse.data.meta.token;

    // Use the token to call the /api/v3/iam/accounts/me endpoint
    const meResponse = await axios.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.