-
Notifications
You must be signed in to change notification settings - Fork 103
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d557c3b
commit cec2ec1
Showing
2 changed files
with
159 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,154 @@ | ||
# TILEDESK LOCALHOST REST API | ||
|
||
## Signup | ||
|
||
``` | ||
curl -v -X POST -d 'email=andrea.leo@f21.it&password=123456' http://localhost:3000/auth/signup | ||
``` | ||
|
||
|
||
## Signin | ||
|
||
``` | ||
curl -v -X POST -d 'email=andrea.leo@f21.it&password=123456' http://localhost:3000/auth/signin | ||
``` | ||
|
||
|
||
## Firebase signin | ||
|
||
``` | ||
curl -v -X POST -d 'email=andrea.leo@f21.it&password=123456' http://localhost:3000/firebase/auth/signin | ||
``` | ||
|
||
## Firebase createtoken | ||
|
||
``` | ||
curl -v -X POST -u andrea.leo@f21.it:123456 http://localhost:3000/firebase/createtoken | ||
``` | ||
|
||
## Projects | ||
|
||
### Create | ||
|
||
``` | ||
curl -v -X POST -H 'Content-Type:application/json' -u andrea.leo@f21.it:123456 -d '{"name":"testprj"}' http://localhost:3000/projects | ||
``` | ||
|
||
|
||
## Messages | ||
|
||
|
||
|
||
### Create | ||
|
||
``` | ||
curl -v -X POST -H 'Content-Type:application/json' -u andrea.leo@f21.it:123456 -d '{"sender":"io", "sender_fullname":"Andrea Leo", "text":"firstText"}' http://localhost:3000/5bedbbd18b9ed53a6a3f3dd3/requests/req123456/messages | ||
``` | ||
### Get | ||
``` | ||
smessages/5beeb3835d34344cd4962a8c | ||
``` | ||
|
||
|
||
|
||
|
||
## Requests | ||
|
||
### Create | ||
|
||
``` | ||
curl -v -X POST -H 'Content-Type:application/json' -u andrea.leo@f21.it:123456 -d '{"requester_id":"io", "requester_fullname":"Andrea Leo", "first_text":"firstText"}' http://localhost:3000/5ab0f32757066e0014bfd718/requests | ||
``` | ||
|
||
|
||
### List | ||
|
||
``` | ||
curl -v -X GET -H 'Content-Type:application/json' -u andrea.leo@f21.it:123456 http://localhost:3000/5bedbbd18b9ed53a6a3f3dd3/requests/req123456/ | ||
``` | ||
|
||
|
||
### Get | ||
|
||
``` | ||
### List | ||
``` | ||
curl -v -X GET -H 'Content-Type:application/json' -u andrea.leo@f21.it:123456 http://localhost:3000/5ab0f32757066e0014bfd718/requests/ | ||
``` | ||
### Patch | ||
``` | ||
curl -v -X PATCH -H 'Content-Type:application/json' -u andrea.leo@f21.it:123456 -d '{"rating":5, "rating_message":"Great"}' http://localhost:3000/5ab0f32757066e0014bfd718/requests/5b800a7f52ee93a525ca0d8c | ||
``` | ||
### Share by email | ||
``` | ||
curl -v -X POST -H 'Content-Type:application/json' -u andrea.leo@f21.it:123456 http://localhost:3000/5bc7678f3cbc8921530fffbb/requests/request_id-waitingTimeRequest/share/email?to=andrea.leo@frontiere21.it | ||
``` | ||
## Departments | ||
### Create | ||
``` | ||
curl -v -X POST -H 'Content-Type:application/json' -u andrea.leo@f21.it:123456 -d '{"name":"testdepartment","id_bot":"idbot"}' http://localhost:3000/5ab0f32757066e0014bfd718/departments | ||
``` | ||
### List | ||
``` | ||
curl -v -X GET -u andrea.leo@f21.it:123456 http://localhost:3000/5ab0f32757066e0014bfd718/departments | ||
``` | ||
### Create a default department | ||
``` | ||
curl -v -X POST -H 'Content-Type:application/json' -u andrea.leo@f21.it:123456 -d '{"name":"default","id_bot":"","default":true}' http://localhost:3000/5ab0f32757066e0014bfd718/departments | ||
``` | ||
### Get default department | ||
``` | ||
curl -v -X GET -u andrea.leo@f21.it:123456 http://localhost:3000/5ab0f32757066e0014bfd718/departments/default | ||
``` | ||
### Get the available operator for a specific department | ||
``` | ||
curl -X GET -u andrea.leo@f21.it:123456 http://localhost:3000/5ad706aa7009f70267089951/departments/5ad706db7009f70267089955/operators | ||
``` | ||
## Bots | ||
### List | ||
``` | ||
curl -v -X GET -u andrea.leo@f21.it:123456 http://localhost:3000/5ab0f32757066e0014bfd718/faq_kb | ||
``` | ||
#### Create | ||
``` | ||
curl -v -X POST -H 'Content-Type:application/json' -u andrea.leo@f21.it:123456 -d '{"name":"testbot"}' http://localhost:3000/5bedbbd18b9ed53a6a3f3dd3/faq_kb | ||
``` | ||
### ASK | ||
``` | ||
curl -v -X POST -H 'Content-Type:application/json' -u andrea.leo@f21.it:123456 -d '{"question":"test","doctype":"normal","min_score":"0.0","remote_faqkb_key":"c9970cc1-a211-4390-b7d0-cdf154d464a9"}' http://localhost:3000/5bedbbd18b9ed53a6a3f3dd3/faq/askbot | ||
``` | ||
## WebHook Subscription | ||
### Create | ||
``` | ||
curl -v -X POST -H 'Content-Type:application/json' -u andrea.leo@f21.it:123456 -d '{"event":"message.create", "target":"https://tiledesk.requestcatcher.com/test"}' http://localhost:3000/5bedbbd18b9ed53a6a3f3dd3/subscriptions | ||
``` | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters