Status Page MVC: JSON format and endpoints
This issue tracks the definition of the JSON format and endpoints used in the MVC.
backend creates static JSON files using a here-defined format and uploads them to a specific location (endpoints).
frontend fetches data from these defined JSON endpoints.
Proposal
incident/:id.json
See #205165 (closed)
{
// Uniq per project (AKA Issue iid)
"id": 3,
"status": "opened" | "closed",
"title": "Title with rendered HTML",
"description": "Can also contain <b>html</b> content",
// Currently, only used by the backend
"updated_at": "2020-02-21T07:10:46.097Z",
"created_at": "2020-02-21T07:05:38.261Z"
"comments": [{
"note": "Content with embedded HTML",
"created_at": "2020-02-21T07:05:38.261Z"
}]
}
list.json
See #205167 (closed)
[
{
// Uniq per project (AKA Issue iid)
"id": 3,
"status": "opened" | "closed",
"title": "Title with rendered HTML",
"description": "Can also contain <b>html</b> content",
// Currently, only used by the backend
"updated_at": "2020-02-21T07:10:46.097Z",
"created_at": "2020-02-21T07:05:38.261Z"
// Note, no `comments`
}
]
Difference to the previous format
-
status
(open
|closed
)➡ status
(opened
|closed
) -
created
➡ created_at
-
history
➡ comments
- In
comments
-
date
➡ created_at
-
comment
➡ note
-
Previous formats
Click to expand
In #35430 (closed) we used the following format and endpoints:
mock.json
[
{
"id": 1,
"title": "incident #1",
"status": "open" | "closed",
"description": "markdown content here",
"service": "git",
"created": "2019-11-30T16:59:22+00:0",
"history": [
{
"date": "2019-11-30T16:59:22+00:0",
"comment": "Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit..."
}
]
}
]
Collaboration is encouraged
Let's iterate quickly and feel free to comment and suggest changes to this format!
Documentation
We tracking the documentation of this API in #211447 (closed).
Edited by Peter Leitzen