NAV
curl

Introduction

REST Principles

The Trimble Data Marketplace API largely follows REST principles. Resources are manipulated using the HTTP verbs GET/POST/PUT/DELETE. In many cases these are used to retrieve, create, update, and delete resources, respectively. Additionally, some behaviors will use PUT to invoke a very specific action (e.g. ordering a job) on a resource.

Resource representations will include relevant URLs to take further actions with that resource. For instance, the representation of a job will include the URL used to access the downloads API needed to retrieve files.

Due to our mechanism for referring to URLs by name, it is possible that the URLs associated with an action may change. API clients should not cache URLs retrieved in documents for more than 24 hours to ensure that the their URLs are still valid.

Response Format

The API calls can be executed to return either XML or JSON responses. To identify the format of the data being requested set the "Content-Type" header in your requests to "application/xml" or "application/json".

In most cases, the content of XML and JSON responses are the same. Differences will be noted when they are present. In general, XML responses will use hyphens between multiple words (Example: data-created-on), while JSON responses use underscores (Example: data_created_on).

Documentation Conventions

In examples, variables or other locations for user-specific data will be wrapped with: ${}. For example "${dataset_token}" would indicate the place in a string where a dataset token should be substituted.

Curl

Example Curl Commands

#__XML__:
curl -3 -u ${uname}:${pwd} -H 'Content-Type: application/xml' http://${hostname}/datasets/${token}.weo

#__JSON__:
curl -3 -u ${uname}:${pwd} -H 'Content-Type: application/json' http://${hostname}/datasets/${token}.json

The examples in this documentation are written using curl.

Successful curl requests will return an XML-formatted or JSON-formatted response and a 200 status code. In case of request failure, appropriate error information is returned with the HTTP status code.

Note: For sake of brevity and clarity, we only use JSON API requests in our documentation.

Curl request details:

URL Templates

#Example:
# This url can be used to display a dataset, where the id is either the dataset's token or its permalink.
http://market.weogeo.com/datasets/${id}.html

In many cases you will already have the unique identifier for a resource that you want to interact with. Rather than forcing you to retrieve the relevant document for that resource, the API provides url templates that can be used to construct URLs for interacting with the resource. These always include ${id} in the URL. Client programs should programmatically replace that text with the relevant identifier.

Authentication

#credentials are supplied to curl as:

-u {uname}:{pwd}

#where the user's credentials replace "{uname}" and  "{pwd}".

Basic HTTP Authentication is currently supported. Authentication is not maintained across requests. Credentials need to be included with each request.

Login credentials are typically not required for searching the Marketplace or viewing dataset records. In cases where credentials are not required, this will be reflected in the example request.

Search

The Search API is provides a method for searching through datasets.

The Search API is intended for data exploration rather than for direct interaction with datasets. It provides a limited view of a dataset record, which helps to preserve the Search focus of the API as well as cutting down on the total size of results, which reduces bandwidth requirements and increases performance. The List Datasets API provides search functionality and returns the complete dataset records.

Since the primary goal of the Search API is to expose a query interface to datasets, it is exposed as a search-only interface. It provides an aggregate search of datasets, with additional information to assist in narrowing down results.

Facets

An example of the structure of an individual facet:

    {
    "id": "data_type",
    "name": "Data Type",
    "values": [
        {
            "id": "RASTER",
            "name": "Raster",
            "count": 37289
        },
        {
            "id": "VECTOR",
            "name": "Vector",
            "count": 3578
       },
       {
            "id": "OTHER",
            "name": "Other",
            "count": 23
       }
    ]
    }

Search features are exposed to the Search API through facets. Facets are a combined mechanism for filtering a search query and informing the user of the effects of their filtering actions.

Facets are composed of a topic (generally referred to as “the facet”) and a set of values. Facet values represent possible filtering options for searching. Multiple facets topics can be combined in a single search query, but within a facet topic, only one facet value can be searched (eg. can search by file_format and data_type but within data_type, you cannot search for both raster and vector data).

Search Datasets

Request

#Search query limiting results to the specific geographic area and raster listings in geotiff format.

curl -3 -X GET -H 'Content-Type: application/json' http://market.weogeo.com/search.json?north=41.48000107647043&south=38.013713187598555&west=-107.19058183593499&east=-102.7850642578048&page=1&per_page=20&file_format=GeoTIFF&data_type=RASTER

Response

