Skip to content

Commit e108182

Browse files
committed
Update README
1 parent c1d6833 commit e108182

File tree

1 file changed

+14
-10
lines changed

1 file changed

+14
-10
lines changed

README.md

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -80,16 +80,20 @@ For a list of supported requests and related responses, please refer to the [`re
8080
All requests can be executed against the provided PHP development webserver in order to test and debug the API.
8181
This requires VSCode with the [REST Client](https://marketplace.visualstudio.com/items?itemName=humao.rest-client) extension installed.
8282

83-
| Method | URL | Description | Success Response |
84-
|--------|---------------------------------------|-------------------------------------------|--------------------------------|
85-
| GET | `/api.php?token=T` | Query complete dataset `T` | Dataset `T` as object `{...}` |
86-
| GET | `/api.php?token=T&property=P` | Query property `P` from dataset `T` | Value of `P` as string `"val"` |
87-
| GET² | `/api.php?token=T&property=P&value=V` | Update property `P` to `V` in dataset `T` | Updated dataset `T` as object |
88-
| POST | `/api.php?token=T` | Update provided properties in dataset `T` | Updated dataset `T` as object |
89-
| DELETE | `/api.php?token=T` | Remove complete dataset `T` | Boolean `true` |
90-
| DELETE | `/api.php?token=T&property=P` | Remove property `P` from dataset `T` | Boolean `true` |
91-
92-
² - This non standard REST operation behaves like a `POST` of the single property `P`, but can be executed from a browser.
83+
| Method | URL | Description | Success Response |
84+
|--------|---------------------------------------------|-------------------------------------------|---------------------------------------|
85+
| GET | `/api.php?token=T` | Query complete dataset `T` | Dataset `T` as object `{...}` |
86+
| GET | `/api.php?token=T&property=P` | Query property `P` from dataset `T` | Value of `P` as string `"val"` |
87+
| GET² | `/api.php?token=T&property=P&value=V` | Update property `P` to `V` in dataset `T` | Updated dataset `T` as object `{...}` |
88+
| POST | `/api.php?token=T` | Update provided properties in dataset `T` | Updated dataset `T` as object `{...}` |
89+
| DELETE | `/api.php?token=T` | Remove complete dataset `T` | Boolean `true` |
90+
| DELETE | `/api.php?token=T&property=P` | Remove property `P` from dataset `T` | Boolean `true` |
91+
| GET³ | `/api.php?method=delete&token=T` | Remove complete dataset `T` | Boolean `true` |
92+
| GET³ | `/api.php?method=delete&token=T&property=P` | Remove property `P` from dataset `T` | Boolean `true` |
93+
94+
Additional `GET` methods as available to use the complete REST API from a regular web browser:
95+
² - This `GET` method behaves like a `POST` of the single property `P`.
96+
³ - With the parameter `method=delete` the `DELETE` requests can be invoked via `GET`.
9397

9498
### Restrictions
9599

0 commit comments

Comments
 (0)