This is the REST API for LimaCharlie.io. See https://docs.limacharlie.io/v1/docs/platform-management-api-keys for additional authentication information.

Getting a JWT

Simply issue an HTTP POST such as:

curl -X POST "https://jwt.limacharlie.io" -H "Content-Type: application/x-www-form-urlencoded" -d "oid=<YOUR_OID>&secret=<YOUR_API_KEY>"

where the oid parameter is the organization id as found through the web interface and the secret parameter is the API key.

If you need a JWT that is specific to a single org, you can pass the   oid  parameter as specified. If you need a JWT that is not specific to a single org, you can pass -  as the oid  parameter.

The return value is a simple JSON response with a jwt component which is the JSON web token. This token is only valid for one hour to limit the possible damage of a leak, and make the deletion of the API keys easier.

Response:

{ "jwt": "<JWT_VALUE_HERE>" }

Python Example


import requests 
import json 


# Step 1 - Generate a JWT

def generate_jwt():
    api_key = $LIMACHARLIE_API_KEY
    uid = $LIMACHARLIE_UID

    url = "https://jwt.limacharlie.io?uid=%s&secret=%s&oid=-" % (uid, api_key)

    try:
        r = requests.get(url)
        jwt = r.json()["jwt"]
        return jwt

    except:
        return None


# Step 2 - Make an API request

def create_org(loc, name):
    url = "https://api.limacharlie.io/v1/orgs/new"

    headers = {
        "Content-Type": "application/json",
        "Authorization": "Bearer %s" % (generate_jwt()),
    }

    params = {"loc": loc, "name": name}

    response = requests.request("POST", url, headers=headers, params=params)

    return json.loads(response.text)



ContactLicense

 info@limacharlie.io 
 Apache 2.0 
 http://www.apache.org/licenses/LICENSE-2.0.html 

Servers
 https://api.limacharlie.io/v1 

 Terms of Service