Improve example req/res data for some endpoints
This commit is contained in:
parent
1e7ce5f9e2
commit
2d48134ecb
@ -138,7 +138,7 @@ A json object for the deleted account with confirmation message.
|
|||||||
|
|
||||||
#### Get a list of meetings for an account
|
#### Get a list of meetings for an account
|
||||||
|
|
||||||
**`GET /api/accounts/:account_id/meetings`**
|
**`GET /api/accounts/:id/meetings`**
|
||||||
|
|
||||||
##### Request
|
##### Request
|
||||||
|
|
||||||
@ -155,21 +155,34 @@ A json object with an `token`.
|
|||||||
A json object for the specified account with an array of `meeting`.
|
A json object for the specified account with an array of `meeting`.
|
||||||
|
|
||||||
```
|
```
|
||||||
[{
|
[
|
||||||
"id": "f86983db-955e-43b8-be3e-bc92bbeb9b43",
|
{
|
||||||
"title": "Worldwide strategy meeting for growth",
|
"id": "03ac7a10-316f-46e8-bb55-8611e7e5b31c",
|
||||||
"description": "Let's find the best ethical growth hacking technics together. Yeah, fun.",
|
"title": "Worldwide meeting I",
|
||||||
"start_time": "2022-02-16 20:00:00",
|
"description": "Let's find the best ethical growth hacking technics together. Yeah, fun.",
|
||||||
"timezone": "Europe/Brussels",
|
"start_time": "10:30:00",
|
||||||
"duration": 60,
|
"timezone": "Europe/Brussels",
|
||||||
"status": 1
|
"duration": 90,
|
||||||
},
|
"status": false
|
||||||
{
|
},
|
||||||
"id": "follow-up-with-tech-team-21850",
|
{
|
||||||
"title": "Follow up with tech team",
|
"id": "2e8f3748-ea5a-4d20-b9a8-683ac65f5634",
|
||||||
"duration": 120,
|
"title": "Worldwide meeting II",
|
||||||
"status": 0
|
"description": "Let's find the best ethical growth hacking technics together. Yeah, fun.",
|
||||||
}
|
"start_time": "08:00:00",
|
||||||
|
"timezone": "America/New_York",
|
||||||
|
"duration": 90,
|
||||||
|
"status": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "a8344a68-7961-4bff-bb3b-b288f3abcf1c",
|
||||||
|
"title": "Worldwide meeting III",
|
||||||
|
"description": "Let's find the best ethical growth hacking technics together. Yeah, fun.",
|
||||||
|
"start_time": "14:30:00",
|
||||||
|
"timezone": "Asia/Kolkata",
|
||||||
|
"duration": 90,
|
||||||
|
"status": false
|
||||||
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
```
|
```
|
||||||
@ -292,7 +305,7 @@ A json object with a `meeting_id`.
|
|||||||
|
|
||||||
```
|
```
|
||||||
{
|
{
|
||||||
"id": "f86983db-955e-43b8-be3e-bc92bbeb9b43"
|
"id": "03ac7a10-316f-46e8-bb55-8611e7e5b31c"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -303,29 +316,27 @@ A json object for the specified meeting with an array of `participant`.
|
|||||||
```
|
```
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"id": 23,
|
"account_id": 1,
|
||||||
"account_id": 5,
|
"meeting_id": "03ac7a10-316f-46e8-bb55-8611e7e5b31c",
|
||||||
"meeting_id": "f86983db-955e-43b8-be3e-bc92bbeb9b43",
|
"earliest_time": "09:30:00",
|
||||||
"earliest_time": "09:30",
|
"latest_time": "22:00:00",
|
||||||
"latest_time": "17:00",
|
"quorum": false,
|
||||||
"quorum": 1,
|
"mandatory": false,
|
||||||
"mandatory": 1,
|
"host": false,
|
||||||
"host": 1,
|
"answered": false,
|
||||||
"answered": 1,
|
"timezone": "Europe/Brussels"
|
||||||
"timezone": "Europe/Brussels"
|
},
|
||||||
},
|
{
|
||||||
{
|
"account_id": 2,
|
||||||
"id": 28,
|
"meeting_id": "03ac7a10-316f-46e8-bb55-8611e7e5b31c",
|
||||||
"account_id": 11,
|
"earliest_time": "09:00:00",
|
||||||
"meeting_id": "f86983db-955e-43b8-be3e-bc92bbeb9b43",
|
"latest_time": "20:00:00",
|
||||||
"earliest_time": "10:00",
|
"quorum": false,
|
||||||
"latest_time": "21:00",
|
"mandatory": false,
|
||||||
"quorum": 0,
|
"host": false,
|
||||||
"mandatory": 1,
|
"answered": false,
|
||||||
"host": 0,
|
"timezone": "America/New_York"
|
||||||
"answered": 1,
|
}
|
||||||
"timezone": "Europe/Brussels"
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
|
|
||||||
```
|
```
|
||||||
@ -387,36 +398,38 @@ A json object with a `meeting_id`.
|
|||||||
A json object for the specified meeting with `meeting_id` and an array of `availibility`.
|
A json object for the specified meeting with `meeting_id` and an array of `availibility`.
|
||||||
|
|
||||||
```
|
```
|
||||||
{
|
[
|
||||||
"meeting_id": "f86983db-955e-43b8-be3e-bc92bbeb9b43",
|
{
|
||||||
"availibility": [{
|
"id": 1,
|
||||||
"participant_id": 5,
|
"meeting_id": "03ac7a10-316f-46e8-bb55-8611e7e5b31c",
|
||||||
"possible_date_id": 21,
|
"account_id": 1,
|
||||||
"intervals": [{
|
"possible_date_id": 1,
|
||||||
"preference": 0,
|
"preference": false,
|
||||||
"start_time": "2021-06-25 09:00:00",
|
"start_time": "09:00:00",
|
||||||
"end_time": "2021-06-25 13:00:00",
|
"end_time": "22:00:00",
|
||||||
"timezone": "Europe/Brussels"
|
"timezone": "Europe/Brussels"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"preference": 1,
|
"id": 2,
|
||||||
"start_time": "2021-06-25 15:00:00",
|
"meeting_id": "03ac7a10-316f-46e8-bb55-8611e7e5b31c",
|
||||||
"end_time": "2021-06-25 20:00:00",
|
"account_id": 2,
|
||||||
"timezone": "Europe/Brussels"
|
"possible_date_id": 1,
|
||||||
}]
|
"preference": false,
|
||||||
},
|
"start_time": "10:00:00",
|
||||||
{
|
"end_time": "20:00:00",
|
||||||
"participant_id": 56,
|
"timezone": "America/New_York"
|
||||||
"possible_date_id": 21,
|
},
|
||||||
"intervals": [{
|
{
|
||||||
"preference": 0,
|
"id": 3,
|
||||||
"start_time": "2021-06-25 08:00:00",
|
"meeting_id": "03ac7a10-316f-46e8-bb55-8611e7e5b31c",
|
||||||
"end_time": "2021-06-25 10:30:00",
|
"account_id": 1,
|
||||||
"timezone": "Europe/Brussels"
|
"possible_date_id": 2,
|
||||||
}]
|
"preference": false,
|
||||||
}
|
"start_time": "10:00:00",
|
||||||
]
|
"end_time": "14:00:00",
|
||||||
}
|
"timezone": "Europe/Brussels"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -556,8 +569,8 @@ A json object for the meeting to add with **`meeting_id`** and **`possible_date`
|
|||||||
|
|
||||||
```
|
```
|
||||||
{
|
{
|
||||||
"meeting_id": "f86983db-955e-43b8-be3e-bc92bbeb9b43",
|
"meeting_id": "03ac7a10-316f-46e8-bb55-8611e7e5b31c",
|
||||||
"possible_date": "2020-02-18"
|
"possible_date": "2025-02-27"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -567,11 +580,9 @@ A json object for the added meeting with `id`, `meeting_id` and `possible_date`.
|
|||||||
|
|
||||||
```
|
```
|
||||||
{
|
{
|
||||||
"data": {
|
"id": 20,
|
||||||
"id": 5,
|
"meeting_id": "03ac7a10-316f-46e8-bb55-8611e7e5b31c",
|
||||||
"meeting_id": "f86983db-955e-43b8-be3e-bc92bbeb9b43",
|
"possible_date": "2025-02-26T23:00:00.000Z"
|
||||||
"possible_date": "2020-02-18"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -581,11 +592,11 @@ A json object for the added meeting with `id`, `meeting_id` and `possible_date`.
|
|||||||
|
|
||||||
##### Request
|
##### Request
|
||||||
|
|
||||||
A json object for the possible date to delete with `id`.
|
A json object for the possible date to delete with `token`.
|
||||||
|
|
||||||
```
|
```
|
||||||
{
|
{
|
||||||
"id": 12
|
"token": "fsdfsdf-sdfsgdfg-dfgdfg-dfgd"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -614,7 +625,7 @@ A json object for the deleted possible date with `message`.
|
|||||||
| created_at | datetime | generated by database |
|
| created_at | datetime | generated by database |
|
||||||
| updated_at | datetime | generated by database |
|
| updated_at | datetime | generated by database |
|
||||||
|
|
||||||
#### Add an availibility for a possible date
|
#### Add an availibility
|
||||||
|
|
||||||
**`POST /api/availibility`**
|
**`POST /api/availibility`**
|
||||||
|
|
||||||
@ -624,12 +635,12 @@ A json object with the availibility to add with **`participant_id`**, **`possibl
|
|||||||
|
|
||||||
```
|
```
|
||||||
{
|
{
|
||||||
"account_id": 5,
|
"meeting_id": "03ac7a10-316f-46e8-bb55-8611e7e5b31c",
|
||||||
"meeting_id": "f86983db-955e-43b8-be3e-bc92bbeb9b43",
|
"account_id": 1,
|
||||||
"possible_date_id": 21,
|
"possible_date_id": 1,
|
||||||
"preference": 0,
|
"preference": false,
|
||||||
"start_time": "2021-06-25 09:00:00",
|
"start_time": "23:00:00",
|
||||||
"end_time": "2021-06-25 13:00:00",
|
"end_time": "23:59:00",
|
||||||
"timezone": "Europe/Brussels"
|
"timezone": "Europe/Brussels"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -641,13 +652,13 @@ A json object with the availibility added with **`id`**, **`account_id`**, **`me
|
|||||||
|
|
||||||
```
|
```
|
||||||
{
|
{
|
||||||
"id": 1,
|
"id": 30,
|
||||||
"account_id": 5,
|
"account_id": 1,
|
||||||
"meeting_id": "f86983db-955e-43b8-be3e-bc92bbeb9b43",
|
"meeting_id": "03ac7a10-316f-46e8-bb55-8611e7e5b31c",
|
||||||
"possible_date_id": 21,
|
"possible_date_id": 1,
|
||||||
"preference": 0,
|
"preference": false,
|
||||||
"start_time": "2021-06-25 09:00:00",
|
"start_time": "23:00:00",
|
||||||
"end_time": "2021-06-25 13:00:00",
|
"end_time": "23:59:00",
|
||||||
"timezone": "Europe/Brussels"
|
"timezone": "Europe/Brussels"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@ -672,6 +683,6 @@ A json object for the deleted availibility with `message`.
|
|||||||
|
|
||||||
```
|
```
|
||||||
{
|
{
|
||||||
"message": "Availibility with id 12 was successfully deleted."
|
"message": "Availibility with id 30 was successfully deleted."
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
Loading…
Reference in New Issue
Block a user