{
    "items": [{
        "price_type": "FIXED",
        "min_price": 0.0,
        "max_price": 0.0,
        "lowest_price": 0.0,
        "highest_price": 0.0,
        "name": "Landsat 8: LC80340322014263LGN00",
        "token": "abfcaf5a-20c0-4dbe-8c94-90a70ed63996",
        "description": "<p>Landsat 8 carries two instruments: ... </p>",
        "tag_list": ["cloudCover 0.26,cloudCoverClass LTE 5"],
        "north": 41.402256005,
        "south": 39.2395752466,
        "east": -104.374274613,
        "west": -107.1695976636,
        ...
    },
    {
        "price_type": "FIXED",
        "min_price": 0.0,
        "max_price": 0.0,
        "lowest_price": 0.0,
        "highest_price": 0.0,
        "name": "Landsat 8: LC80340322014183LGN00",
        "token": "0982fd6c-dc2f-4aee-99a8-1445900d7509",
        "description": "<p>Landsat 8 carries two instruments: ...</p>",
        "tag_list": ["cloudCover 2.89,cloudCoverClass LTE 5"],
        "north": 41.4022599373,
        "south": 39.2395371922,
        "east": -104.3813909681,
        "west": -107.1767682876,
        ...
    },
    {
        "price_type": "FIXED",
        "min_price": 0.0,
        "max_price": 0.0,
        "lowest_price": 0.0,
        "highest_price": 0.0,
        "name": "Landsat 8: LC80340322014183LGN00",
        "token": "3fc12587-f760-4ff7-ab75-b5e64c472fea",
        "description": "<p>Landsat 8 carries two instruments: ...</p>",
        "tag_list": ["cloudCover 2.89,cloudCoverClass LTE 5"],
        "north": 41.4022599373,
        "south": 39.2395371922,
        "east": -104.3813909681,
        "west": -107.1767682876,
        ...
    },
    ...
],
    "current_page": 1,
    "per_page": 20,
    "total_entries": 1388,
    "total_pages": 70,
    "facets": [{
        "id": "file_format",
        "name": "File Format",
        "values": [{
            "id": "GeoTIFF",
            "name": "GeoTIFF",
            "count": 1388
        },
        ...
        {
            "id": "ESRI Shapefile",
            "name": "ESRI Shapefile",
            "count": 0
        }]
    },
    {
        "id": "projection",
        "name": "Projection",
        "values": [{
            "id": "utm",
            "name": "UTM",
            "count": 1077
        },
        ...
        {
            "id": "geo",
            "name": "Lat/Long",
            "count": 24
        }]
    },
    {
        "id": "organization",
        "name": "Popular Providers",
        "values": [{
            "id": "USGS DRG/Topo",
            "name": "USGS DRG/Topo",
            "count": 1082
        },
        ...
        {
            "id": "Intermap Technologies",
            "name": "Intermap Technologies",
            "count": 4
        }]
    },
    {
        "id": "file_size_mb",
        "name": "File Size",
        "values": [{
            "id": "0MB-10MB",
            "name": "0MB-10MB",
            "count": 906
        },
        ...
        {
            "id": "50GB+",
            "name": "50GB+",
            "count": 4
        }]
    },
    {
        "id": "price",
        "name": "Price (USD)",
        "values": [{
            "id": "Free",
            "name": "Free",
            "count": 1384
        },
        ...
        {
            "id": "$5,000.00+",
            "name": "$5,000.00+",
            "count": 4
        }]
    }]
}

There are two types of search parameters, general parameters and search facets. The values of search facets are limited to a finite list while general parameters are unrestricted.

All search parameters are optional. A search with no parameters will return all datasets in our system.

General Search Parameters

Parameter Description
per_page Optional Number of results shown per page (default is 15)
page Optional Page number to display
north Optional Northern bound of search area
south Optional Southern bound of search area
east Optional Eastern bound of search area
west Optional Western bound of search area
query Optional Keyword(s) to include in search

Search Facets

Parameter Description
file_format Optional Native file format of the data listing
data_type Optional Data Type
datum Optional Native datum of the data listing
projection Optional Native projection of the data listing
file_size_mb Optional File Size (in MB)
organization Optional Organization or provider of the data listing
price Optional Price range of the listing (a listing can be in more than one price range)

Response

Datasets

The datasets API allows you to search for and get information about datasets.

List Datasets

Retrieve a list of datasets matching your query parameters. If you are looking for an API to provide user-facing functionality to query datasets, see our Search API. The Search API is intended for data exploration while the List Datasets API is designed to facilitate direct interaction with datasets

Request

#This will retrieve the first 15 vector datasets that intersect the specified region of interest.

curl -3 -X GET -H 'Content-Type: application/json' 'https://market.weogeo.com/datasets.json?page=1&per_page=3&east=-120&north=40&south=35&west=-121&data_type=VECTOR'

Response:

