updated API documentation
This commit is contained in:
56
API/v1/office/stompjes/DELETE Stomp.md
Normal file
56
API/v1/office/stompjes/DELETE Stomp.md
Normal file
@@ -0,0 +1,56 @@
|
||||
# DELETE Stomp
|
||||
This API call deletes a stomp from a user.
|
||||
#### Location
|
||||
```
|
||||
/api/v1/office/stompjes/
|
||||
```
|
||||
|
||||
#### Permissions required
|
||||
`office-stompjes` RW
|
||||
|
||||
#### Body parameters
|
||||
| Parameter | Type | Required | Description |
|
||||
| ---------- | ------ | -------- | ---------------------- |
|
||||
| stomp_uuid | string | yes | Unique id of the stomp |
|
||||
|
||||
### Example Body (json)
|
||||
```json
|
||||
{
|
||||
"stomp_uuid": "e0a60eba-52f6-11f1-8bcc-bc2411125ba4",
|
||||
}
|
||||
```
|
||||
|
||||
### Example Request
|
||||
```php
|
||||
$curl = curl_init();
|
||||
|
||||
curl_setopt_array($curl, [
|
||||
CURLOPT_URL => $baseUrl . '/api/v1/office/stompjes/',
|
||||
CURLOPT_RETURNTRANSFER => true,
|
||||
CURLOPT_POST => true,
|
||||
CURLOPT_POSTFIELDS => $json_payload,
|
||||
CURLOPT_HTTPHEADER => [
|
||||
'Authorization: Bearer ' . $token,
|
||||
'Content-Type: application/json',
|
||||
'X-HTTP-Method-Override: DELETE'
|
||||
],
|
||||
]);
|
||||
|
||||
$response = curl_exec($curl);
|
||||
$httpCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);
|
||||
|
||||
if ($response === false) {
|
||||
echo curl_error($curl);
|
||||
}
|
||||
|
||||
curl_close($curl);
|
||||
```
|
||||
|
||||
### Example Response
|
||||
```json
|
||||
"Stomp removed."
|
||||
```
|
||||
|
||||
#### Known errors or issues.
|
||||
None are known at the time
|
||||
If you do encounter issues and get an http code in return, check the response codes on this page.
|
||||
54
API/v1/office/stompjes/POST Stomp user.md
Normal file
54
API/v1/office/stompjes/POST Stomp user.md
Normal file
@@ -0,0 +1,54 @@
|
||||
# POST Stomp user
|
||||
This API call adds a stomp to a user.
|
||||
#### Location
|
||||
```
|
||||
/api/v1/office/stompjes/
|
||||
```
|
||||
#### Permissions required
|
||||
`ofice-stompjes-canstomp` RW
|
||||
|
||||
#### Body parameters
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ------ | -------- | ----------------------------------- |
|
||||
| user_uuid | string | yes | Unique id of the user to be stomped |
|
||||
|
||||
### Example Body (json)
|
||||
```json
|
||||
{
|
||||
"user_uuid": "5219edbb-512d-11f1-8bac-bc2411125ba4",
|
||||
}
|
||||
```
|
||||
|
||||
### Example Request
|
||||
```php
|
||||
$curl = curl_init();
|
||||
|
||||
curl_setopt_array($curl, [
|
||||
CURLOPT_URL => $baseUrl . '/api/v1/office/stompjes/',
|
||||
CURLOPT_RETURNTRANSFER => true,
|
||||
CURLOPT_POST => true,
|
||||
CURLOPT_POSTFIELDS => $json_payload,
|
||||
CURLOPT_HTTPHEADER => [
|
||||
'Authorization: Bearer ' . $token,
|
||||
'Content-Type: application/json',
|
||||
],
|
||||
]);
|
||||
|
||||
$response = curl_exec($curl);
|
||||
$httpCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);
|
||||
|
||||
if ($response === false) {
|
||||
echo curl_error($curl);
|
||||
}
|
||||
|
||||
curl_close($curl);
|
||||
```
|
||||
|
||||
### Example Response
|
||||
```json
|
||||
"Stomp added."
|
||||
```
|
||||
|
||||
#### Known errors or issues.
|
||||
None are known at the time
|
||||
If you do encounter issues and get an http code in return, check the response codes on this page.
|
||||
Reference in New Issue
Block a user