This repository has been archived on 2022-05-17. You can view files and clone it, but cannot push or open issues or pull requests.
brainlet/apitest.rest
2020-10-05 20:36:03 +03:00

57 lines
No EOL
1.8 KiB
ReStructuredText
Executable file

POST http://localhost:3000/api/v1/users/account/create
Content-Type: application/json
{
"username": "test",
"password": "testtesttest",
"email": "test@test.test"
}
###
POST http://localhost:3000/api/v1/users/token/create
Content-Type: application/json
{
"username": "test",
"password": "testtesttest"
}
###
GET http://localhost:3000/api/v1/users/current/info
Cookie: token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6InRlc3QiLCJpYXQiOjE2MDA1MTA2MTEsImV4cCI6MTYwMDUyMTQxMX0.q85p94FLPR4fxZ4O5pmalEEjU9Hyr9js63u6LgoCQCw
###
POST http://localhost:3000/api/v1/content/category/create
Cookie: token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6InRlc3QiLCJpYXQiOjE2MDA1MTA2MTEsImV4cCI6MTYwMDUyMTQxMX0.q85p94FLPR4fxZ4O5pmalEEjU9Hyr9js63u6LgoCQCw
Content-Type: application/json
{
"name": "testing1"
}
###
POST http://localhost:3000/api/v1/content/post/create
Cookie: token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6InRlc3QiLCJpYXQiOjE2MDA1MTA2MTEsImV4cCI6MTYwMDUyMTQxMX0.q85p94FLPR4fxZ4O5pmalEEjU9Hyr9js63u6LgoCQCw
Content-Type: application/json
{
"category": "5f65e1f05c3cdd86400f43ec",
"title": "Test title",
"content": "Test content!!!"
}
###
GET http://localhost:3000/api/v1/content/category/5f65e1f05c3cdd86400f43ec/info
Cookie: token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6InRlc3QiLCJpYXQiOjE2MDA1MTA2MTEsImV4cCI6MTYwMDUyMTQxMX0.q85p94FLPR4fxZ4O5pmalEEjU9Hyr9js63u6LgoCQCw
Content-Type: application/json
###
GET http://localhost:3000/api/v1/content/category/list
Cookie: token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6InRlc3QiLCJpYXQiOjE2MDA1MTA2MTEsImV4cCI6MTYwMDUyMTQxMX0.q85p94FLPR4fxZ4O5pmalEEjU9Hyr9js63u6LgoCQCw
Content-Type: application/json