J•Feed Documentation
Feeds
Request all Feeds
No authentication required!
Example
curl -X GET --location "/api/v1/feed/list"
Response
The Response should be in JSON format and consist of an array containing Feed Objects.
[
{
"id": "cec1d263-7e58-479a-863f-3f84e7dbcaee",
"name": "My Feed",
"created": "2021-07-01T13:05:59+00:00"
},
{
"id": "cec1d263-7e58-479a-863f-3f84e7dbcaee",
"name": "My Feed 2",
"created": "2021-07-01T13:05:59+00:00"
}
]
Request a single Feed
No authentication required!
To request a single Feed, you must provide the Feeds UUID.
Example
curl -X GET --location "/api/v1/feed/show?id={{UUID}}"
Response
The Response should be in JSON format and consist one Feed Object.
{
"id": "cec1d263-7e58-479a-863f-3f84e7dbcaee",
"name": "My Feed",
"created": "2021-07-01T13:05:59+00:00"
}
Items
Request all Items
No authentication required!
Example
curl -X GET --location "/api/v1/item/list"
Example with Feed UUID
To list only Items from a single Feed, you must provide the Feeds UUID.
curl -X GET --location "/api/v1/item/list?feed={{UUID}}"
Response
The Response should be in JSON format and consist of an array containing Feed Objects.
[
{
"id": "42bf0ab9-be52-4f1d-8972-e435fd531d90",
"title": "Unicorns",
"text": "Look 'Ma, Unicorns!",
"images": [
"https://example.com/item/img?hash=42bf0ab9-be52-4f1d-8972-e435fd531d90.c5f363832a17d2b55beab2c34eb1e0a7.jpg",
"https://example.com/item/img?hash=42bf0ab9-be52-4f1d-8972-e435fd531d90.6404d7e7e3b1ae79a10ea92ac2cc20aa.jpg"
],
"created": "2021-06-29T08:11:43+00:00",
"published": "2021-06-29T08:09:49+00:00",
"author": "John Sear"
},
{
"id": "f218e528-e307-409f-8954-d16aa7789688",
"title": "Thats it!",
"text": "A new Item",
"images": [
],
"created": "2021-06-29T08:13:18+00:00",
"published": "2021-06-29T08:13:00+00:00",
"author": "John Sear"
}
]
Request a single Item
No authentication required!
To request a single Item, you must provide the Items UUID.
Example
curl -X GET --location "/api/v1/item/show?id={{UUID}}"
Response
The Response should be in JSON format and consist of an array containing one Feed Object.
{
"id": "42bf0ab9-be52-4f1d-8972-e435fd531d90",
"title": "Unicorns",
"text": "Look 'Ma, Unicorns!",
"images": [
"https://example.com/item/img?hash=42bf0ab9-be52-4f1d-8972-e435fd531d90.c5f363832a17d2b55beab2c34eb1e0a7.jpg",
"https://example.com/item/img?hash=42bf0ab9-be52-4f1d-8972-e435fd531d90.6404d7e7e3b1ae79a10ea92ac2cc20aa.jpg"
],
"created": "2021-06-29T08:11:43+00:00",
"published": "2021-06-29T08:09:49+00:00",
"author": "John Sear"
}
Mass Import of Items
Authentication with
JWTis required!
To import a bunch of new Items you need the generated JWT.
See Basic API Request and JWT documentation to learn more.
When performing the request, you must
- pass the
JWTin the Authorization request header prefixed with "Bearer ". - provide the Feed
UUID, where the Items belong to - Add JSON Content in Post Body (see structure below)
Example
Import JSON Format
{
"0": {
"date": "2021-07-03 13:41:00",
"description": "This is the Content Text",
"pictures": {
"0": {
"picture": "{{PICTURE_URL}}"
},
"1": {
"picture": "{{PICTURE_URL}}"
}
}
},
"1": {
"date": "2021-07-02 14:40:00",
"description": "This is the Content Text for Item 2",
"pictures": {
"0": {
"picture": "{{PICTURE_URL}}"
},
"1": {
"picture": "{{PICTURE_URL}}"
},
"2": {
"picture": "{{PICTURE_URL}}"
}
}
}
}
Import Request
curl -X POST --location "/api/v1/item/mass-import?feed={{UUID}}" -H "Authorization: Bearer {{JWT}}" -H "Content-Type: application/json" -d "{{JSON_CONTENT}}"
Response
The Response should be in JSON format and consist of an array with the count of items to add and the count of added items.
{
"success": true,
"result": {
"toAdd": 2,
"added": 1
}
}