Measure MapAPI

Get a project's measurements

GET/projects/{pid}/data
projects:read EnterpriseOpen Guest

Everything drawn on the project: areas and lines (polygon), spots (spot) and image overlays (image_overlay), told apart by type. A line is a polygon with noSurface: true and an area of 0; a hole has isHole: true and a buffer isBuffer: true, both with the shape they belong to in parentId.

Areas are in square metres and lengths in metres, as last saved.

Path parameters

  • pidstringrequired
    The project's ID, the part after /p/ in its address in the app.

Query parameters

  • includePointsboolean
    false to leave out the corners of each shape, for a lighter answer.
    Defaulttrue

Responses

  • One of 3 kinds, told apart by type:

    An area or a line drawn on the map.
    • typestringrequired
      Always"polygon"
    • idstringrequired
    • parentIdstring
      For a hole or a buffer, the shape it belongs to.
    • groupIdstring
      The group the shape is in.
    • productIdstring
      The first product on the shape (see productIds).
    • productIdsarray of string
      Every product on the shape, in order. Work is often layered.
    • titlestring
    • descriptionstring
    • shapestringrequired
      One ofpolygoncirclerectangle
    • numPointsinteger
      How many corners it has.
    • fillColorstring
      Hex colour.
    • fillOpacitynumber
      0 to 1
    • lineColorstring
      Hex colour.
    • lineWidthnumber
    • totalAreanumber
      Its area in square metres; 0 for a line.
    • totalPerimeternumber
      Its perimeter (or a line's length) in metres.
    • noSurfaceboolean
      true for a line.
    • isBufferboolean
    • isHoleboolean
    • imagesarray of string
    • Its corners in order. Left out with includePoints=false.

Errors

A failed request answers with one of these, in an Error body.

400invalid_project_idThe project or folder ID in the path is missing or blank.
401unauthorized_actionThe item is not on your account or your members', the request came from a web page on a website the key does not allow, or the action is not allowed for this person.
403insufficient_scopeThe key does not have the access this endpoint needs. Create a key with that access.
403invalid_api_keyNo key was sent in the Authorization header, or the key is unknown, revoked, or past the time it kept working after being replaced.
404project_not_foundThe project does not exist.

Try it

This key is

The key stays in this tab and goes only to the API. Use a sandbox key while you try things: requests are real, and what they change is changed.

The project's ID, the part after `/p/` in its address in the app.
GET https://api.measuremaponline.com/api/v1/projects/Xr7Lp2Qm9KdT4wZs/data

Fill in your API key to send.

As a cURL command
Shell
curl 'https://api.measuremaponline.com/api/v1/projects/Xr7Lp2Qm9KdT4wZs/data' \
  -H "Authorization: $MMO_API_KEY"