Welcome to the PAIRS API reference. PAIRS is a geospatial big data service platform built by IBM research team. The PAIRS API is organized around the REST methodology and it uses resource-oriented URLs, and common HTTP response codes to indicate API errors. It uses JSON as the default encoding. Most of the methods you will find here are publicly available but there are some that will require you to be authenticated as a user in the platform

This Python package is automatically generated by the Swagger Codegen project:


Python 2.7 and 3.4+

Installation & Usage

pip install

If the python package is hosted on Github, you can install directly from Github

pip install git+

(you may need to run pip with root permission: sudo pip install git+

Then import the package:

import pairs_sdk 


Install via Setuptools.

python install --user

(or sudo python install to install the package for all users)

Then import the package:

import pairs_sdk

Getting Started

Please follow the installation procedure and then run the following:

from __future__ import print_function
import time
import pairs_sdk
from import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = pairs_sdk.ColorScaleApi()

    # Returns the list of available color scales
    api_response = api_instance.colorscales_get()
except ApiException as e:
    print("Exception when calling ColorScaleApi->colorscales_get: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to

Class Method HTTP request Description
ColorScaleApi colorscales_get GET /colorscales Returns the list of available color scales
DataSetApi datasets_dataset_id_datalayers_get GET /datasets/{datasetId}/datalayers Returns all data layers in a data set
DataSetApi datasets_dataset_id_get GET /datasets/{datasetId} Find data set by id
DataSetApi datasets_get GET /datasets Returns all available data sets
PolygonApi polygons_get GET /polygons Returns all polygons
PolygonApi polygons_polygon_id_geometry_get GET /polygons/{polygonId}/geometry Returns the geometry of the selected polygon
PolygonApi polygons_polygon_id_get GET /polygons/{polygonId} Returns a single polygon
QueryJobApi example_queryjobs_get GET /example-queryjobs Find and return all sample query jobs
QueryJobApi queryjobs_get GET /queryjobs Find all user query jobs
QueryJobApi queryjobs_post POST /queryjobs Submits a new query
QueryJobApi queryjobs_query_job_id_delete DELETE /queryjobs/{queryJobId} Delete query job by id
QueryJobApi queryjobs_query_job_id_get GET /queryjobs/{queryJobId} Find query job by id
QueryJobApi queryjobs_query_job_id_settings_put PUT /queryjobs/{queryJobId}/settings Changes the settings for a query job
QueryJobApi queryjobs_sizeestimation_post POST /queryjobs/sizeestimation Returns an estimation in bytes of the size of the query job
TimeSeriesApi timeseries_data_layer_id_get GET /timeseries/{dataLayerId} Returns a time series for a data layer
UserApi me_get GET /me Returns the current user
UserApi me_post POST /me Accepts the terms and conditions
UserApi users_login_get GET /users/login Authenticates a user with an 3rd party provider
UserApi users_login_post POST /users/login Authenticates a user with email and password
UserApi users_logout_post POST /users/logout Deauthenticates a user

Documentation For Models

Documentation For Authorization



Áxel Hernández Ferrera & Sergio Gutiérrez Mota