Skip to content

Commit 2f1a405

Browse files
authored
README file is updated with API listing
1 parent 6a5fc15 commit 2f1a405

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

README.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,5 +69,40 @@ All the `cron` events will invoke the deployed functions in stipulated time inte
6969

7070
However, to call using `httpApi` you can use any REST Client like [Talend API Tester](https://chrome.google.com/webstore/detail/talend-api-tester-free-ed/aejoelaoggembcahagimdiliamlcdmfm?hl=en) with the `url` and *HTTP Verbs* as shown in Terminal after using `serverless deploy`.
7171

72+
## API Listing
73+
74+
**POST** /login have the following input json
75+
```json
76+
{
77+
"username": "arisgh7"
78+
}
79+
```
80+
Following APIs **must** contain `Authorization: Bearer <token>` in the *headers*
81+
82+
**POST** /adduser have the following input json
83+
```json
84+
{
85+
"name": "John Doe",
86+
"designation": "Actor"
87+
}
88+
```
89+
90+
**GET** /getallusers have no input json
91+
92+
**DELETE** /deleteuser?recordId=record-id-to-delete have no input json. But it should contain the record id to be deleted in the *Query string*
93+
94+
**PUT** /updateuser have the following input json
95+
```js
96+
97+
{
98+
"updateId": "61cb02d7de06af8f5d0f918f",
99+
"updateDoc": {
100+
"name": "Arijit Singh",
101+
"designation": "Singer",
102+
"country": "India" // this field is optional
103+
}
104+
105+
}
106+
```
72107

73108

0 commit comments

Comments
 (0)