Quickstart
Create a sandbox key, make your first request, and read a project's measurements, in five minutes.
This walk-through uses a sandbox key, so nothing you do touches your real projects. You need an account on the Enterprise or Open Guest plan.
1. Create a sandbox key#
- Open the Developer page in the app (Developer, under Advanced in the dashboard menu).
- At the top of the key card, switch to Sandbox.
- Under Access for the new key, set Projects to Read and write.
- Press Generate new key, then copy the key with the copy button.
Keep the key out of your code: put it in an environment variable.
export MMO_API_KEY="paste-your-sandbox-key-here"$env:MMO_API_KEY = "paste-your-sandbox-key-here"2. Check the API#
The status endpoint needs no key. If this answers, you can reach the API:
curl https://api.measuremaponline.com/api/v1/{"name": "Measure Map Online Public API", "version": "0.5.0"}3. Create a project#
curl -X POST https://api.measuremaponline.com/api/v1/projects/new \
-H "Authorization: $MMO_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name": "My first API project", "description": "Made with the quickstart"}'The answer is the new project. Note its id and
its creatorUid, which is your account's ID:
{
"type": "project",
"id": "Xr7Lp2Qm9KdT4wZs",
"creatorUid": "m3K8qZxLpV4NrT2w",
"name": "My first API project",
"description": "Made with the quickstart",
"createdOn": 1791980000000,
"totalPolygons": 0,
"totalSpots": 0,
"members": ["m3K8qZxLpV4NrT2w"],
"commentsEnabled": false
}4. List your projects#
Use your account's ID (the creatorUid above) to list your projects, a page at
a time:
curl "https://api.measuremaponline.com/api/v1/users/YOUR_ACCOUNT_ID/projects?page=1&limit=20" \
-H "Authorization: $MMO_API_KEY"5. Read the measurements#
Ask for everything drawn on the project:
curl https://api.measuremaponline.com/api/v1/projects/PROJECT_ID/data \
-H "Authorization: $MMO_API_KEY"A project made through the API starts empty, so this answers []. Sandbox
projects live apart from your real ones and are not shown in the app; to see
real measurements, create a live key with Projects: Read only and ask
for one of your own projects. Each area comes with its totalArea in square
metres, its totalPerimeter in metres and its corners. See
Get a project's measurements.
6. Clean up#
curl -X DELETE https://api.measuremaponline.com/api/v1/projects/PROJECT_ID \
-H "Authorization: $MMO_API_KEY"Next steps#
- Try any endpoint from your browser with the Try it console on its page in the reference.
- Read Authentication before you put a key on a server, and Live and sandbox before you switch to a live key.
- Download the OpenAPI description to generate a client, or the Postman collection to explore in Postman.