# Register a new user POST http://localhost:8081/user/login Content-Type: application/json { "username": "{{username}}", "password": "{{password}}" } > {% client.global.set("token", response.body.token); client.global.set("refreshToken", response.body.refreshToken); client.test("Request executed successfully", function() { client.assert(response.status === 200, "Response status is not 200"); }); %} ### Refresh token POST http://localhost:8081/user/refresh_token Content-Type: application/json { "refreshToken": "{{refreshToken}}" } > {% client.test("Request executed successfully", function() { client.global.set("token", response.body.token); client.assert(response.status === 200, "Response status is not 200"); }); %} ### Get notes GET http://localhost:8081/notes Authorization: Bearer {{token}} > {% client.global.set("uuid", response.body[0].uuid); client.test("Request executed successfully", function() { client.assert(response.status === 200, "Response status is not 200"); }); %} ### Create note POST http://localhost:8081/notes Authorization: Bearer {{token}} Content-Type: application/json { "title": "test", "tags": [ "Some", "Tags" ], "chapters": [ { "title": "Chapter 1", "content": "# This is some content" } ] } > {% client.test("Request executed successfully", function() { client.assert(response.status === 201, "Response status is not 201"); }); %} ### Get a note GET http://localhost:8081/notes/{{uuid}} Authorization: Bearer {{token}} > {% client.test("Request executed successfully", function() { client.assert(response.status === 200, "Response status is not 200"); }); %}