Resources
Entries
Get entries
Without paging parameters
Example request
$ curl 'http://localhost:8080/api/entries' -i
GET /api/entries HTTP/1.1
Host: localhost
Example response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 982
{
"content" : [ {
"entryId" : 2,
"content" : "Spring Boot!",
"created" : {
"name" : "making",
"date" : "2016-08-26T06:11:28.855Z"
},
"updated" : {
"name" : "making",
"date" : "2016-08-26T06:11:28.855Z"
},
"frontMatter" : {
"title" : "Hello Spring Boot",
"tags" : [ "Java", "Spring", "SpringBoot" ],
"categories" : [ "Programming", "Java", "Spring", "Boot" ]
}
}, {
"entryId" : 1,
"content" : "Java8!",
"created" : {
"name" : "making",
"date" : "2016-08-26T06:11:28.855Z"
},
"updated" : {
"name" : "making",
"date" : "2016-08-26T06:11:28.855Z"
},
"frontMatter" : {
"title" : "Hello Java8",
"tags" : [ "Java", "Java8", "Stream" ],
"categories" : [ "Programming", "Java" ]
}
} ],
"totalElements" : 2,
"last" : true,
"totalPages" : 1,
"sort" : null,
"numberOfElements" : 2,
"first" : true,
"size" : 0,
"number" : 0
}
With paging parameters
Example request
$ curl 'http://localhost:8080/api/entries?page=1&size=2' -i
GET /api/entries?page=1&size=2 HTTP/1.1
Host: localhost
Example response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 985
{
"content" : [ {
"entryId" : 2,
"content" : "Spring Boot!",
"created" : {
"name" : "making",
"date" : "2016-08-26T06:11:30.843Z"
},
"updated" : {
"name" : "making",
"date" : "2016-08-26T06:11:30.843Z"
},
"frontMatter" : {
"title" : "Hello Spring Boot",
"tags" : [ "Java", "Spring", "SpringBoot" ],
"categories" : [ "Programming", "Java", "Spring", "Boot" ]
}
}, {
"entryId" : 1,
"content" : "Java8!",
"created" : {
"name" : "making",
"date" : "2016-08-26T06:11:30.843Z"
},
"updated" : {
"name" : "making",
"date" : "2016-08-26T06:11:30.843Z"
},
"frontMatter" : {
"title" : "Hello Java8",
"tags" : [ "Java", "Java8", "Stream" ],
"categories" : [ "Programming", "Java" ]
}
} ],
"totalElements" : 10,
"last" : false,
"totalPages" : 5,
"sort" : null,
"numberOfElements" : 2,
"first" : false,
"size" : 2,
"number" : 1
}
Exclude content
Example request
$ curl 'http://localhost:8080/api/entries?excludeContent=true' -i
GET /api/entries?excludeContent=true HTTP/1.1
Host: localhost
Example response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 924
{
"content" : [ {
"entryId" : 2,
"created" : {
"name" : "making",
"date" : "2016-08-26T06:11:30.665Z"
},
"updated" : {
"name" : "making",
"date" : "2016-08-26T06:11:30.665Z"
},
"frontMatter" : {
"title" : "Hello Spring Boot",
"tags" : [ "Java", "Spring", "SpringBoot" ],
"categories" : [ "Programming", "Java", "Spring", "Boot" ]
}
}, {
"entryId" : 1,
"created" : {
"name" : "making",
"date" : "2016-08-26T06:11:30.665Z"
},
"updated" : {
"name" : "making",
"date" : "2016-08-26T06:11:30.665Z"
},
"frontMatter" : {
"title" : "Hello Java8",
"tags" : [ "Java", "Java8", "Stream" ],
"categories" : [ "Programming", "Java" ]
}
} ],
"totalElements" : 2,
"last" : true,
"totalPages" : 1,
"sort" : null,
"numberOfElements" : 2,
"first" : true,
"size" : 0,
"number" : 0
}
Get entries by tag
Without paging parameters
Example request
$ curl 'http://localhost:8080/api/tags/Java/entries' -i
GET /api/tags/Java/entries HTTP/1.1
Host: localhost
Example response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 982
{
"content" : [ {
"entryId" : 2,
"content" : "Spring Boot!",
"created" : {
"name" : "making",
"date" : "2016-08-26T06:11:30.778Z"
},
"updated" : {
"name" : "making",
"date" : "2016-08-26T06:11:30.778Z"
},
"frontMatter" : {
"title" : "Hello Spring Boot",
"tags" : [ "Java", "Spring", "SpringBoot" ],
"categories" : [ "Programming", "Java", "Spring", "Boot" ]
}
}, {
"entryId" : 1,
"content" : "Java8!",
"created" : {
"name" : "making",
"date" : "2016-08-26T06:11:30.778Z"
},
"updated" : {
"name" : "making",
"date" : "2016-08-26T06:11:30.778Z"
},
"frontMatter" : {
"title" : "Hello Java8",
"tags" : [ "Java", "Java8", "Stream" ],
"categories" : [ "Programming", "Java" ]
}
} ],
"totalElements" : 2,
"last" : true,
"totalPages" : 1,
"sort" : null,
"numberOfElements" : 2,
"first" : true,
"size" : 0,
"number" : 0
}