The API lives at /api/v1/. The format used is JSON.

Collections

ISPs

Parameters
Name Value Description
page int Page number
per_page int Number of items per page
range int,int Range to return, in the format offset,value
Output

This resource returns an array of ISP objects.

Sample output

When using pagination (default) :

{
    "total_items": 3, 
    "page": 1, 
    "num_pages": 1, 
    "per_page": 10, 
    "isps": [
        /* list of ISP objects */
    ]
}

When providing a range parameter :

{
    "total_items": 3, 
    "range": "0,1", 
    "isps": [
        /* list of ISP objects */
    ]
}
Status code

This resource can return the following status codes: 400, 500.

Output

This resource returns an ISP object or an ObjectNotFound error.

Status code

This resource can return the following status codes: 404, 400, 500.

Parameters
Name Value Description
page int Page number
per_page int Number of items per page
range int,int Range to return, in the format offset,value
Output

This resource returns an array of CoveredArea objects belonging to a given ISP. Note that the CoveredArea objects don't have an "isp" attribute since we assume the client will have retrieved informations about the ISP beforehand.

Status code

This resource can return the following status codes: 404, 400, 500.

Output

This resource returns a list of all ISP Format URLs in database.

Status code

This resource can return the following status codes: 500.


Covered Areas : Areas covered by ISPs

Parameters
Name Value Description
page int Page number
per_page int Number of items per page
range int,int Range to return, in the format offset,value
Output

This resource returns an array of CoveredArea objects.

Sample output

When using pagination (default) :

{
    "total_items": 3, 
    "page": 1, 
    "num_pages": 1, 
    "per_page": 10, 
    "covered_areas": [
        /* list of CoveredArea objects */
    ]
}

When providing a range parameter :

{
    "total_items": 3, 
    "range": "0,1", 
    "covered_areas": [
        /* list of CoveredArea objects */
    ]
}
Status code

This resource can return the following status codes: 404, 400, 500.

Output

This resource returns a CoveredArea object or an ObjectNotFound error.

Status code

This resource can return the following status codes: 404, 400, 500.

Objects

ISP

{
    "id": "int",
    "is_ffdn_member": "bool",
    "json_url": "string:url",
    "date_added": "string:ISO8601 datetime",
    "last_update": "string:ISO8601 datetime",
    "ispformat": "object:ISP Format"
}

CoveredArea

{
    "id": "int",
    "isp": {
        "id": "int",
        "name": "string",
        "shortname": "string|null"
    },
    "name": "string",
    "geojson": "object:GeoJSON"
}

Errors

A typical error response looks like this:

{
    "error": {
        "message": "There was an error while processing your request", 
        "error_type": "ispdb.api.InternalError"
    }
}

Message is an informative message regarding the error, error_type is an optionnal field containing the error class, which can give machine-readable informations about the error.

For now, the following error class are defined:

Error class Status code Description
ispdb.api.ObjectNotFound 404 Could not find the item matching the criterias you specified
ispdb.api.BadInput 400 Invalid input
ispdb.api.InternalError 500 Internal server error