{
    "items": [{
        "data_type": "VECTOR",
        "name": "OpenStreetMap: Fresno, CA Metro Region",
        "permalink": "osm-openstreetmap-fresno-ca-metro-region",
        "tile_file_format": "png",
        "tile_layer_type": "xyz",
        "token": "5e843f35-bca2-4e56-86ef-a6b935ecd02d",
        "ancestors_price": 0.0,
        "children_count": 0,
        "data_created_on": "2015/01/26",
        "data_category": "VECTOR",
        "file_format": "PostgreSQL",
        ...
    },
    {
        "data_type": "VECTOR",
        "name": "TIGER/Line - Merced County, California (2013)",
        "permalink": "tiger_merced_county_california",
        "tile_file_format": "png",
        "tile_layer_type": "xyz",
        "token": "302ddb87-6748-cd59-a73f-9c4d375e12d3",
        "ancestors_price": 0.0,
        "children_count": 0,
        "data_created_on": null,
        "data_category": "VECTOR",
        "file_format": "PostgreSQL",
        "is_library_transfer": false,
        "large_job_size_threshold": null,
        "layers": ["All Lines",
        "Area Hydrography",
        "Block",
        "Block Group",
        "Census Tract",
        "County Subdivision",
        "Linear Hydrography",
        "Roads"],
        "market": "ALL_MARKETS",
        "parents_count": 0,
        "spatial_resolution_in_meters": 0.0,
        "palette": false,
        "status": "Approved",
        "uploaded_at": "2011/04/14 17:56:00 +0000",
        "description": "<p>TIGER/Line is a format used by the United States Census Bureau to describe land...</p>",
        "center_lat": 37.1868725,
        "center_long": -120.650351,
        "projection": "GEO",
        "spatial_resolution": 0,
        ...
    },
    {
        "data_type": "VECTOR",
        "name": "USGS Contours: Fresno, CA Metro Region",
        "permalink": "open-usgs-contours-fresno-ca-metro-region",
        "tile_file_format": "png",
        "tile_layer_type": "xyz",
        "token": "4002f2f2-7845-44db-aeb0-de71a8eb7353",
        "ancestors_price": 0.0,
        "children_count": 0,
        "data_created_on": null,
        "data_category": "VECTOR",
        "file_format": "PostgreSQL",
        "is_library_transfer": false,
        "large_job_size_threshold": 1,
        "layers": ["Layer_1"],
        "market": "ALL_MARKETS",
        "parents_count": 0,
        "spatial_resolution_in_meters": 0.0,
        "palette": false,
        "status": "Approved",
        "uploaded_at": "2013/09/2023: 32: 16+0000",
        "description": "",
        "center_lat": 36.74652099609375,
        "center_long": -119.6397399902344,
        "projection": "GEO",
        "spatial_resolution": 0,
        ...
    }],
    "current_page": 1,
    "per_page": 3,
    "total_entries":90,
    "total_pages": 30
}

HTTP Request

GET /datasets.json

Parameter Description
page Optional Page number to display, default is 1
per_page Optional Number of results shown per page (default and maximum is 15)
north Optional Northern bound of search area (in Geographic WGS84)
south Optional Southern bound of search area (in Geographic WGS84)
east Optional Eastern bound of search area (in Geographic WGS84)
west Optional Western bound of search area (in Geographic WGS84)
query Optional Keyword(s) to include in search
price_min Optional the minimum price for the dataset
price_max Optional the maximum price for the dataset
date_from Optional the oldest date of dataset creation, format: yyyy-mm-dd (data-created-on in the dataset record)
date_to Optional the newest date of dataset creation, format: yyyy-mm-dd (data-created-on in the dataset record)
data_type Optional the desired data type (either “RASTER”, “VECTOR”, or “OTHER”). This parameber is case-sensitive. Values must be in CAPS.
tags Optional space delimited array of tags to match against

Response

Get Dataset

Request:

curl -3 -X GET -H 'Content-Type: application/json' https://market.weogeo.com/datasets/abfcaf5a-20c0-4dbe-8c94-90a70ed63996.json

Response:

