|
1
|
# JSON API: /finfo |
|
2
|
([⬑JSON API Index](index.md)) |
|
3
|
|
|
4
|
# File Information |
|
5
|
|
|
6
|
**Status:** implemented 2012-something, but output structure is likely |
|
7
|
to change. |
|
8
|
|
|
9
|
**Required privileges:** "o" |
|
10
|
|
|
11
|
**Request:** `/json/finfo?name=path/to/file` |
|
12
|
|
|
13
|
Options: |
|
14
|
|
|
15
|
- `name=string`. Required. Use the absolute name of the file, including |
|
16
|
any directory parts, and without a leading slash. e.g. |
|
17
|
`"path/to/my.c"`.\ |
|
18
|
CLI mode: `--name` or positional argument. |
|
19
|
- `checkin=string`. Only return info related to this specific checkin, |
|
20
|
as opposed to listing all checkins. If set, neither "before" nor |
|
21
|
"after" have any effect.\ |
|
22
|
CLI mode: `--checkin|-ci` |
|
23
|
- `before=DATETIME` only lists checkins from on or before this time.\ |
|
24
|
CLI mode: `--before|-b` |
|
25
|
- `after=DATETIME` only lists checkins from on or after this time. |
|
26
|
Using this option swaps the sort order, to provide reasonable |
|
27
|
behaviour in conjunction with the limit option.\ |
|
28
|
Only one of "before" and "after" may be specified, and if both are |
|
29
|
specified then which one takes precedence is unspecified.\ |
|
30
|
CLI mode: `--after|-a` |
|
31
|
- `limit=integer` limits the output to (at most) the given number of |
|
32
|
associated checkins.\ |
|
33
|
CLI mode: `--limit|-n` |
|
34
|
|
|
35
|
**Response payload example (very likely to change!):** |
|
36
|
|
|
37
|
```json |
|
38
|
{ |
|
39
|
"name":"ajax/i-test/rhino-shell.js", |
|
40
|
"checkins":[{ |
|
41
|
"checkin":"6b7ddfefbfb871f793378d8f276fe829106ca49b", |
|
42
|
"uuid":"2b735676d55e3d06d670ffbc643e5d3f748b95ea", |
|
43
|
"timestamp":1329514170, |
|
44
|
"user":"viriketo", |
|
45
|
"comment":"<...snip...>", |
|
46
|
"size":6293, |
|
47
|
"state":"added|modified|removed" |
|
48
|
},…] |
|
49
|
} |
|
50
|
``` |
|
51
|
|
|
52
|
**FIXME:** there is a semantic discrepancy between `/json/artifact`'s |
|
53
|
`payload.checkins[N].uuid` and this command's. |
|
54
|
|