Skip to content

Commit 43d06be

Browse files
author
Frederic Collonval
committed
Update API documentation
1 parent d3a11eb commit 43d06be

File tree

2 files changed

+51
-38
lines changed

2 files changed

+51
-38
lines changed

specification/Git_REST_API.md

Lines changed: 3 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -291,43 +291,7 @@ On failure
291291
}
292292
```
293293

294-
### /config - Get or add global configuration options
295-
296-
URL:
297-
298-
```bash
299-
GET /git/config
300-
```
301-
302-
HTTP Response
303-
304-
```bash
305-
Status: 200 OK
306-
```
307-
308-
Reply JSON:
309-
310-
On success
311-
312-
```bash
313-
{
314-
"code": "0",
315-
"options": {
316-
"key1": "value1",
317-
"keyI": "valueI"
318-
}
319-
}
320-
```
321-
322-
On failure
323-
324-
```bash
325-
{
326-
"code": 128,
327-
"command": "git config --global --list"
328-
"message": "Git command error info"
329-
}
330-
```
294+
### /config - Get or set configuration options
331295

332296
URL:
333297

@@ -339,6 +303,7 @@ Request JSON:
339303

340304
```bash
341305
{
306+
"top_repo_path": "/absolute/path/to/root/of/repo",
342307
"options": {
343308
"key1": "value1",
344309
"keyI": "valueI"
@@ -368,7 +333,7 @@ On failure
368333
```bash
369334
{
370335
"code": 128,
371-
"command": "git config --global --add name value"
336+
"command": "git config --add name value"
372337
"message": "Git command error info"
373338
}
374339
```

specification/Git_REST_API.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,54 @@ on git command failure
249249
}
250250
```
251251

252+
### /config - Get or set configuration options
253+
Request or set configuration options for the repository provided by its path
254+
255+
URL:
256+
257+
```bash
258+
POST /git/config
259+
```
260+
261+
Request JSON:
262+
263+
```bash
264+
{
265+
"top_repo_path": "/absolute/path/to/root/of/repo",
266+
"options": {
267+
"key1": "value1",
268+
"keyI": "valueI"
269+
}
270+
}
271+
```
272+
273+
HTTP Response
274+
275+
```bash
276+
Status: 201 OK
277+
```
278+
279+
Reply JSON:
280+
281+
On success
282+
283+
```bash
284+
{
285+
"code": "0",
286+
"message": "Git command output"
287+
}
288+
```
289+
290+
On failure
291+
292+
```bash
293+
{
294+
"code": 128,
295+
"command": "git config --add name value"
296+
"message": "Git command error info"
297+
}
298+
```
299+
252300
### git detailed_log - Get detailed information of a selected past commit
253301
Request with a specified "selected_hash" and a "current_path" to get the detail info of this commit.
254302

0 commit comments

Comments
 (0)