{
    "dataset": {
        "data_type": "RASTER",
        "name": "Landsat 8: LC80340322014263LGN00",
        "permalink": "landsat-landsat-8-lc80340322014263lgn00",
        "tile_file_format": "jpg",
        "tile_layer_type": "xyz",
        "token": "abfcaf5a-20c0-4dbe-8c94-90a70ed63996",
        "ancestors_price": 0.0,
        "children_count": 0,
        "data_created_on": "2014/09/20",
        "data_category": "RASTER",
        "file_format": "GeoTIFF",
        "is_library_transfer": false,
        "large_job_size_threshold": null,
        "layers": ["Band 1 - Coastal Aerosol",
        "Band 2 - Blue",
        "Band 3 - Green",
        "Band 4 - Red",
        "Band 5 - Near Infrared (NIR)",
        "Band 6 - SWIR 1",
        "Band 7 - SWIR 2",
        "Band 8 - Panchromatic",
        "Band 9 - Cirrus",
        "Band 10 - Thermal Infrared (TIRS)",
        "Band 11 - Thermal Infrared (TIRS)",
        "Level 1 QA Band File"],
        "market": "ALL_MARKETS",
        "parents_count": 0,
        "spatial_resolution_in_meters": 0.0,
        "palette": false,
        "status": "Approved",
        "uploaded_at": "2014/11/25 20:30:38 +0000",
        ...
}

Obtains the full dataset record for the specified dataset.

HTTP Request

GET /datasets/${token}.json

Response

Get Dataset as KML

Request:

curl -3 -X GET -H 'Content-Type: application/xml' https://market.weogeo.com/datasets/abfcaf5a-20c0-4dbe-8c94-90a70ed63996.kml

Response:

<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:atom="http://www.w3.org/2005/Atom" xsi:schemaLocation="http://earth.google.com/kml/2.2   http://schemas.opengis.net/kml/2.2.0/ogckml22.xsd">
  <Document>
    <name>Landsat 8: LC80340322014263LGN00</name>
    <atom:author>
      <atom:name>WeoGeo, Inc.</atom:name>
    </atom:author>
    <atom:link rel="related" href="http://www.WeoGeo.com"/>
    ....
  </Document>
</kml>

Retrieve the content of the preview KML for the dataset specified by the supplied token.

HTTP Request

GET /datasets/${token}.kml

Response

Jobs

Jobs are individual requests for data. The Jobs API allows you to create, modify, order, and download jobs.

Creating and Ordering Jobs

There are two mechanisms for ordering data.

  1. Order Job API: order a single job without adding it to a cart.
  2. Order Cart API: order any number of jobs in a single event by adding jobs to a cart

Shopping Cart Orders

The shopping cart is used to order multiple pieces of data in one checkout event. Jobs that are put in the shopping cart become available through shopping cart specific apis and checkout workflows.

Create a Job

Request:

curl -3 -u demouser:demopwd -X POST -H 'Content-Type: application/json' -d '{"job":{"geometry": "{\"type\":\"Feature\",\"crs\":{\"type\":\"name\",\"properties\":{\"name\":\"EPSG:4326\"}},\"geometry\":{\"type\":\"Polygon\",\"coordinates\":[[[-105.72758,38.88908],[-105.72758,40.081],[-104.21696,40.081],[-104.21696,38.88908],[-105.72758,38.88908]]]}}","note": "this is an example note.","dataset_token": "50fc881c-79dc-855e-a272-1d19710cf52c","content_license_acceptance": true,"cart": true,"parameters": {"job_geocrop": "Spatial_Selection","job_datum_projection": "EPSG:4269","job_file_format": "SHAPE","job_layers": "Block;Block Group;Census Tract"}}}' https://market.weogeo.com/jobs.json

Response:

{
    "job": {
        "token": "3315b589-4ed4-4422-b97a-6f351dc1917f",
        "job_number": "j103667",
        "total": 0.0,
        "dataset_name": "TIGER/Line 2013: State Based Files - COLORADO",
        "note": "this is a note. denver metro area.",
        "submitted_for_processing_at": null,
        "processing_started_at": null,
        "created_at": "2015/02/09 21:56:08 +0000",
        "completed_at": null,
        "fulfilled_at": null,
        "token_expires_at": "2015/02/13 21:56:08 +0000",
        "download_expires_at": "2065/01/27 21:56:08 +0000",
        "seat_option_id": null,
        "dataset_permalink": "tiger_line_colorado_state_based_files",
        "dataset_provider": "TIGER",
        "dataset_token": "50fc881c-79dc-855e-a272-1d19710cf52c",
        "status": "In Cart",
        "content_license_acceptance": true,
        "content_license_id": 1,
        "job_transaction_id": null,
        "library_id": null,
        "order_id": null,
        "subsidy_transaction_id": null,
        "market": true,
        "cart": true,
        "royalty_model": "CREDITED",
        ....
        "geometry": "{\"type\":\"Feature\",\"crs\":{\"type\":\"name\",\"properties\":{\"name\":\"EPSG:4326\"}},\"geometry\":{\"type\":\"Polygon\",\"coordinates\":[[[-105.72758406835,38.889080953125],[-105.72758406835,40.081097554687],[-104.21696395117,40.081097554687],[-104.21696395117,38.889080953125],[-105.72758406835,38.889080953125]]]}}"
    }
}

Creates a new job for the currently authenticated user.

HTTP Request

POST /jobs.json

Parameter Description
dataset_token Required The token for the dataset this job will be run against
content_license_agreement Required Indicates that the user agrees to abide by the dataset’s content license. Must be set to true before the job can be created.
note Optional A note about the job visible to the user.
cart Optional Indicates that the job should be placed in the user’s shopping cart. To place the job in the cart set to true
parameters Required Set of options used to customize the job. The options available and allowed values vary between datasets. The options available for dataset can be found in the dataset record.
geometry Optional A GeoJSON Feature describing the area to be clipped from the data. Only valid when the job_geo_crop parameter is not Off. See Job Geometry for details.
webhook Optional Sets a URL that will be notified of job status changes. Each time a job’s status is modified, a copy of the Job API output (View Job Details) will be sent to the URL.


The following job customization options are set with the parameter tag. The customization options available for a dataset can be found in the dataset record. No customization options are allowed for General Geo-Content (when data_type is OTHER).

Parameter Description
job_datum_projection Required The desired output datum/projection. This can be specified by EPSG code or as a named value included in the job_parameters tag of the dataset’s record. If an unknown coordinate system is supplied, the job will error during processing.
job_file_format Required The output file format desired
job_geo_crop Required The type of cropping desired (common values: “Off” (full extents), “Clip” (Raster data only. Cuts cleanly along the selection boundary), “Spatial_Selection” (vector data only. Selects all features that intersect the selection area.)
job_layers Required The subset of desired layers out of all the dataset layers available, semicolon delimited. Required if the dataset has a layers value.
job_spatial_resolution Optional The desired spatial resolution of the data. Only available for raster data. The value “1” specifies native resolution (and thus best) and “4” is about 16 times less detailed.

Response

Job Geometry

If the job_geo_crop value for a job is set to value other than “Off”, the selection geometry for the job must be provided through the job’s geometry attribute.

The geometry parameter is a GeoJSON Feature describing the area to be clipped from the data. It must adhere to the following restrictions:

Update a job

Request:

curl -3 -u demouser:demopwd -X PUT -H 'Content-Type: application/json' -d '{"job":"note": "this is an updated note.",{"parameters": {"job_layers": "Block;Block Group;Census Tract;County;County Subdivision"}}}' https://market.weogeo.com/jobs/0c31ed1c-2083-4e18-b05b-c92b5b765447.json   

Response:

Status: 204 No Content

Updates an existing job with details supplied in a request.

HTTP Request

PUT /jobs/${job_token}.json

Parameter Description
job_token Required Unique identifier of the job to be modified.
note Optional A note about the job visible to the user.
cart Optional Indicates that the job should be placed in the user’s shopping cart. To place the job in the cart set to true
parameters Optional Set of options used to customize the job. The options available and allowed values vary between datasets. The options available for dataset can be found in the dataset record.
geometry Optional A GeoJSON Feature describing the area to be clipped from the data. This is only valid when the job_geo_crop parameter is not set to Off. See Job Geometry for details.
webhook Optional Sets a URL that will be notified of job status changes. Each time a job’s status is modified, a copy of the Job API output (View Job Details) will be sent to the URL.


The following job customization options are set with the parameter tag:

Parameter Description
job_datum_projection Optional The output datum/projection desired
job_file_format Optional The output file format desired
job_geo_crop Optional The type of cropping desired
job_layers Optional The subset of desired layers out of all the dataset layers available, semicolon delimited
job_spatial_resolution Optional The spatial resolution desired. Only available for raster data.

Response

Delete a job

Request:

curl -3 -u demouser:demopwd -X DELETE -H 'Content-Type: application/json' https://market.weogeo.com/jobs/0c31ed1c-2083-4e18-b05b-c92b5b765447d.json

Response:

Status: 204 No Content

Remove a job from the system. This call is only valid for jobs that have not been submitted in an order - those with a status of Not Processed or In Cart.

HTTP Request

DELETE /jobs/${job_token}.json

Parameter Description
job_token Required Unique identifier of the job to be deleted

Response

Order a Job

Request:

curl -3 -u demouser:demopwd -X POST -H 'Content-Type: application/json' -d '{"order": {"payment_method_id": null}}' https://market.weogeo.com/jobs/16a87b9c-5666-6357-af42-eb3a048cc3f2/process_job.json

Response:

Status: 200 OK

Orders the specified job. The following describes how to order free datasets. If you wish to use the API to order paid data, please contact us as support@trimbledata.com.

HTTP Request

PUT /jobs/${job_token}/process_job.json

Parameter Description
job_token Required Unique identifier of the job to be ordered
payment_method_id Required Identifier of the payment method to be used if the job has a cost. For free datasets, set as null.

Response

Order Jobs in Cart

Request:

curl -3 -u demouser:demopwd -X POST -H 'Content-Type: application/json' -d '{"order": {"payment_method_id": null}}' https://market.weogeo.com/jobs/process_cart.json

Response:

Status: 200 OK

Orders the jobs in the shopping cart of the currently authenticated user. The following describes how to order free datasets. If you wish to use the API to order paid data, please contact us as support@trimbledata.com.

HTTP Request

PUT /jobs/process_cart.json

Parameter Description
payment_method_id Required Identifier of the payment method to be used if the job has a cost. For free datasets, set as null.

Response

Download Job Files

Request

curl -3 -u demouser:demopwd -X GET -H 'Content-Type: application/json' https://market.weogeo.com/jobs/3315b589-4ed4-4422-b97a-6f351dc1917f/download.json

Response

[{
    "name": "weogeo_j103667.zip",
    "file_size": 47141663,
    "md5": "84f062eeeb39a55bae26a8f3f3c8d621",
    "url": "https://s3.amazonaws.com/weojobs.weogeo.com/3315b589-4ed4-4422-b97a-6f351dc1917f/weogeo_j103667.zip?AWSAccessKeyId=AKIAIAIIVPQALORAVGZQ\u0026Expires=1423870548\u0026Signature=cKKeesQ2MAhN8DSAlfVG43Wb3vw%3D",
    "compressed": true
}]

Get the URLs to download the specified job. The job must be associated with the account of the authenticated user.

HTTP Request

GET /jobs/${job_token}/download.json

Parameter Description
job_token Required Unique identifier of the job to be downloaded.

Response

Parameter Description
compressed Describes if the job file is compressed.
md5 A md5 checksum of this file (or part of the file). This should be used to ensure that individual files are downloaded correctly.
name The name that should be given to the file after download.
url The location where this file is available for download.
file_size The size of the job file in bytes

Get Job Price

Request:

curl -3 -u demouser:demopwd -X POST -H 'Content-Type: application/json' -d '{"job":{"dataset_token": "cd3b2c09-aba7-43c8-b417-57fde3331510","geometry": "{\"type\":\"Feature\",\"crs\":{\"type\":\"name\",\"properties\":{\"name\":\"EPSG:3857\"}},\"geometry\":{\"type\":\"Polygon\",\"coordinates\":[[[-11694138.090722,4828296.7477302],[-11683742.655053,4829526.0588111],[-11684545.243836,4821156.2043571],[-11693641.250046,4820926.8932761],[-11694138.090722,4828296.7477302]]]}}","layers": ["Layer_1"]}}' https://market.weogeo.com/jobs/price.json

Response:

{
    "job_price": {
        "price": "$0.00",
        "estimated_data_size": 50577596.30803353,
        "human_estimated_data_size": "48.2 MB",
        "no_data": false,
        "requires_offline_fulfillment": false,
        "offline_fulfillment_supported": false,
        "too_much_data": false,
        "data_service": null,
        "with_data_service": null,
        ...
    }
}

Determine the price of of a job without creating the job.

HTTP Request

POST /jobs/price

Parameter Description
dataset_token Required Token of the dataset
layers Optional Layers selected for the job. Required if the listing has layers.
geometry Optional A GeoJSON Feature describing the area to be clipped from the data. See Job Geometry for details.
parameters Required Set of options used to customize the job. The options available and allowed values vary between datasets. The options available for dataset can be found in the dataset record.

The following job customization options are set with the parameter tag:

Parameter Description
job_datum_projection Optional Datum and projection for the order. If this parameter is not specified, assumed to be default.
job_file_format Optional File format for the order.
job_spatial_resolution Optional Selected spatial resolution for the order.
job_geocrop Optional Geocrop option for the job.

Response

View Job Details

Request:

curl -3 -u demouser:demopwd -X GET -H 'Content-Type: application/json' http://market.weogeo.com/jobs/bdc3326b-dd4a-47f3-ae82-7c6ffc0bf5ad.json

Response:

{
    "job": {
        "token": "bdc3326b-dd4a-47f3-ae82-7c6ffc0bf5ad",
        "job_number": "j103685",
        "total": 0.0,
        "dataset_name": "TIGER/Line 2013: State Based Files - COLORADO",
        "note": "this is a note. denver metro area.",
        "submitted_for_processing_at": "2015/02/09 23:01:18 +0000",
        "processing_started_at": "2015/02/09 23:01:18 +0000",
        "created_at": "2015/02/09 22:44:44 +0000",
        "completed_at": null,
        "fulfilled_at": "2015/02/09 23:04:22 +0000",
        "token_expires_at": "2015/02/13 22:44:44 +0000",
        "download_expires_at": "2065/01/27 22:44:44 +0000",
        "seat_option_id": null,
        "dataset_permalink": "tiger_line_colorado_state_based_files",
        "dataset_provider": "TIGER",
        "dataset_thumbnail": "https://dby46mpjv9zj4.cloudfront.net/50fc881c-79dc-855e-a272-1d19710cf52c/thumbnail/thumbnail.png",
        "dataset_token": "50fc881c-79dc-855e-a272-1d19710cf52c",
        "status": "Ready for Download",
        "content_license_acceptance": true,
        "content_license_id": 1,
        "job_transaction_id": null,
        "library_id": null,
        "order_id": 64826,
        "subsidy_transaction_id": null,
        "market": true,
        "cart": false,
        "royalty_model": null,
        ...
        "geometry": "{\"type\":\"Feature\",\"crs\":{\"type\":\"name\",\"properties\":{\"name\":\"EPSG:4326\"}},\"geometry\":{\"type\":\"Polygon\",\"coordinates\":[[[-105.72758406835,38.889080953125],[-105.72758406835,40.081097554687],[-104.21696395117,40.081097554687],[-104.21696395117,38.889080953125],[-105.72758406835,38.889080953125]]]}}"
    }
}

Returns the job record for the supplied token.

HTTP Request

GET /jobs/${job_token}.json

URL Parameters

Parameter Description
job_token Required The identifier of the job.

Response

List Jobs in Cart

Request:

curl -3 -u demouser:demopwd -X GET -H 'Content-Type: application/json' https://market.weogeo.com/jobs/show_cart.json

Response:

{
    "cart": {
        "jobs": [{
            "token": "fad832eb-cce9-41c9-a7d6-daa0c2818b56",
            "job_number": "j104213",
            "total": 0.0,
            "dataset_name": "TIGER/Line 2013: State Based Files - COLORADO",
            "note": "this is a note. denver metro area.",
            "submitted_for_processing_at": null,
            "processing_started_at": null,
            "created_at": "2015/02/12 23:09:49 +0000",
            "completed_at": null,
            "fulfilled_at": null,
            "token_expires_at": "2015/02/16 23:09:49 +0000",
            "download_expires_at": "2065/01/30 23:09:49 +0000",
            "seat_option_id": null,
            "dataset_permalink": "tiger_line_colorado_state_based_files",
            "dataset_provider": "TIGER",
            "dataset_thumbnail": "https://dby46mpjv9zj4.cloudfront.net/50fc881c-79dc-855e-a272-1d19710cf52c/thumbnail/thumbnail.png",
            "dataset_token": "50fc881c-79dc-855e-a272-1d19710cf52c",
            "status": "In Cart",
            "content_license_acceptance": true,
            "content_license_id": 1,
            "job_transaction_id": null,
            "library_id": null,
            "order_id": null,
            "subsidy_transaction_id": null,
            "market": true,
            "cart": true,
            "royalty_model": null,
            ...
            "geometry": "{\"type\":\"Feature\",\"crs\":{\"type\":\"name\",\"properties\":{\"name\":\"EPSG:4326\"}},\"geometry\":{\"type\":\"Polygon\",\"coordinates\":[[[-105.72758,38.88908],[-105.72758,40.081],[-104.21696,40.081],[-104.21696,38.88908],[-105.72758,38.88908]]]}}",
            "job_edit_url": "https://market.weogeo.com/datasets/tiger_line_colorado_state_based_files?job_id=fad832eb-cce9-41c9-a7d6-daa0c2818b56"
        },
        {
            "token": "f3f1e720-aa52-49c6-ae21-f767447d4fe7",
            "job_number": "j104216",
            "total": 0.0,
            "dataset_name": "OpenStreetMap Planet",
            "note": "this is an example note.",
            "submitted_for_processing_at": null,
            "processing_started_at": null,
            "created_at": "2015/02/12 23:18:46 +0000",
            "completed_at": null,
            "fulfilled_at": null,
            "token_expires_at": "2015/02/16 23:18:45 +0000",
            "download_expires_at": "2065/01/30 23:18:46 +0000",
            "seat_option_id": null,
            "dataset_permalink": "osm-openstreetmap-planet",
            "dataset_provider": "OpenStreetMap",
            "dataset_thumbnail": "https://dby46mpjv9zj4.cloudfront.net/e0dd1ef6-df94-4e7f-a95f-f48327ba3467/thumbnail/thumbnail.png",
            "dataset_token": "e0dd1ef6-df94-4e7f-a95f-f48327ba3467",
            "status": "In Cart",
            "content_license_acceptance": true,
            "content_license_id": 133,
            "job_transaction_id": null,
            "library_id": null,
            "order_id": null,
            "subsidy_transaction_id": null,
            "market": true,
            "cart": true,
            "royalty_model": null,
            ...
            "geometry": "{\"type\":\"Feature\",\"crs\":{\"type\":\"name\",\"properties\":{\"name\":\"EPSG:4326\"}},\"geometry\":{\"type\":\"Polygon\",\"coordinates\":[[[-105.72758,38.88908],[-105.72758,40.081],[-104.21696,40.081],[-104.21696,38.88908],[-105.72758,38.88908]]]}}",
            "job_edit_url": "https://market.weogeo.com/datasets/osm-openstreetmap-planet?job_id=f3f1e720-aa52-49c6-ae21-f767447d4fe7"
        }],
        "total": 0.0,
        "display_total": "$0.00"
    }
}

Displays the jobs in the shopping cart of the currently authenticated user.

HTTP Request

GET /jobs/show_cart.json

Response

Get Ordered Jobs

Request:

curl -3 -u demouser:demopwd -X GET -H 'Content-Type: application/json' http://market.weogeo.com/jobs.json?page=1&per_page=3&date_range=current_week

Response:

{
    "items": [{
        "token": "f3f1e720-aa52-49c6-ae21-f767447d4fe7",
        "job_number": "j104216",
        "total": 0.0,
        "dataset_name": "OpenStreetMap Planet",
        "note": "this is an example note.",
        "submitted_for_processing_at": null,
        "processing_started_at": null,
        "created_at": "2015/02/12 23:18:46 +0000",
        "completed_at": null,
        "fulfilled_at": null,
        "token_expires_at": "2015/02/16 23:18:45 +0000",
        "download_expires_at": "2065/01/30 23:18:46 +0000",
        "seat_option_id": null,
        "dataset_permalink": "osm-openstreetmap-planet",
        "dataset_provider": "OpenStreetMap",
        "dataset_thumbnail": "https://dby46mpjv9zj4.cloudfront.net/e0dd1ef6-df94-4e7f-a95f-f48327ba3467/thumbnail/thumbnail.png",
        "dataset_token": "e0dd1ef6-df94-4e7f-a95f-f48327ba3467",
        "status": "In Cart",
        "content_license_acceptance": true,
        "content_license_id": 133,
        "job_transaction_id": null,
        "library_id": null,
        "order_id": null,
        "subsidy_transaction_id": null,
        "market": true,
        "cart": true,
        "royalty_model": null,
        ...
        "geometry": "{\"type\":\"Feature\",\"crs\":{\"type\":\"name\",\"properties\":{\"name\":\"EPSG:4326\"}},\"geometry\":{\"type\":\"Polygon\",\"coordinates\":[[[-105.72758,38.88908],[-105.72758,40.081],[-104.21696,40.081],[-104.21696,38.88908],[-105.72758,38.88908]]]}}"
    },
    {
        "token": "c05576ff-79ac-41d3-a629-3677be69f516",
        "job_number": "j104214",
        "total": 0.0,
        "dataset_name": "TIGER/Line 2013: State Based Files - COLORADO",
        "note": "this is an example note.",
        "submitted_for_processing_at": null,
        "processing_started_at": null,
        "created_at": "2015/02/12 23:12:35 +0000",
        "completed_at": null,
        "fulfilled_at": null,
        "token_expires_at": "2015/02/16 23:12:35 +0000",
        "download_expires_at": "2065/01/30 23:12:35 +0000",
        "seat_option_id": null,
        "dataset_permalink": "tiger_line_colorado_state_based_files",
        "dataset_provider": "TIGER",
        "dataset_thumbnail": "https://dby46mpjv9zj4.cloudfront.net/50fc881c-79dc-855e-a272-1d19710cf52c/thumbnail/thumbnail.png",
        "dataset_token": "50fc881c-79dc-855e-a272-1d19710cf52c",
        "status": "In Cart",
        "content_license_acceptance": true,
        "content_license_id": 1,
        "job_transaction_id": null,
        "library_id": null,
        "order_id": null,
        "subsidy_transaction_id": null,
        "market": true,
        "cart": true,
        "royalty_model": null,
        ...
        "geometry": "{\"type\":\"Feature\",\"crs\":{\"type\":\"name\",\"properties\":{\"name\":\"EPSG:4326\"}},\"geometry\":{\"type\":\"Polygon\",\"coordinates\":[[[-105.72758,38.88908],[-105.72758,40.081],[-104.21696,40.081],[-104.21696,38.88908],[-105.72758,38.88908]]]}}"
    },
    {
        "token": "fad832eb-cce9-41c9-a7d6-daa0c2818b56",
        "job_number": "j104213",
        "total": 0.0,
        "dataset_name": "TIGER/Line 2013: State Based Files - COLORADO",
        "note": "this is a note. denver metro area.",
        "submitted_for_processing_at": null,
        "processing_started_at": null,
        "created_at": "2015/02/12 23:09:49 +0000",
        "completed_at": null,
        "fulfilled_at": null,
        "token_expires_at": "2015/02/16 23:09:49 +0000",
        "download_expires_at": "2065/01/30 23:09:49 +0000",
        "seat_option_id": null,
        "dataset_permalink": "tiger_line_colorado_state_based_files",
        "dataset_provider": "TIGER",
        "dataset_thumbnail": "https://dby46mpjv9zj4.cloudfront.net/50fc881c-79dc-855e-a272-1d19710cf52c/thumbnail/thumbnail.png",
        "dataset_token": "50fc881c-79dc-855e-a272-1d19710cf52c",
        "status": "In Cart",
        "content_license_acceptance": true,
        "content_license_id": 1,
        "job_transaction_id": null,
        "library_id": null,
        "order_id": null,
        "subsidy_transaction_id": null,
        "market": true,
        "cart": true,
        "royalty_model": null,
        ...
        "geometry": "{\"type\":\"Feature\",\"crs\":{\"type\":\"name\",\"properties\":{\"name\":\"EPSG:4326\"}},\"geometry\":{\"type\":\"Polygon\",\"coordinates\":[[[-105.72758,38.88908],[-105.72758,40.081],[-104.21696,40.081],[-104.21696,38.88908],[-105.72758,38.88908]]]}}"
    }],
    "current_page": 1,
    "per_page": 3,
    "total_entries": 6,
    "total_pages": 2
}

Returns a document with a list of the user’s jobs. This includes jobs in the user’s cart and jobs that have been ordered.

HTTP Request

GET /jobs.json

Parameter Required Description
page Optional Desired page number, defaults to 1
per_page Optional Number of jobs per page, defaults to 5
date_range Optional The time range for the requested jobs. Can be “current_week”(last 7 days), “current_month”(last 30 days), or “last_month”(30-60 days ago), defaults to “current_week”

Response

Users

Get information about users.

Current User Details

Returns information about the currently authenticated user. Many of these fields are populated from the registration form.

HTTP REQUEST

GET /user.json

Request:

curl -3 -u demouser:demopwd -X GET -H 'Content-Type: application/json' https://market.weogeo.com/user.json

Response:

{
    "user": {
        "username": "albertdoyle@trimbledata.com",
        "id": 1758,
        "street_address1": "10368 Westmoor Drive",
        "street_address2": "",
        "city": "Westminster",
        "state": "CO",
        "postal_code": "80021",
        "country": "USA",
        "first_name": "Albert",
        "last_name": "Doyle",
        "organization": "Trimble Navigation",
        "phone_extension": null,
        "phone_number": "555-266-5555",
        "created_at": "2011/05/31 16:44:45 +0000",
        "updated_at": "2015/02/09 18:05:24 +0000",
        "email_id": "demouser@trimbledata.com",
        "login_count": 339,
        "api_key": "49aerb95-0b46-0e5a-a1b2-cf92b99hjk82",
        "redirect_location": null,
        "events_api_url": "https://market.weogeo.com/user/events.json",
        "events_api_url_template": "https://market.weogeo.com/user/events/${id}.json",
        "jobs_across_libraries_api": "https://market.weogeo.com/jobs/across_libraries.json",
        "libraries": []
    }
}

Response

HTTP Codes

HTTP response codes will be used as a basic mechanism for indicating the success or failure of requests. Codes in the 2xx range indicate success, those in the 4xx range indicate an error in the request, and codes in 5xx range indicate an error with our servers.

Code Meaning
200 OK – The request was received.
201 Created – The entity has been created.
204 No Content – The request was received.
400 Bad Request – The request is not formatted correctly.
401 Unauthorized – The supplied credentials are incorrect.
403 Forbidden – The supplied credentials does not have permission to access the item.
404 Not Found – The requested item doesn’t exist.
422 Unprocessable Entity – There is an error in your request.
500 Internal Server Error – There is a problem with our server. Try again later.
503 Service Unavailable – We’re temporarially offline for maintanance. Please try again later.