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"
@@ -172,26 +171,47 @@
"type": "array"
}
}
-}
RequestHeaders
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
Body
{
- "chapters": [
- {
- "title": "Introduction",
- "content": "..."
- },
- {
- "title": "Objects",
- "content": "..."
- }
- ]
+}
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