-
-
Notifications
You must be signed in to change notification settings - Fork 17
Log
Davide Santangelo edited this page Oct 17, 2022
·
2 revisions
Every time a feed is imported, everything is logged into logs table.
All logs have some of the following properties, with required properties in bold:
Field | Description |
---|---|
id | The item's unique UUID. |
feed_id | The FK with the parent feed table. |
start_import_at | The moment when the import starts. |
end_import_at | The moment when the import ends. |
entries_count | The number of entries fetched. |
metadata | This is an accessory field. |
created_at | The create row DateTime. |
updated_at | The update row DateTime. |
# GET /feeds/:feed_id/logs
RestClient.get "https://<your.host>/api/feeds/:feed_id/logs", { Authorization: "Token #{TOKEN}" }
{
"data": [
{
"id": "f357678b-3ede-41e6-bb2f-56f258a83ce8",
"type": "log",
"attributes": {
"start_import_at": "2019-04-17T14:54:15.183Z",
"end_import_at": "2019-04-17T14:54:33.106Z",
"entries_count": 52
},
"relationships": {
"feed": {
"data": {
"id": "63bb067a-049a-4a20-815d-c903cd35ed32",
"type": "feed"
}
}
}
},
{
"id": "b1b048ea-05da-4d51-a98b-0743ad772da8",
"type": "log",
"attributes": {
"start_import_at": "2019-04-18T08:00:02.750Z",
"end_import_at": "2019-04-18T08:00:13.625Z",
"entries_count": 23
},
"relationships": {
"feed": {
"data": {
"id": "63bb067a-049a-4a20-815d-c903cd35ed32",
"type": "feed"
}
}
}
}
]
}
# GET /feeds/:feed_id/logs/:id
RestClient.get "https://<your.host>/api/feeds/:feed_id/logs/:id", { Authorization: "Token #{TOKEN}" }
{
"data": {
"id": "f357678b-3ede-41e6-bb2f-56f258a83ce8",
"type": "log",
"attributes": {
"start_import_at": "2019-04-17T14:54:15.183Z",
"end_import_at": "2019-04-17T14:54:33.106Z",
"entries_count": 52
},
"relationships": {
"feed": {
"data": {
"id": "63bb067a-049a-4a20-815d-c903cd35ed32",
"type": "feed"
}
}
}
}
}