Assets

This endpoint facilitates management of user-defined asset geometries. All assets must be submitted as valid GeoJSON, and contain one Feature with a single Polygon. Once an asset is defined, product endpoints may be invoked with its UUID to get asset-specific results. Only the API account that defines an asset can use and manage it. The maximum allowable asset size is approximately 16 million acres, or 65,000 km².


Asset List

GET /assets

Request Examples

See Headers for request header details.

$ curl -X GET https://insight.api.wdtinc.com/assets \
-H "Accept: application/vnd.wdt+json; version=1" \
  --user <username>:<password>

Response Example

See Status Codes for response code details.

HTTP/1.1 200 OK
[
  {
    "id": "b17a4230-5b28-11e6-8516-9801a78e45d7",
    "type": "GeometryCollection",
    "geometries": [
       {
      "type": "MultiPolygon",
      "coordinates": [
        [
          [
            [
              -97.490272522,
              35.1743695858
            ],
            [
              -97.490272522,
              35.2565534411
            ],
            [
              -97.3889923096,
              35.2565534411
            ],
            [
              -97.3889923096,
              35.1743695858
            ],
            [
              -97.490272522,
              35.1743695858
            ]
          ]
        ]
      ]
    }
  ],
  "description": {
    "Ex. Tag 2": "City of Norman",
    "Ex. Tag 1": "WDT Offices"
  },
  {
    "id": "062a6249-ccb7-468f-8ab4-fb817e95cf36",
    "type": "GeometryCollection",
    "geometries": [
      {
        "type": "MultiPolygon",
        "coordinates": [
      [
        [
          -89.10324096679688,
          40.38944285970336
        ],
        [
          -89.10324096679688,
          40.556591288249905
        ],
        [
          -88.88076782226562,
          40.556591288249905
        ],
        [
          -88.88076782226562,
          40.38944285970336
        ],
        [
          -89.10324096679688,
          40.38944285970336
        ]
      ]
    ]
      }
    ],
    "centroid": {
      "latitude": 40.460,
      "longitude": -89.542
    },
    "description": {
    "Ex. Tag 2": "Bloomington, IL",
    "Ex. Tag 1": "Corn Country"
  }
  }
]

Asset Information

GET /assets/{asset-uuid}

Request Example

See Headers for request header details.

$ curl -X GET https://insight.api.wdtinc.com/assets/b17a4230-5b28-11e6-8516-9801a78e45d7 \
-H "Accept: application/vnd.wdt+json; version=1" \
  --user <username>:<password>

Response Example

See Status Codes for response code details.

HTTP/1.1 200 OK
{
    "type": "GeometryCollection",
    "centroid": {
      "latitude": 35.2154615135,
      "longitude": -97.4396324158
    },
    "id": "b17a4230-5b28-11e6-8516-9801a78e45d7",
    "geometries": [
      {
        "type": "MultiPolygon",
        "coordinates": [
          [
            [
              [
                -97.490272522,
                35.1743695858
              ],
              [
                -97.490272522,
                35.2565534411
              ],
              [
                -97.3889923096,
                35.2565534411
              ],
              [
                -97.3889923096,
                35.1743695858
              ],
              [
                -97.490272522,
                35.1743695858
              ]
            ]
          ]
        ]
      }
    ],
    "description": {
      "Ex. Tag 2": "City of Norman",
      "Ex. Tag 1": "WDT Offices"
    }
  }

Asset Creation

POST /assets

Request Example

See Headers for request header details.

$ curl -X POST https://insight.api.wdtinc.com/assets \
-H "Accept: application/vnd.wdt+json; version=1" \
-H "Content-Type: application/json" \
-d '{
        "type": "FeatureCollection",
        "features": [
          {
            "type": "Feature",
            "properties": {"Ex. Tag 1": "WDT Offices",
                           "Ex. Tag 2": "City of Norman"},
            "geometry": {
              "type": "Polygon",
              "coordinates": [
              [
                [
                  -97.49027252197266,
                  35.17436958581184
                ],
                [
                  -97.49027252197266,
                  35.25655344114116
                ],
                [
                  -97.38899230957031,
                  35.25655344114116
                ],
                [
                  -97.38899230957031,
                  35.17436958581184
                ],
                [
                  -97.49027252197266,
                  35.17436958581184
                ]
              ]
              ]
            }
        }]}' \
  --user <username>:<password>

