Skip to content
Drew edited this page Mar 17, 2015 · 11 revisions

PlotMaster REST API

Regions

GET - /regions

Gets a list of regions

[
  {
    "href": "http://localhost:4567/region/1",
    "id": 1,
    "plots": [
      {
        "href": "http://localhost:4567/plot/1",
        "id": 1
      }
    ]
  },
  {
    "href": "http://localhost:4567/region/2",
    "id": 2,
    "plots": [
      {
        "href": "http://localhost:4567/plot/2",
        "id": 2
      }
    ]
  }
]

GET /region/<id>

GET /region/<x,z>

Returns a region

{
  "id": 1,
  "x": -749,
  "z": -119,
  "h": 112,
  "w": 112,
  "createdAt": 1426536349062,
  "changed": false,
  "world": "world",
  "name": "",
  "plots": {
    "1": {
      "id": 1,
      "plotName": "",
      "ownerName": "Double0negative",
      "ownerUUID": "b9172d6b-64b8-4f58-bf13-128eba8e603c",
      "world": "world",
      "x": -748,
      "z": -118,
      "h": 112,
      "w": 112,
      "createdAt": 1426536349101,
      "type": {
        "name": "donator",
        "schematic": "plottest",
        "border": "small",
        "h": 112,
        "w": 112
      }
    }
  }
}

Plots

GET /plots

Gets a list of plots

[
  {
    "_href": "http://localhost:4567/plot/1",
    "id": 1,
    "region": {
      "_href": "http://localhost:4567/region/1",
      "id": 1
    }
  },
  {
    "_href": "http://localhost:4567/plot/2",
    "id": 2,
    "region": {
      "_href": "http://localhost:4567/region/2",
      "id": 2
    }
  }
]

GET `/plot/

GET `/plot/<x,z>

Gets a plot

{
  "id": 1,
  "plotName": "",
  "ownerName": "Double0negative",
  "ownerUUID": "b9172d6b-64b8-4f58-bf13-128eba8e603c",
  "world": "world",
  "x": -748,
  "z": -118,
  "h": 112,
  "w": 112,
  "createdAt": 1426536349101,
  "type": {
    "name": "donator",
    "schematic": "plottest",
    "border": "small",
    "h": 112,
    "w": 112
  }
}

Clone this wiki locally