Notes API
Accounts ¶
Create an account ¶
Register a new userPOST/register
Example URI
Headers
Content-Type: application/jsonBody
{
+Notes API Back to topNotes API
Accounts ¶
Create an account ¶
Register a new userPOST/register
Example URI
POST http://localhost:5000/registerRequestHeaders
Content-Type: application/json
Body
{
"username": "babar",
- "email": "michel@seed",
+ "email": "michel@seed-it.eu",
"password": "tortue"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
@@ -10,8 +10,7 @@
"type": "string"
},
"email": {
- "type": "string",
- "description": "it.eu (string)"
+ "type": "string"
},
"password": {
"type": "string"
@@ -80,24 +79,7 @@
"type": "number"
}
}
-}
Notes ¶
Notes ¶
Create a NotePOST/notes
Example URI
POST http://localhost:5000/notesRequestHeaders
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
Body
{
- "title": "Kotlin",
- "tags": [
- "Dev",
- "Server"
- ]
-}
Schema
{
- "$schema": "http://json-schema.org/draft-04/schema#",
- "type": "object",
- "properties": {
- "title": {
- "type": "string"
- },
- "tags": {
- "type": "array"
- }
- }
-}
Response 200Get 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
[
+}
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
[
{
"title": "Kotlin",
"tags": [
@@ -116,7 +98,21 @@
]
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
{
+ "tags": [
+ "Dev",
+ "Server"
+ ]
+}
Schema
{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "type": "object",
+ "properties": {
+ "tags": {
+ "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
{
"title": "Kotlin",
"tags": [
@@ -147,8 +143,7 @@
"type": "array"
}
}
-}
Response 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 204Response 404Update a NotePATCH/notes/{noteTitle}
Example URI
PATCH http://localhost:5000/notes/KotlinURI Parameters- noteTitle
string (required) Example: KotlinThe title of the Note.
+}
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
{
"title": "NewTitle"
}
Schema
{
@@ -172,26 +167,48 @@
"type": "array"
}
}
-}
RequestHeaders
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
Body
{
- "chapters": [
- {
- "title": "Introduction",
- "content": "..."
- },
- {
- "title": "Objects",
- "content": "..."
- }
- ]
+}
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
{
+ "title": "Chapter 1",
+ "content": "..."
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
- "chapters": {
- "type": "array"
+ "title": {
+ "type": "string"
+ },
+ "content": {
+ "type": "string"
}
}
-}
Response 200Response 404