Response Example

See Status Codes for response code details.

HTTP/1.1 201 Created
{
   "type": "GeometryCollection",
   "centroid": {
     "latitude": 35.2154615135,
     "longitude": -97.4396324158
   },
   "id": "b17a4230-5b28-11e6-8516-9801a78e45d7",
   "geometries": [
     {
       "type": "MultiPolygon",
       "coordinates": [
         [
           [
             [
               -97.490272522,
               35.1743695858
             ],
             [
               -97.490272522,
               35.2565534411
             ],
             [
               -97.3889923096,
               35.2565534411
             ],
             [
               -97.3889923096,
               35.1743695858
             ],
             [
               -97.490272522,
               35.1743695858
             ]
           ]
         ]
       ]
     }
   ],
   "description": {
     "Ex. Tag 2": "City of Norman",
     "Ex. Tag 1": "WDT Offices"
   }
 }

Asset Update

PUT /assets/{asset-uuid}

Request Example

See Headers for request header details.

$ curl X PUT https://insight.api.wdtinc.com/assets/b17a4230-5b28-11e6-8516-9801a78e45d7 \
-H "Accept: application/vnd.wdt+json; version=1" \
-H "Content-Type: application/json" \
-d '{
        "type": "FeatureCollection",
        "features": [
          {
            "type": "Feature",
            "properties": {"Ex. Tag 1": "The best offices.",
                           "Ex. Tag 2": "Not all of Norman"},
            "geometry": {
              "type": "Polygon",
              "coordinates": [
              [
                [
                  -97.49027252197266,
                  35.17436958581184
                ],
                [
                  -97.49027252197266,
                  35.25655344114116
                ],
                [
                  -97.38899230957031,
                  35.25655344114116
                ],
                [
                  -97.38899230957031,
                  35.17436958581184
                ],
                [
                  -97.49027252197266,
                  35.17436958581184
                ]
              ]
              ]
            }
        }]}' \
  --user <username>:<password>

Response Example

See Status Codes for response code details.

HTTP/1.1 200 OK
{
    "type": "GeometryCollection",
    "centroid": {
      "latitude": 35.2154615135,
      "longitude": -97.4396324158
    },
    "id": "b17a4230-5b28-11e6-8516-9801a78e45d7",
    "geometries": [
      {
        "type": "MultiPolygon",
        "coordinates": [
          [
            [
              [
                -97.490272522,
                35.1743695858
              ],
              [
                -97.490272522,
                35.2565534411
              ],
              [
                -97.3889923096,
                35.2565534411
              ],
              [
                -97.3889923096,
                35.1743695858
              ],
              [
                -97.490272522,
                35.1743695858
              ]
            ]
          ]
        ]
      }
    ],
    "description": {
      "Ex. Tag 2": "Not all of Norman",
      "Ex. Tag 1": "The best offices."
    }
  }

Asset Removal

DELETE /assets/{asset-uuid}

Request Example

See Headers for request header details.

$ curl -X DELETE https://insight.api.wdtinc.com/assets/b17a4230-5b28-11e6-8516-9801a78e45d7 \
-H "Accept: application/vnd.wdt+json; version=1" \
  --user <username>:<password>

Response Example

See Status Codes for response code details.

HTTP/1.1 200 OK
{
    "type": "GeometryCollection",
    "centroid": {
      "latitude": 35.2154615135,
      "longitude": -97.4396324158
    },
    "id": "b17a4230-5b28-11e6-8516-9801a78e45d7",
    "geometries": [
      {
        "type": "MultiPolygon",
        "coordinates": [
          [
            [
              [
                -97.490272522,
                35.1743695858
              ],
              [
                -97.490272522,
                35.2565534411
              ],
              [
                -97.3889923096,
                35.2565534411
              ],
              [
                -97.3889923096,
                35.1743695858
              ],
              [
                -97.490272522,
                35.1743695858
              ]
            ]
          ]
        ]
      }
    ],
    "description": {
      "Ex. Tag 2": "City of Norman",
      "Ex. Tag 1": "WDT Offices"
    }
  }