Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Difference between revisions of "Orion/Server API/Git API"
< Orion | Server API
(→File representation extension) |
(index) |
||
Line 23: | Line 23: | ||
{{Orion/ServerAPI | {{Orion/ServerAPI | ||
| method = GET | | method = GET | ||
− | | overview = To retrieve | + | | overview = To retrieve changes between selected commits, commit and working tree, and so on. Send a GET request to the git diff location. |
| reqhead = /git/diff/file/MyProj/ | | reqhead = /git/diff/file/MyProj/ | ||
| resphead = 200 OK | | resphead = 200 OK | ||
Line 33: | Line 33: | ||
}} | }} | ||
− | + | === Getting a file content from index === | |
+ | |||
+ | {{Orion/ServerAPI | ||
+ | | method = GET | ||
+ | | overview = To retrieve file content kept in index. Send a GET request to the git index location. | ||
+ | | reqhead = /git/index/file/MyProj/file.txt | ||
+ | | resphead = 200 OK | ||
+ | Content-Type: text/plain | ||
+ | Content-Length: 22 | ||
+ | | respbody = | ||
+ | TBD | ||
+ | | explain = TBD. | ||
+ | }} | ||
+ | |||
+ | |||
+ | Progress is being tracked on [https://bugs.eclipse.org/bugs/show_bug.cgi?id=337212 bug 337212]. | ||
== Other operations == | == Other operations == |
Revision as of 10:22, 18 February 2011
The Git API is a web server API for browsing and manipulating Git repositories.
Contents
Actions
Getting status for a git project
- Overview
- To retrieve the working tree status of a project, send a GET request to the git status location.
- HTTP Method
- GET
- Example Request
GET /git/status/file/MyProj/
- Example Response
HTTP/1.1 200 OK
Content-Type: text/plain
Content-Length: 22
TBD
- Detailed Explanation
- TBD.
Progress in being tracked on bug 337212.
Getting a diff
- Overview
- To retrieve changes between selected commits, commit and working tree, and so on. Send a GET request to the git diff location.
- HTTP Method
- GET
- Example Request
GET /git/diff/file/MyProj/
- Example Response
HTTP/1.1 200 OK
Content-Type: text/plain
Content-Length: 22
TBD
- Detailed Explanation
- TBD.
Getting a file content from index
- Overview
- To retrieve file content kept in index. Send a GET request to the git index location.
- HTTP Method
- GET
- Example Request
GET /git/index/file/MyProj/file.txt
- Example Response
HTTP/1.1 200 OK
Content-Type: text/plain
Content-Length: 22
TBD
- Detailed Explanation
- TBD.
Progress is being tracked on bug 337212.
Other operations
TBD, see bug 336116
JSON representations
File representation extension
The JSON representation for files and directories used by file API may be extended as follows: Required fields are shown in bold. A client cannot rely on the existence of non-required attribute in a file representation from a given Orion server.
Field | Data type | Value |
---|---|---|
GitDiff | URI | Location of Git Diff resource |
GitStatus | URI | Location of Git Status resource |