=== Helix Versioning Engine Users [[get_p4_vX_users]] ==== `GET /p4/v[api]/users` Lists available users in the system. The resources of this list are summaries of users 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_users.html[`p4 -ztag users`] command. For more field information refer to the http://www.perforce.com/perforce/doc.current/manuals/cmdref/p4_users.html[command reference]. See <<error_responses>> for the format of failures. An example response body might look like: [source,json] ---- [ { "User": "jdoe", "Update": "1437690307", "Access": "1438019139", "FullName": "John Doe", "Email": "jdoe@example.com", "Type": "standard", "Password": "enabled" }, { "User": "mmustermann", "Update": "1437690307", "Access": "1437690307", "FullName": "Max Mustermann", "Email": "max_mower_CTODZMDQ@example.com", "Type": "standard", "Password": "enabled" } ] ---- ===== Ruby Client See link:./helix_web_services_client_ruby/HelixWebServicesClient.html#users-instance_method[`HelixWebServicesClient#users`] [[post_p4_vX_users]] ==== `POST /p4/v[api]/users` Creates a new user specification, like the `p4 user` command. There are no other parameters to this method. Your server permissions may vary, but this command generally requires super user access. ===== 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_user.html[p4 user] command. [source,json] ---- { "User": "new_user", "FullName": "New User", "Email": "new_user@example.com" } ---- ===== Response Headers [cols="2*", options="header"] |=== | Header Name | Notes | `Content-Type` | `application/json` |=== ===== Ruby Client SDK Usage See link:./helix_web_services_client_ruby/HelixWebServicesClient.html#create_user-instance_method[`HelixWebServicesClient#create_user`] [source,ruby] ---- user.create_user({ "User" => "new_user", "FullName" => "New User", "Email" => "new_user@example.com" }) ---- [[get_p4_vX_users_user]] ==== `GET /p4/v[api]/users/[user]` Return user details, similar to the `p4 user -o` command. ===== Request URL Path Parameters [cols="2*", options="header"] |=== | Parameter | Description | `api` | The Helix Versioning Engine API level. | user | The `User` property of the user specification (i.e., the login string). |=== ===== 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_user.html[`p4 -ztag user [user name]`] command. Example JSON response: [source,json] ---- { "User": "jdoe", "Type": "standard", "Email": "jdoe@example.com", "Update": "2015/07/23 15:25:07", "Access": "2015/07/27 10:53:14", "FullName": "John Doe", "AuthMethod": "perforce", "passwordChange": "2015/07/23 15:25:07" } ---- ===== Ruby Client See link:./helix_web_services_client_ruby/HelixWebServicesClient.html#user_details-instance_method[`HelixWebServicesClient#user_details`] [[patch_p4_vX_users_user]] ==== `PATCH /p4/v[api]/users/[user]` Update user specifications, similar to the `p4 user` command. Only the specified parameters in the body will be changed. Your server permissions may vary, but this command generally requires super user access to operate on a different user than the authenticated account. ===== Request URL Path Parameters [cols="2*", options="header"] |=== | Parameter | Description | `api` | The Helix Versioning Engine API level. | user | The `User` property of the user specification (i.e., the login string). |=== ===== 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_user.html[`p4 -ztag user [user name]`] command. For example, to update the user email: [source,json] ---- { "Email": "new_email@example.com" } ---- ===== Response Headers [cols="2*", options="header"] |=== | Header Name | Notes | `Content-Type` | `application/json` |=== ===== Ruby Client See link:./helix_web_services_client_ruby/HelixWebServicesClient.html#update_user-instance_method[`HelixWebServicesClient#update_user`] [source,ruby] ---- user.update_user({ "Email" => "new_email@example.com" }) ---- [[delete_p4_vX_users_user]] ===== `DELETE /p4/v[api]/users/[user]` Removes the user specification, similar to the `p4 user -d` command. Your server permissions may vary, but this command generally requires super user access. ===== Request URL Path Parameters [cols="2*", options="header"] |=== | Parameter | Description | `api` | The Helix Versioning Engine API level. | user | The `User` property of the user specification (i.e., the login string). |=== ===== 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_user-instance_method[`HelixWebServicesClient#delete_user`]
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 16114 | Doug Scheirer | Merge from main | ||
//guest/doug_scheirer/helix-web-services/main/source/doc/helix_versioning_engine/users.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/users.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/users.asc | |||||
#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 | 15188 | tjuricek | Execute user modification commands as the super user in tests. | ||
#2 | 15185 | tjuricek | Update user spec management implementation, tests, and documentation. | ||
#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/users.asc | |||||
#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. |