brainlet/apitest.rest

57 lines
1.9 KiB
ReStructuredText
Raw Normal View History

2020-10-05 20:36:03 +03:00
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.eyJ1c2VybmFtZSI6InRlc3QiLCJpYXQiOjE2MDU0ODI5NjgsImV4cCI6MTYwNTQ5Mzc2OH0.BjZEnI1v7XCYpEqyBub7uFrTtfQUZ7_PukP4sgcEzB0.eyJ1c2VybmFtZSI6InRlc3QiLCJpYXQiOjE2MDA1MTA2MTEsImV4cCI6MTYwMDUyMTQxMX0.q85p94FLPR4fxZ4O5pmalEEjU9Hyr9js63u6LgoCQCw
2020-10-05 20:36:03 +03:00
###
POST http://localhost:3000/api/v1/content/category/create
Cookie: token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6InRlc3QiLCJpYXQiOjE2MDU0ODI5NjgsImV4cCI6MTYwNTQ5Mzc2OH0.BjZEnI1v7XCYpEqyBub7uFrTtfQUZ7_PukP4sgcEzB0
2020-10-05 20:36:03 +03:00
Content-Type: application/json
{
"title": "testing1"
2020-10-05 20:36:03 +03:00
}
###
POST http://localhost:3000/api/v1/content/post/create
Cookie: token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6InRlc3QiLCJpYXQiOjE2MDU0ODI5NjgsImV4cCI6MTYwNTQ5Mzc2OH0.BjZEnI1v7XCYpEqyBub7uFrTtfQUZ7_PukP4sgcEzB0
2020-10-05 20:36:03 +03:00
Content-Type: application/json
{
"category": "5fb1ba3eb04f2b3356aa2e58",
2020-10-05 20:36:03 +03:00
"title": "Test title",
"body": "Test content!!!"
2020-10-05 20:36:03 +03:00
}
###
GET http://localhost:3000/api/v1/content/category/5fb1ba3eb04f2b3356aa2e58/info
Cookie: token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6InRlc3QiLCJpYXQiOjE2MDU0ODI5NjgsImV4cCI6MTYwNTQ5Mzc2OH0.BjZEnI1v7XCYpEqyBub7uFrTtfQUZ7_PukP4sgcEzB0
2020-10-05 20:36:03 +03:00
Content-Type: application/json
###
GET http://localhost:3000/api/v1/content/category/list
Cookie: token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6InRlc3QiLCJpYXQiOjE2MDA1MTA2MTEsImV4cCI6MTYwMDUyMTQxMX0.q85p94FLPR4fxZ4O5pmalEEjU9Hyr9js63u6LgoCQCw
Content-Type: application/json