Maturity

Under development, prod and dev API
Under development, dev API only
Deprecated

Overview

The Netograph API uses JSON as its core data format - all requests to and all all responses from the API are JSON. All API requests are authenticated with an API Key, which should be sent with each request in the x-api-key header. You can create as many keys as you need in the account admin interface. All requests must be made over https - requests over HTTP will fail, and result in a 301 redirect response.

Errors

We use standard HTTP status codes to indicate errors. Responses in the 2xx range indicate success, responses in the 4xx range indicate that there was an issue with the request, and responses in the 5xx range indicate an error on our side.

The JSON response for an API error will include a message attribute that gives a human-readable reason for the error, for example:

{
    "message": "Montly request limit exceeded."
}

Scaling and rate limiting

Netograph scales up to meet demand. Adding a large number of captures to the queue simultaneously can cause significant load, especially for services that process data after notification on a callback URL. A good rule of thumb is to add captures to the queue at about the same rate that you can consume the resulting data.

Example

#!/usr/bin/env python3
import requests

URI = "https://netograph.io/api/queue"
APIKEY = "MYKEY"
data = {
    "urls": ["https://www.google.com", "https://twitter.com"],
    "id": "myid",
    "notification": "http://requestb.in/XXXXX"
}
headers = {"x-api-key": APIKEY}
print(requests.post(URI, headers=headers, json=data).json())