Creating documentation
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
# LocationsApi document shapes
|
||||
|
||||
This service expects JSON request bodies for location creation and updates and
|
||||
stores location documents in MongoDB.
|
||||
|
||||
Inbound JSON documents
|
||||
- CreateLocationRequest (`POST /api/locations`)
|
||||
```json
|
||||
{
|
||||
"name": "string"
|
||||
}
|
||||
```
|
||||
- UpdateLocationRequest (`PUT /api/locations/{id}`)
|
||||
```json
|
||||
{
|
||||
"name": "string"
|
||||
}
|
||||
```
|
||||
|
||||
Stored documents (MongoDB)
|
||||
- Location
|
||||
```json
|
||||
{
|
||||
"id": "string (ObjectId)",
|
||||
"ownerUserId": "string",
|
||||
"name": "string",
|
||||
"createdUtc": "string (ISO-8601 datetime)"
|
||||
}
|
||||
```
|
||||
@@ -0,0 +1,10 @@
|
||||
# LocationsApi
|
||||
|
||||
## Document shapes
|
||||
See `DOCUMENTS.md` for request payloads and stored document shapes.
|
||||
|
||||
## Endpoints
|
||||
- `POST /api/locations` Create a location (SUPER only).
|
||||
- `GET /api/locations` List locations for the current user.
|
||||
- `DELETE /api/locations/{id}` Delete a location (SUPER only).
|
||||
- `PUT /api/locations/{id}` Update a location name (SUPER only).
|
||||
Reference in New Issue
Block a user