Notes API
Accounts ¶
Create an account ¶
Register a new userPOST/register
Example URI
Headers
Content-Type: application/jsonBody
{
+Notes API Notes API
API Endpoint
http://localhost:5000Accounts ¶
Create an account ¶
POST http://localhost:5000/registerRequestsHeaders
Content-Type: application/json
Body
{
"username": "babar",
"email": "michel@seed-it.eu",
"password": "tortue"
@@ -16,7 +16,7 @@
"type": "string"
}
}
-}
Response 200Headers
Content-Type: application/json
Body
{
+}
ResponsesHeaders
Content-Type: application/json
Body
{
"message": "Created"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
@@ -26,7 +26,7 @@
"type": "string"
}
}
-}
Response 409Headers
Content-Type: application/json
Body
{
+}
Headers
Content-Type: application/json
Body
{
"message": "User already exists"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
@@ -36,8 +36,8 @@
"type": "string"
}
}
-}
Register a new userPOST/register
Authenticate user ¶
Authenticate one user to access protected routes.
+POST http://localhost:5000/loginRequestsHeaders
Content-Type: application/json
Body
{
"username": "babar",
"password": "tortue"
}
Schema
{
@@ -51,7 +51,7 @@
"type": "string"
}
}
-}
Response 200Headers
Content-Type: application/json
Body
{
+}
ResponsesHeaders
Content-Type: application/json
Body
{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
@@ -61,7 +61,7 @@
"type": "string"
}
}
-}
Response 401Headers
Content-Type: application/json
Body
{
+}
Headers
Content-Type: application/json
Body
{
"description": "Invalid credentials",
"error": "Bad Request",
"status_code": 401
@@ -79,7 +79,7 @@
"type": "number"
}
}
-}
Notes ¶
Notes ¶
Get NotesGET/notes
Example URI
GET http://localhost:5000/notesRequestHeaders
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
Response 200Headers
Content-Type: application/json
Body
[
+}
Authenticate a userPOST/login
Notes ¶
Notes ¶
GET http://localhost:5000/notesRequestsHeaders
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
ResponsesHeaders
Content-Type: application/json
Body
[
{
"title": "Kotlin",
"tags": [
@@ -98,8 +98,7 @@
]
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "array"
-}
Note ¶
Create a NotePOST/notes/{noteTitle}
Example URI
POST http://localhost:5000/notes/KotlinURI Parameters- noteTitle
string (required) Example: KotlinThe title of the Note.
-
RequestHeaders
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
Body
{
+}
Get NotesGET/notes
Note ¶
POST http://localhost:5000/notes/KotlinRequestsHeaders
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
Body
{
"tags": [
"Dev",
"Server"
@@ -112,8 +111,8 @@
"type": "array"
}
}
-}
Response 201Response 409Get NoteGET/notes/{noteTitle}
Example URI
GET http://localhost:5000/notes/KotlinURI Parameters- noteTitle
string (required) Example: KotlinThe title of the Note.
-
RequestHeaders
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
Response 200Headers
Content-Type: application/json
Body
{
+}
ResponsesThis response has no content.This response has no content.Create a NotePOST/notes/{noteTitle}
URI Parameters- noteTitle
string (required) Example: KotlinThe title of the Note.
+
GET http://localhost:5000/notes/KotlinRequestsHeaders
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
ResponsesHeaders
Content-Type: application/json
Body
{
"title": "Kotlin",
"tags": [
"Dev",
@@ -143,8 +142,8 @@
"type": "array"
}
}
-}
Response 404Update a NotePATCH/notes/{noteTitle}
Example URI
PATCH http://localhost:5000/notes/KotlinURI Parameters- noteTitle
string (required) Example: KotlinThe title of the Note.
-
RequestHeaders
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
Body
{
+}
This response has no content.Get NoteGET/notes/{noteTitle}
URI Parameters- noteTitle
string (required) Example: KotlinThe title of the Note.
+
PATCH http://localhost:5000/notes/KotlinRequestsHeaders
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
Body
{
"title": "NewTitle"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
@@ -154,7 +153,7 @@
"type": "string"
}
}
-}
RequestHeaders
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
Body
{
+}
ResponsesThis response has no content.This response has no content.Headers
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
Body
{
"tags": [
"new",
"tags"
@@ -167,10 +166,9 @@
"type": "array"
}
}
-}
Response 200Response 404Delete NoteDELETE/notes/{noteTitle}
Example URI
DELETE http://localhost:5000/notes/KotlinURI Parameters- noteTitle
string (required) Example: KotlinThe title of the Note.
-
RequestHeaders
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
Response 200Response 404Chapters ¶
Post a chapterPOST/notes/{noteTitle}/chapters/{chapterNumber}
Example URI
POST http://localhost:5000/notes/Kotlin/chapters/KotlinURI Parameters- noteTitle
string (required) Example: KotlinThe title of the Note.
-- chapterNumber
number (required) Example: KotlinThe chapter number.
-
RequestHeaders
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
Body
{
+}
ResponsesThis response has no content.This response has no content.Update a NotePATCH/notes/{noteTitle}
URI Parameters- noteTitle
string (required) Example: KotlinThe title of the Note.
+
DELETE http://localhost:5000/notes/KotlinRequestsHeaders
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
ResponsesThis response has no content.This response has no content.Delete NoteDELETE/notes/{noteTitle}
URI Parameters- noteTitle
string (required) Example: KotlinThe title of the Note.
+
Chapters ¶
POST http://localhost:5000/notes/Kotlin/chapters/KotlinRequestsHeaders
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
Body
{
"title": "Chapter 1",
"content": "..."
}
Schema
{
@@ -184,9 +182,9 @@
"type": "string"
}
}
-}
Response 201Response 404Patch a chapterPATCH/notes/{noteTitle}/chapters/{chapterNumber}
Example URI
PATCH http://localhost:5000/notes/Kotlin/chapters/KotlinURI Parameters- noteTitle
string (required) Example: KotlinThe title of the Note.
+}
ResponsesThis response has no content.This response has no content.Post a chapterPOST/notes/{noteTitle}/chapters/{chapterNumber}
URI Parameters- noteTitle
string (required) Example: KotlinThe title of the Note.
- chapterNumber
number (required) Example: KotlinThe chapter number.
-
RequestHeaders
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
Body
{
+
PATCH http://localhost:5000/notes/Kotlin/chapters/KotlinRequestsHeaders
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
Body
{
"title": "new title"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
@@ -196,7 +194,7 @@
"type": "string"
}
}
-}
RequestHeaders
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
Body
{
+}
ResponsesThis response has no content.This response has no content.Headers
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
Body
{
"content": "..."
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
@@ -206,9 +204,11 @@
"type": "string"
}
}
-}
Response 200Response 404Delete a chapterDELETE/notes/{noteTitle}/chapters/{chapterNumber}
Example URI
DELETE http://localhost:5000/notes/Kotlin/chapters/KotlinURI Parameters- noteTitle
string (required) Example: KotlinThe title of the Note.
+}
ResponsesThis response has no content.This response has no content.Patch a chapterPATCH/notes/{noteTitle}/chapters/{chapterNumber}
URI Parameters- noteTitle
string (required) Example: KotlinThe title of the Note.
- chapterNumber
number (required) Example: KotlinThe chapter number.
-
RequestHeaders
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
Response 200Response 404