=== Helix Versioning Engine Branches [[get_p4_vX_branches]] ==== `GET /p4/v[api]/branches` Lists available branches in the system. The resources of this list are summaries of branches in the system. ===== Request URL Path Parameters [cols="2*", options="header"] |=== | Parameter | Description | `api` | The Helix Versioning Engine API level. |=== ===== Request Headers [cols="2*", options="header"] |=== | Header Name | Notes | `Authorization` | See <<authentication>> | `Accept` | `application/json` | `Content-Type` | `application/json` | `X-Perforce-Helix_Web_Services-*` | See <<per_request_configuration>> |=== ===== Response Headers [cols="2*", options="header"] |=== | Header Name | Notes | `Content-Type` | `application/json` |=== ===== Response Body JSON The values of this method are based on the result of the http://www.perforce.com/perforce/doc.current/manuals/cmdref/p4_branches.html[`p4 -ztag branches`] command. For more field information refer to the http://www.perforce.com/perforce/doc.current/manuals/cmdref/p4_branches.html[command reference]. See <<error_responses>> for the format of failures. An example response body might look like: [source,json] ---- [ { "branch": "manually", "Update": "1437153920", "Access": "1437153920", "Owner": "jdoe", "Options": "unlocked", "Description": "Created by jdoe.\n" }, { "branch": "new_branch_CEUXQMYN", "Update": "1437164204", "Access": "1437164204", "Owner": "", "Options": "unlocked", "Description": "Something for the kids\n" } ] ---- ===== Ruby Client See link:./helix_web_services_client_ruby/HelixWebServicesClient.html#branches-instance_method[`HelixWebServicesClient#branches`] [[post_p4_vX_branches]] ==== `POST /p4/v[api]/branches` Creates a new branch specification, like the `p4 branch` command. There are no other parameters to this method. ===== Request URL Path Parameters [cols="2*", options="header"] |=== | Parameter | Description | `api` | The Helix Versioning Engine API level. |=== ===== Request Headers [cols="2*", options="header"] |=== | Header Name | Notes | `Authorization` | See <<authentication>> | `Accept` | `application/json` | `Content-Type` | `application/json` | `X-Perforce-Helix_Web_Services-*` | See <<per_request_configuration>> |=== ===== Request Body JSON Properties of the JSON object are the form fields of the http://www.perforce.com/perforce/doc.current/manuals/cmdref/p4_branch.html[p4 branch] command. [source,json] ---- { "Branch": "my-project-main", "Description": "Branch my project from main to dev.\n", "View": ["//depot/main/my-project/... //depot/dev/my-project/..."] } ---- ===== Response Headers [cols="2*", options="header"] |=== | Header Name | Notes | `Content-Type` | `application/json` |=== ===== Ruby Client See link:./helix_web_services_client_ruby/HelixWebServicesClient.html#create_branch-instance_method[`HelixWebServicesClient#create_branch`] [[get_p4_vX_branches_branch]] ==== `GET /p4/v[api]/branches/[branch]` Return branch details, similar to the `p4 branch -o` command. ===== Request URL Path Parameters [cols="2*", options="header"] |=== | Parameter | Description | `api` | The Helix Versioning Engine API level. | branch | The branch name. |=== ===== Request Headers [cols="2*", options="header"] |=== | Header Name | Notes | `Authorization` | See <<authentication>> | `Accept` | `application/json` | `Content-Type` | `application/json` | `X-Perforce-Helix_Web_Services-*` | See <<per_request_configuration>> |=== ===== Response Headers [cols="2*", options="header"] |=== | Header Name | Notes | `Content-Type` | `application/json` |=== ===== Response Data Returns the form fields of the http://www.perforce.com/perforce/doc.current/manuals/cmdref/p4_branch.html[`p4 -ztag branch [branch name]`] command. For more information, see the command reference. The main difference between the details and list view is the inclusion of the View field. ===== Example JSON Response [source,json] ---- { "Branch": "my-project-main", "Update": "2015/07/22 11:34:14", "Access": "2015/07/22 11:34:14", "Description": "Branch my project from main to dev.\n", "Options": "unlocked", "View": [ "//depot/main/my-project/... //depot/dev/my-project/..." ] } ---- ===== Ruby Client See link:./helix_web_services_client_ruby/HelixWebServicesClient.html#branch-instance_method[`HelixWebServicesClient#branch`] [[patch_p4_vX_branches_branch]] ==== `PATCH /p4/v[api]/branches/[branch]` Update branch specifications, similar to the `p4 branch` command. Only the specified parameters in the body will be changed. ===== Request URL Path Parameters [cols="2*", options="header"] |=== | Parameter | Description | `api` | The Helix Versioning Engine API level. | branch | The name of the branch |=== ===== Request Headers [cols="2*", options="header"] |=== | Header Name | Notes | `Authorization` | See <<authentication>> | `Accept` | `application/json` | `Content-Type` | `application/json` | `X-Perforce-Helix_Web_Services-*` | See <<per_request_configuration>> |=== ===== Request Body JSON A single JSON object containing form fields of the http://www.perforce.com/perforce/doc.current/manuals/cmdref/p4_branch.html[`p4 -ztag branch [branch name]`] command. ===== Response Headers [cols="2*", options="header"] |=== | Header Name | Notes | `Content-Type` | `application/json` |=== ===== Example JSON Request Body [source,json] ---- { "Description": "The updated my-project-main description.\n", "Owner": "saustin" } ---- ===== Ruby Client See link:./helix_web_services_client_ruby/HelixWebServicesClient.html#update_branch-instance_method[`HelixWebServicesClient#update_branch`] [source,ruby] ---- client.update_branch({ "Branch" => 'my_branch_id', "Description" => "The updated my-project-main description.\n", "Owner" => "saustin" }) ---- [[delete_p4_vX_branches_branch]] ===== `DELETE /p4/v[api]/branches/[branch]` Removes the branch specification, similar to the `p4 branch -d` command. ====== Request URL Path Parameters [cols="2*", options="header"] |=== | Parameter | Description | `api` | The Helix Versioning Engine API level. | branch | The name of the branch |=== ===== Request Headers [cols="2*", options="header"] |=== | Header Name | Notes | `Authorization` | See <<authentication>> | `Accept` | `application/json` | `Content-Type` | `application/json` | `X-Perforce-Helix_Web_Services-*` | See <<per_request_configuration>> |=== ===== Response Headers [cols="2*", options="header"] |=== | Header Name | Notes | `Content-Type` | `application/json` |=== ===== Ruby Client See link:./helix_web_services_client_ruby/HelixWebServicesClient.html#delete_branch-instance_method[`HelixWebServicesClient#delete_branch`]
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 16114 | Doug Scheirer | Merge from main | ||
//guest/doug_scheirer/helix-web-services/main/source/doc/helix_versioning_engine/branches.asc | |||||
#1 | 15688 | Doug Scheirer |
Populate -o //guest/perforce_software/helix-web-services/... //guest/doug_scheirer/helix-web-services/.... |
||
//guest/perforce_software/helix-web-services/main/source/doc/helix_versioning_engine/branches.asc | |||||
#1 | 15622 | tjuricek |
Move source code to 'source/' subdirectory of branch. build/ will remain where it is. |
||
//guest/perforce_software/helix-web-services/main/doc/helix_versioning_engine/branches.asc | |||||
#5 | 15241 | tjuricek | Add Git Fusion stubs and documentation. | ||
#4 | 15240 | tjuricek |
Set api level via request path on all Helix Versioning Engine methods. This will allow migration of applications to different P4D versions. Our internal methods (like project API) should attempt to handle backward compatibility similarly. P4WEBAPI-118 |
||
#3 | 15205 | tjuricek | Implemented tests and documentation for depot spec editing. | ||
#2 | 15188 | tjuricek | Execute user modification commands as the super user in tests. | ||
#1 | 15144 | tjuricek |
Setup stream spec tests and documentation. Also revised the documentation folder http_p4_web_api -> helix_versioning_engine |
||
//guest/perforce_software/helix-web-services/main/doc/http_p4_web_api/branches.asc | |||||
#9 | 15110 | tjuricek | Revise changes methods for new p4 connection handling, add server specs, remove model references in client, and update asciidoc documentation. | ||
#8 | 15090 | tjuricek |
Update _proposed_ API for project services. This is *very likely* to change, and will not be implemented until reviewed. |
||
#7 | 15078 | tjuricek |
clients spec method revisions Updated some other documentation. |
||
#6 | 15077 | tjuricek |
Add new 'model' technique, revised branch spec operations, test Auth::Middleware. The Ruby client now does *not* strictly type anything, but extends OpenStruct with helper methods to help deal with inconsistent data formats. See the OpenModel class documentation for more details. The Auth::Middleware class is also *finally* implemented as well. This does not take into account all possible variations of server behavior (yet), but that will happen in follow-up work. |
||
#5 | 15038 | tjuricek | Document 'login' auth method and client programming overview. | ||
#4 | 15032 | tjuricek |
Starting config and doc revisions. System is now broken while revisions underway. Configuration of the p4d connection is now done via a single HWSSettings middleware object injected into the Rack env. The HWSP4Cleanup middleware now cleans up any p4 injected into the Rack env. The Auth::App class now mostly just contains one method to generate a p4 ticket. /auth/v1/login. Added yard documentation for the main project. Yard docs have been reconfigured to dump into build/ directories. This should probably be done with each release. Hm... The top level rake file contains a task, 'all:doc', to update our documentation. This should probably be run for each checkin. Hm... Specs are now using Rack::Test on top of a 'live' p4d. I'd suggest you still use the p4util mechanism, which now dumps to a /tmp folder, so we can safely add P4IGNORE rules back into your local .p4config file. Old 'perforce' application now called 'helix_versioning_engine'. Removing cache data. Helix Sync may be slow. It may also get axed. We'll see. |
||
#3 | 14182 | tjuricek | Asciidoc conversion of the changes HTTP guide | ||
#2 | 13612 | tjuricek | Update deployment guide, switch built documentation to asciidoc, remove unused packaging script for p4_web_api | ||
#1 | 13555 | tjuricek |
Starting Asciidoc conversion of documentation. Removed the "Shared Quality" document, that basically is online now at: https://confluence.perforce.com:8443/display/PWS/Quality+Assurance Adding some topology graphviz images used for online documentation. |