Fossil SCM

Ported in docs for /json/branch, /json/config, and json authentication/capabilities.

stephan 2020-01-28 10:46 trunk
Commit e30d67aa455862eb8816dad874f9ef87e627b945f0be960db49e48926485989d
--- a/www/json-api/api-auth.md
+++ b/www/json-api/api-auth.md
@@ -0,0 +1,12 @@
1
+# JSON API: X
2
+([⬑JSON API Index](index.md))
3
+
4
+Jump to:
5
+
6
+* [Introduction](#intro)
7
+* [Capabilities (Access Rights)](#capabilities)
8
+* [Login](#l"authToken"authTokenro)
9
+* [Capabilities (Access Rights)](#capabilities)
10
+* [Login](#l# JSON API:Note that fossil uses a
11
+ attacks, so there
12
+ token. That said, the
--- a/www/json-api/api-auth.md
+++ b/www/json-api/api-auth.md
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
--- a/www/json-api/api-auth.md
+++ b/www/json-api/api-auth.md
@@ -0,0 +1,12 @@
1 # JSON API: X
2 ([⬑JSON API Index](index.md))
3
4 Jump to:
5
6 * [Introduction](#intro)
7 * [Capabilities (Access Rights)](#capabilities)
8 * [Login](#l"authToken"authTokenro)
9 * [Capabilities (Access Rights)](#capabilities)
10 * [Login](#l# JSON API:Note that fossil uses a
11 attacks, so there
12 token. That said, the
--- a/www/json-api/api-branch.md
+++ b/www/json-api/api-branch.md
@@ -0,0 +1,86 @@
1
+# JSON API: /branch
2
+([⬑JSON API Index](index.md))
3
+
4
+Jump to:
5
+
6
+* [Branch List](#list)
7
+* [Create Branch](#create)
8
+
9
+---
10
+
11
+<a id="list"></a>
12
+# Branch List
13
+
14
+**Status:** implemented, at least in draft form, on 20110921.
15
+
16
+**Required privileges:** "o"
17
+
18
+**Request:** `/json/branch/list`
19
+
20
+**Response payload example:**
21
+
22
+```json
23
+{
24
+"range":"closed",
25
+"current":"json", /* only when there is a local opened checkout */
26
+"branches":[
27
+ "artifact_description",
28
+ "bch",
29
+ "ben-changes-report",
30
+ "ben-safe-make",
31
+ "ben-security",
32
+ "ben-testing",
33
+
34
+]
35
+}
36
+```
37
+
38
+*Potential* TODO: add "tip" property which names the most recently
39
+modified branch? (How to get this?)
40
+
41
+HTTP GET/`POST.payload` options:
42
+
43
+- `range`: a string in the set ("open", "closed", "all"),
44
+ case-sensitive, but only the first letter is actually evaluated.
45
+ Default="open". Only branches with this state are returned.
46
+
47
+CLI mode options (same semantics as HTTP equivalents), must come last on
48
+the CLI:
49
+
50
+- `-r|--range all|closed|open`
51
+- `-a` (equivalent to `-r all`)
52
+- `-c` (equivalent to `-r closed`). Only one of `-a`/`-c` may be specified,
53
+ and if both are specified then which one takes precedence is
54
+ unspecified.
55
+
56
+
57
+<a id="create"></a>
58
+# Create Branch
59
+
60
+**Status:** implemented 20111002
61
+
62
+**Required privileges:** "w"
63
+
64
+**Request:** `/json/branch/create`
65
+
66
+**Request options:**
67
+
68
+- `name=string` (REQUIRED) Name of new branch
69
+- `basis=string` (default=trunk) Name of parent branch to branch from.
70
+- `bgColor=string` (default=something ugly) In `#RRGGBB` form. (FIXME:
71
+ change the default to use fossil's random bgcolor technique.)
72
+- `private=bool` (default=false) Determines whether the branch is
73
+ private or not.
74
+
75
+**Response payload example:**
76
+
77
+```json
78
+{
79
+"name":"my-branch",
80
+"basis":"my-other-branch",
81
+"uuid":"de8115db4ce388ed8d0af666ae7d90e1410be4ca",
82
+"isPrivate":true,
83
+"bgColor":"#ff0000"
84
+}
85
+```
86
+
--- a/www/json-api/api-branch.md
+++ b/www/json-api/api-branch.md
@@ -0,0 +1,86 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
--- a/www/json-api/api-branch.md
+++ b/www/json-api/api-branch.md
@@ -0,0 +1,86 @@
1 # JSON API: /branch
2 ([&#x2b11;JSON API Index](index.md))
3
4 Jump to:
5
6 * [Branch List](#list)
7 * [Create Branch](#create)
8
9 ---
10
11 <a id="list"></a>
12 # Branch List
13
14 **Status:** implemented, at least in draft form, on 20110921.
15
16 **Required privileges:** "o"
17
18 **Request:** `/json/branch/list`
19
20 **Response payload example:**
21
22 ```json
23 {
24 "range":"closed",
25 "current":"json", /* only when there is a local opened checkout */
26 "branches":[
27 "artifact_description",
28 "bch",
29 "ben-changes-report",
30 "ben-safe-make",
31 "ben-security",
32 "ben-testing",
33
34 ]
35 }
36 ```
37
38 *Potential* TODO: add "tip" property which names the most recently
39 modified branch? (How to get this?)
40
41 HTTP GET/`POST.payload` options:
42
43 - `range`: a string in the set ("open", "closed", "all"),
44 case-sensitive, but only the first letter is actually evaluated.
45 Default="open". Only branches with this state are returned.
46
47 CLI mode options (same semantics as HTTP equivalents), must come last on
48 the CLI:
49
50 - `-r|--range all|closed|open`
51 - `-a` (equivalent to `-r all`)
52 - `-c` (equivalent to `-r closed`). Only one of `-a`/`-c` may be specified,
53 and if both are specified then which one takes precedence is
54 unspecified.
55
56
57 <a id="create"></a>
58 # Create Branch
59
60 **Status:** implemented 20111002
61
62 **Required privileges:** "w"
63
64 **Request:** `/json/branch/create`
65
66 **Request options:**
67
68 - `name=string` (REQUIRED) Name of new branch
69 - `basis=string` (default=trunk) Name of parent branch to branch from.
70 - `bgColor=string` (default=something ugly) In `#RRGGBB` form. (FIXME:
71 change the default to use fossil's random bgcolor technique.)
72 - `private=bool` (default=false) Determines whether the branch is
73 private or not.
74
75 **Response payload example:**
76
77 ```json
78 {
79 "name":"my-branch",
80 "basis":"my-other-branch",
81 "uuid":"de8115db4ce388ed8d0af666ae7d90e1410be4ca",
82 "isPrivate":true,
83 "bgColor":"#ff0000"
84 }
85 ```
86
--- a/www/json-api/api-config.md
+++ b/www/json-api/api-config.md
@@ -0,0 +1,36 @@
1
+# JSON API: /config
2
+([&#x2b11;JSON API Index](index.md))
3
+
4
+Jump to:
5
+
6
+* [Get Config](#get)
7
+* [Set Config](#set)
8
+
9
+---
10
+
11
+<a id="get"></a>
12
+# Fetch Config
13
+
14
+**Status:** Implemented 20120217
15
+
16
+**Required permissions:** "s"
17
+
18
+**Request:** `/json/config/get/Area[/Area2/...AreaN]`
19
+
20
+Where "Area" can be any combination of: *skin*, *ticket*, *project*,
21
+*all*, or *skin-backup* (which is not included in "all" by default).
22
+
23
+**Response payload example:**
24
+
25
+```json
26
+{
27
+"ignore-glob":"*~",
28
+"project-description":"For testing Fossil's JSON API.",
29
+"project-name":"fossil-json-tests"
30
+}
31
+```
32
+
33
+<a id="set"></a>
34
+# Set/Modify Config
35
+
36
+Not implemented.
--- a/www/json-api/api-config.md
+++ b/www/json-api/api-config.md
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
--- a/www/json-api/api-config.md
+++ b/www/json-api/api-config.md
@@ -0,0 +1,36 @@
1 # JSON API: /config
2 ([&#x2b11;JSON API Index](index.md))
3
4 Jump to:
5
6 * [Get Config](#get)
7 * [Set Config](#set)
8
9 ---
10
11 <a id="get"></a>
12 # Fetch Config
13
14 **Status:** Implemented 20120217
15
16 **Required permissions:** "s"
17
18 **Request:** `/json/config/get/Area[/Area2/...AreaN]`
19
20 Where "Area" can be any combination of: *skin*, *ticket*, *project*,
21 *all*, or *skin-backup* (which is not included in "all" by default).
22
23 **Response payload example:**
24
25 ```json
26 {
27 "ignore-glob":"*~",
28 "project-description":"For testing Fossil's JSON API.",
29 "project-name":"fossil-json-tests"
30 }
31 ```
32
33 <a id="set"></a>
34 # Set/Modify Config
35
36 Not implemented.
--- www/json-api/api-index.md
+++ www/json-api/api-index.md
@@ -12,13 +12,13 @@
1212
changed at any time until we find/implement useful APIs.
1313
1414
The APIs, alphabetically by category:
1515
1616
* [Artifact Info](api-artifact.md)
17
-* TODO [Authentication](api-auth.md)
18
-* TODO [Branches](api-branches.md)
19
-* TODO [Config](api-config.md)
17
+* [Authentication](api-auth.md)
18
+* [Branches](api-branch.md)
19
+* [Config](api-config.md)
2020
* TODO [Diffs](api-diffs.md)
2121
* TODO [Directory Listing](api-dir.md)
2222
* TODO [File Info](api-finfo.md)
2323
* TODO [SQL Query](api-query.md)
2424
* TODO [Stats](api-stats.md)
2525
--- www/json-api/api-index.md
+++ www/json-api/api-index.md
@@ -12,13 +12,13 @@
12 changed at any time until we find/implement useful APIs.
13
14 The APIs, alphabetically by category:
15
16 * [Artifact Info](api-artifact.md)
17 * TODO [Authentication](api-auth.md)
18 * TODO [Branches](api-branches.md)
19 * TODO [Config](api-config.md)
20 * TODO [Diffs](api-diffs.md)
21 * TODO [Directory Listing](api-dir.md)
22 * TODO [File Info](api-finfo.md)
23 * TODO [SQL Query](api-query.md)
24 * TODO [Stats](api-stats.md)
25
--- www/json-api/api-index.md
+++ www/json-api/api-index.md
@@ -12,13 +12,13 @@
12 changed at any time until we find/implement useful APIs.
13
14 The APIs, alphabetically by category:
15
16 * [Artifact Info](api-artifact.md)
17 * [Authentication](api-auth.md)
18 * [Branches](api-branch.md)
19 * [Config](api-config.md)
20 * TODO [Diffs](api-diffs.md)
21 * TODO [Directory Listing](api-dir.md)
22 * TODO [File Info](api-finfo.md)
23 * TODO [SQL Query](api-query.md)
24 * TODO [Stats](api-stats.md)
25

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button