API Reference

Examples

Vector Tile Cache related tasks

The following examples are tasks that are executed by the Vector Tile Cache Service (VTCS).

All the VTCS tasks can use an optional bounding box. The image below shows the bounding box values used in the examples. The bounding box is assumed to be in EPSG:4326 unless specified otherwise in parameter crs.


Seeding job, reseeding job, deleting job

The following examples executes a process that will seed, reseed or delete the MVT tile cache for a project.

/rest/v1/organizations/{organization}/processes/VTCS:SEED_MVT_CACHE/execution

/rest/v1/organizations/{organization}/processes/VTCS:RESEED_MVT_CACHE/execution

/rest/v1/organizations/{organization}/processes/VTCS:TRUNCATE_MVT_CACHE/execution

{
  "inputs": {
    "projectId": "<PROJECT_ID>",
    "crs": "EPSG:4326",
    "yMax": 45.703350,   // Up-left
    "xMin": -74.077868,  // Up-left
    "yMin": 45.374810,   // Bottom-right
    "xMax": -73.365001,  // Bottom-right
    "zMax": 10,
    "zMin": 9
  },
  "response": "raw"
}

The response looks like this. It indicates that a new job was accepted for the process VTCS:SEED_MVT_CACHE.

{
  "job": {
    "processId": "VTCS:SEED_MVT_CACHE",
    "type": "process",
    "jobId": "f23dc382-a9b3-4893-b0ee-ac88ec67a821",
    "status": "ACCEPTED",
    "message": "Job accepted",
    "progress": 50,
    "links": [
      {
        "href": "https://jmapcloud.io/api/ps/rest/v1/organizations/2efb2f56-80fe-45e2-bf7f-3bbfc1e9415e/jobs/f23dc382-a9b3-4893-b0ee-ac88ec67a821",
        "rel": "status",
        "type": "application/json",
        "title": "Job status"
      }
    ]
  }
}

Getting the status of a job

The following shows the response when getting the status of a job.

/rest/v1/organizations/{organization}/processes/jobs/{job}

{
  "job": {
    "processId": "VTCS:SEED_MVT_CACHE",
    "type": "process",
    "jobId": "e46ded12-83fb-48c8-8c89-497ded1e247e",
    "status": "RUNNING",
    "message": "Perform step 1/2",
    "created": "2023-08-25T15:27:50.115702389Z",
    "started": "2023-08-25T15:28:20.115709772Z",
    "finished": "2023-08-25T15:37:50.115730234Z",
    "updated": "2023-08-25T15:28:50.115724592Z",
    "progress": 50,
    "links": [
      {
        "href": "https://jmapcloud.io/api/ps/rest/v1/organizations/2efb2f56-80fe-45e2-bf7f-3bbfc1e9415e/jobs/e46ded12-83fb-48c8-8c89-497ded1e247e",
        "rel": "status",
        "type": "application/json",
        "title": "Job status"
      }
    ]
  }
}

Cancelling a job

The following shows the response when deleting a job.

/rest/v1/organizations/{organization}/processes/jobs/{job}

{
  "job": {
    "processId": "VTCS:SEED_MVT_CACHE",
    "type": "process",
    "jobId": "e46ded12-83fb-48c8-8c89-497ded1e247e",
    "status": "DISMISSED",
    "message": "",
    "created": "2023-08-25T15:27:50.115702389Z",
    "started": "2023-08-25T15:28:20.115709772Z",
    "finished": "2023-08-25T15:37:50.115730234Z",
    "updated": "2023-08-25T15:28:50.115724592Z",
    "progress": 50,
    "links": [
      {
        "href": "https://jmapcloud.io/api/ps/rest/v1/organizations/2efb2f56-80fe-45e2-bf7f-3bbfc1e9415e/jobs/e46ded12-83fb-48c8-8c89-497ded1e247e",
        "rel": "status",
        "type": "application/json",
        "title": "Job status"
      }
    ]
  }
}