🔐API

The Rasgo API is available to all Rasgo customers on Enterprise plans and above.

API State & Philosophy

The Rasgo API is still in a beta phase. We reserve the right to change endpoints names and contracts. Please check documentation for changes if your previous calls stop working.

Rasgo does not maintain strict RESTful endpoints. We offer functional endpoints for convenience, to supplement or automate customer interactions with their Rasgo metadata.

How to get your API key

Enterprise users can copy their API key from the Rasgo WebApp. Navigate to your "User Profile" menu and select "API Key". This will copy the key to your clipboard.

Your API key is unique and personal to you. It will grant access to your data. Rasgo recommends that you DO NOT share it or save it to public repos/sites.

How to call API endpoints

Rasgo is not opinionated about how our endpoints are called. Supplied for convenience, here are code snippets for 3 common programming languages:

Python

import requests

api_key = "..."
endpoint = "..."
contract = {"key": "value", }

response = requests.post(
    f"https://api.rasgoml.com/{endpoint}",
    json=contract,
    headers={
        "accept": "application/json",
        "Content-Type": "application/json",
        "Authorization": f"Bearer {api_key}",
        "Rasgo-Client": "API"
    },
    params={}
)
response.json()

Javascript

const apiKey = '...';
const endpoint = '...';
const method = 'POST';
const payload = { /*...*/ };

const resp = await fetch(endpoint, {
  method,
  headers: {
    'Content-Type': 'application/json',
    Authorization: `Bearer ${apiKey}`
  },
  body: JSON.stringify(payload)
});

const data = await resp.json();

curl

curl -X 'POST' \
  'http://api.rasgoml.com/{endpoint}' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer {api_key}' \
  -H 'Content-Type: application/json' \
  -d '{contract}'

Last updated