-
Notifications
You must be signed in to change notification settings - Fork 4
REST API
Drew edited this page Apr 5, 2015
·
11 revisions
| Method | Path | Example |
|---|---|---|
| GET | /regions |
|
| GET | /regions?start=<#>&amount=<#> |
/regions?start=1&amount=2 |
Gets a list of regions
[
{
"href": "http://example.com:4567/region/1",
"id": 1,
"plots": [
{
"href": "http://example.com:4567/plot/1",
"id": 1
}
]
},
{
"href": "http://example.com:4567/region/2",
"id": 2,
"plots": [
{
"href": "http://example.com:4567/plot/2",
"id": 2
}
]
}
]| Method | Path | Example |
|---|---|---|
| GET | /region/<id> |
/region/1 |
| GET | /region/<x,z> |
/region/-750,-100 |
| 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
}
}
}
}| Method | Path | Example |
|---|---|---|
| GET | /plots |
|
| GET | /plots?start=<#>&amount=<#> |
/plots?start=1&amount=2 |
| Gets a list of plots |
[
{
"_href": "http://example.com:4567/plot/1",
"id": 1,
"region": {
"_href": "http://example.com:4567/region/1",
"id": 1
}
},
{
"_href": "http://example.com:4567/plot/2",
"id": 2,
"region": {
"_href": "http://example.com:4567/region/2",
"id": 2
}
}
]| Method | Path | Example |
|---|---|---|
| GET | /plot/<id> |
/plot/1 |
| GET | /plot/<x,z> |
/plot/-750,-110 |
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
}
}