Fossil

JSON API: /timeline
Login

(⬑JSON API Index)

Jump to:


Introduction

These requests return overview-level information about various types of changes. The response payload differs for each artifact type, and the current structures are almost certainly not "final" (e.g. we are still undecided on how/whether to handle artifact links within commit messages and whatnot).

By default the entries are returned in chronological order from newest to oldest, but some options might change that.

FIXME (20120623): we have some inconsistent type vs. eventType in the result sets. type is the current preferred choice (and it seems unlikely that eventType is actually used in any client code). We don't actually need either one (but a use for type is easily envisioned), and we may get rid of both.

Common request options (via CLI, GET or POST.payload):

Branch Timeline

Status: partially implemented but undocumented because the utility of the current impl is under question. It also doesn't understand most of the common timeline options.

Checkin Timeline

Status: implemented 201109xx

Required privileges: "o"

Request: /json/timeline/checkin

Response payload example:

{
"limit": number, /* if not set, all records are returned */
"timeline":[{
  "uuid":"be700e84336941ef1bcd08d676310b75b9070f43",
  "timestamp":1317094090,
  "comment":"Added /json/timeline/ci showFiles to ajax test page.",
  "user":"stephan",
  "isLeaf":true,
  "bgColor":null, /* not quite sure why this is null? */
  "type":"ci",
  "parents": ["primary parent hash", "...other parent hashes"],
  "tags":["json"],
  "files":[{
    "name":"ajax/index.html",
    "uuid":"9f00773a94cea6191dc3289aa24c0811b6d0d8fe",
    "parent":"50e337c33c27529e08a7037a8679fb84b976ad0b",
    "state":"modified"
   }]
 },...]
}

(Achtung: the parents property was called prevUuid prior to 20120316.)

The parents property lists the checkins which were parents of this commit. The first entry in the array is the "primary parent" - the one which was not involved in a merge with the child.

Request options:

Technote (formerly Event) Timeline

Status: implemented 20180803

Required privileges: "j"

Request:

Response payload example:

{
"limit": number, /* if not set, all records are returned */
"timeline":[{
  "name":"8d18bf27e9f9ff8b9017edd55afc35701407d418",
  "uuid":"b23962c88c123924a77fd663e91af094780d920a",
  "timestamp":1478376113,
  "comment":"Style update due to [8d880f0bb4]",
  "user":"andygoth",
  "eventType":"e"
 },...]
}

The uuid of each entry can be passed to /json/artifact to fetch the raw event content.

Ticket Timeline

Status: implemented 201109xx

Required privileges: "r" or "o"

Request: /json/timeline/ticket

Response payload example:

{
  "limit": number, /* if not set, all records are returned */
  "timeline":[{
    "uuid":"5065a5da060e181da49a618f8ae5dc245215e95b",
    "timestamp":1316511322,
    "user":"stephan",
    "eventType":"t",
    "comment":"Ticket [b64435dba9] <i>How to...</i>",
    "briefComment":"Ticket [b64435dba9]: 2 changes",
    "ticketUuid":"b64435dba9cceb709bd54fbc5883884d73f93491"
  },...]
}

Notice that there are two hashes for tickets - uuid is the change hash and ticketUuid is the actual ticket’s hash. This is an unfortunate discrepancy vis-a-vis the other timeline entries, which only have one hash. We may want to swap uuid to mean the ticket hash and change uuid to commitHash.

Wiki Timeline

Status: implemented 201109xx

Required privileges: "j" or "o"

Requests:

Response payload example:

{
"limit": number, /* if not set, all records are returned */
"timeline":[{
  "uuid":"4b2026f06eb48eaf187209fcb05ba5438c3b0ef0",
  "timestamp":1331351121,
  "comment":"Changes to wiki page [Page3]",
  "user":"stephan",
  "eventType":"w"
 },...]
}

The uuid of each entry can be passed to /json/artifact or /json/wiki/get?uuid=... to fetch the raw page and the hash of the parent version.