Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Difference between revisions of "Orion/Server API/Site Configuration API"
< Orion | Server API
(Created page) |
|||
Line 1: | Line 1: | ||
TODO | TODO | ||
− | + | ||
− | The | + | The Site Configuration API is a web server API for creating, editing, starting and stopping site configurations. |
== Actions == | == Actions == | ||
− | === Getting | + | === Getting all site configurations === |
{{Orion/ServerAPI | {{Orion/ServerAPI | ||
| method = GET | | method = GET | ||
| overview = To retrieve the working tree status of a project, send a GET request to the git status location. | | overview = To retrieve the working tree status of a project, send a GET request to the git status location. | ||
− | | reqhead = / | + | | reqhead = /site |
| resphead = 200 OK | | resphead = 200 OK | ||
Content-Type: text/plain | Content-Type: text/plain | ||
Line 19: | Line 19: | ||
}} | }} | ||
− | Progress in being tracked on [https://bugs.eclipse.org/bugs/show_bug.cgi?id= | + | Progress in being tracked on [https://bugs.eclipse.org/bugs/show_bug.cgi?id=335789 Bug 335789]. |
− | === Getting a | + | === Getting a site configuration by Id === |
{{Orion/ServerAPI | {{Orion/ServerAPI | ||
| method = GET | | method = GET | ||
| overview = To retrieve changes between selected commits, commit and working tree, and so on. Send a GET request to the git diff location. | | overview = To retrieve changes between selected commits, commit and working tree, and so on. Send a GET request to the git diff location. | ||
− | | reqhead = / | + | | reqhead = /site/siteConfigurationId |
| resphead = 200 OK | | resphead = 200 OK | ||
Content-Type: text/plain | Content-Type: text/plain | ||
Line 35: | Line 35: | ||
}} | }} | ||
− | === | + | === Creating a site configuration === |
{{Orion/ServerAPI | {{Orion/ServerAPI | ||
− | | | + | | overview = Overview |
− | | | + | | method = POST |
− | | reqhead = / | + | | reqhead = /site HTTP/1.1 |
− | + | Orion-Version: 1.0 | |
− | + | Content-Length: 48 | |
− | + | Content-Type: application/json | |
− | | | + | Slug: myfolder |
− | + | | reqbody = { | |
− | | explain = | + | "Name" : "myfolder", |
+ | "Directory" : "true" | ||
+ | } | ||
+ | | resphead = 201 OK | ||
+ | | respbody = { | ||
+ | "Name" : "myfolder", | ||
+ | "Location" : "http://example.com/file/MyProj/myfolder", | ||
+ | "ETag" : "35fd43td3", | ||
+ | "LocalTimeStamp" : "01234345009837", | ||
+ | "Directory" : "true" | ||
+ | "Attributes" : { | ||
+ | "ReadOnly" : "false", | ||
+ | "Executable" : "true" | ||
+ | } | ||
+ | } | ||
+ | | explain = See [[EclipseWeb/Server_API/File_API#Notes_on_POST_method|Notes on POST method]] for further details. | ||
}} | }} | ||
Line 79: | Line 94: | ||
| Location of Git Index resource | | Location of Git Index resource | ||
|} | |} | ||
− | |||
− |
Revision as of 12:56, 28 February 2011
TODO
The Site Configuration API is a web server API for creating, editing, starting and stopping site configurations.
Contents
Actions
Getting all site configurations
- 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 /site
- Example Response
HTTP/1.1 200 OK
Content-Type: text/plain
Content-Length: 22
TBD
- Detailed Explanation
- TBD.
Progress in being tracked on Bug 335789.
Getting a site configuration by Id
- 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 /site/siteConfigurationId
- Example Response
HTTP/1.1 200 OK
Content-Type: text/plain
Content-Length: 22
TBD
- Detailed Explanation
- TBD.
Creating a site configuration
- Overview
- Overview
- HTTP Method
- POST
- Example Request
POST /site HTTP/1.1
Orion-Version: 1.0
Content-Length: 48
Content-Type: application/json
Slug: myfolder
{
"Name" : "myfolder",
"Directory" : "true"
}
- Example Response
HTTP/1.1 201 OK { "Name" : "myfolder", "Location" : "http://example.com/file/MyProj/myfolder", "ETag" : "35fd43td3", "LocalTimeStamp" : "01234345009837", "Directory" : "true" "Attributes" : { "ReadOnly" : "false", "Executable" : "true" } }
- Detailed Explanation
- See Notes on POST method for further details.
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 |
---|---|---|
Git.DiffLocation | URI | Location of Git Diff resource |
Git.StatusLocation | URI | Location of Git Status resource |
Git.IndexLocation | URI | Location of Git Index resource |