Skip to content

Commit

Permalink
Updates a few api commands for technical accuracy (#1071)
Browse files Browse the repository at this point in the history
Co-authored-by: Steven Smith <stevsmit@stevsmit-thinkpadt14gen4.remote.csb>
  • Loading branch information
stevsmit and Steven Smith authored Aug 14, 2024
1 parent a2da0b8 commit 12c03d7
Show file tree
Hide file tree
Showing 25 changed files with 43 additions and 43 deletions.
2 changes: 1 addition & 1 deletion modules/api-logs-listUserLogs.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,5 @@ _optional_|Earliest time for logs. Format: "%m/%d/%Y" in UTC.|string
== Example command
[source,terminal]
----
$ curl -X GET -H "Authorization: Bearer lfV4lVf9qRsyoFnrgEno1umIOrsdp8lPyMnfUDYY" -H "Accept: application/json" "quay-server.example.com/api/v1/user/logs"
$ curl -X GET -H "Authorization: Bearer <bearer_token>" -H "Accept: application/json" "<quay-server.example.com>/api/v1/user/logs"
----
2 changes: 1 addition & 1 deletion modules/api-organization-deleteAdminedOrganization.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,6 @@ _required_|The name of the organization|string
[source,terminal]
----
$ curl -X GET \
-H "Authorization: Bearer lfV4lVf9qRsyoFnrgEno1umIOrsdp8lPyMnfUDYY" \
-H "Authorization: Bearer <bearer_token>" \
"<quay-server.example.com>/api/v1/organization/<organization_name>"
----
2 changes: 1 addition & 1 deletion modules/api-organization-getOrganization.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@ _required_|The name of the organization|string
[source,terminal]
----
$ curl -X GET \
-H "Authorization: Bearer lfV4lVf9qRsyoFnrgEno1umIOrsdp8lPyMnfUDYY" \
-H "Authorization: Bearer <bearer_token>" \
"<quay-server.example.com>/api/v1/organization/<organization_name>"
----
2 changes: 1 addition & 1 deletion modules/api-repository-deleteRepository.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,5 @@ _required_|The full path of the repository. e.g. namespace/name|string

[source,terminal]
----
$ curl -X DELETE -H "Authorization: Bearer <bearer_token>" "quay-server.example.com/api/v1/repository/<namespace>/<repository_name>"
$ curl -X DELETE -H "Authorization: Bearer <bearer_token>" "<quay-server.example.com>/api/v1/repository/<namespace>/<repository_name>"
----
2 changes: 1 addition & 1 deletion modules/api-repository-getRepo.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,5 @@ _optional_|Whether to include action statistics|boolean

[source,terminal]
----
$ curl -X GET -H "Authorization: Bearer <bearer_token>" "quay-server.example.com/api/v1/repository/<namespace>/<repository_name>"
$ curl -X GET -H "Authorization: Bearer <bearer_token>" "<quay-server.example.com>/api/v1/repository/<namespace>/<repository_name>"
----
4 changes: 2 additions & 2 deletions modules/api-robot-deleteOrgRobot.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,6 @@ _required_|The name of the organization|string
[source,terminal]
----
curl -X DELETE \
-H "Authorization: Bearer lfV4lVf9qRsyoFnrgEno1umIOrsdp8lPyMnfUDYY" \
"quay-server.example.com/api/v1/organization/<organization_name>/robots/<robot_shortname>"
-H "Authorization: Bearer <bearer_token>" \
"<quay-server.example.com>/api/v1/organization/<organization_name>/robots/<robot_shortname>"
----
4 changes: 2 additions & 2 deletions modules/api-robot-deleteUserRobot.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@ _required_|The short name for the robot, without any user or organization prefix
[source,terminal]
----
$ curl -X DELETE \
-H "Authorization: Bearer lfV4lVf9qRsyoFnrgEno1umIOrsdp8lPyMnfUDYY" \
"quay-server.example.com/api/v1/user/robots/<robot_shortname>"
-H "Authorization: Bearer <bearer_token>" \
"<quay-server.example.com>/api/v1/user/robots/<robot_shortname>"
----
4 changes: 2 additions & 2 deletions modules/api-robot-getUserRobot.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,6 @@ _required_|The short name for the robot, without any user or organization prefix
[source,terminal]
----
$ curl -X GET \
-H "Authorization: Bearer lfV4lVf9qRsyoFnrgEno1umIOrsdp8lPyMnfUDYY" \
"quay-server.example.com/api/v1/user/robots/<robot_shortname>"
-H "Authorization: Bearer <bearer_token>" \
"<quay-server.example.com>/api/v1/user/robots/<robot_shortname>"
----
2 changes: 1 addition & 1 deletion modules/api-robot-regenerateOrgRobotToken.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,5 @@ _required_|The name of the organization|string
----
$ curl -X POST \
-H "Authorization: Bearer <bearer_token>" \
"quay-server.example.com/api/v1/organization/<orgname>/robots/<robot_shortname>/regenerate"
"<quay-server.example.com>/api/v1/organization/<orgname>/robots/<robot_shortname>/regenerate"
----
2 changes: 1 addition & 1 deletion modules/api-robot-regenerateUserRobotToken.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,5 @@ _required_|The short name for the robot, without any user or organization prefix
----
$ curl -X POST \
-H "Authorization: Bearer <bearer_token>" \
"quay-server.example.com/api/v1/user/robots/<robot_shortname>/regenerate"
"<quay-server.example.com>/api/v1/user/robots/<robot_shortname>/regenerate"
----
2 changes: 1 addition & 1 deletion modules/api-team-deleteOrganizationTeam.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,5 @@ _required_|The name of the organization|string
----
$ curl -X DELETE \
-H "Authorization: Bearer <your_access_token>" \
"quay-server.example.com/api/v1/organization/<organization_name>/team/<team_name>"
"<quay-server.example.com>/api/v1/organization/<organization_name>/team/<team_name>"
----
2 changes: 1 addition & 1 deletion modules/api-team-deleteOrganizationTeamMember.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,5 @@ _required_|The name of the organization|string
----
$ curl -X DELETE \
-H "Authorization: Bearer <your_access_token>" \
"quay-server.example.com/api/v1/organization/<organization_name>/team/<team_name>/members/<member_name>"
"<quay-server.example.com>/api/v1/organization/<organization_name>/team/<team_name>/members/<member_name>"
----
2 changes: 1 addition & 1 deletion modules/api-team-deleteTeamMemberEmailInvite.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,5 @@ _required_||string
----
$ curl -X DELETE \
-H "Authorization: Bearer <your_access_token>" \
"quay-server.example.com/api/v1/organization/<organization_name>/team/<team_name>/invite/<email>"
"<quay-server.example.com>/api/v1/organization/<organization_name>/team/<team_name>/invite/<email>"
----
2 changes: 1 addition & 1 deletion modules/api-team-getOrganizationTeamMembers.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,5 @@ _optional_|Whether to include pending members|boolean
----
$ curl -X GET \
-H "Authorization: Bearer <your_access_token>" \
"quay-server.example.com/api/v1/organization/<organization_name>/team/<team_name>/members"
"<quay-server.example.com>/api/v1/organization/<organization_name>/team/<team_name>/members"
----
2 changes: 1 addition & 1 deletion modules/api-team-inviteTeamMemberEmail.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,5 @@ _required_||string
----
$ curl -X PUT \
-H "Authorization: Bearer <your_access_token>" \
"quay-server.example.com/api/v1/organization/<organization_name>/team/<team_name>/invite/<email>"
"<quay-server.example.com>/api/v1/organization/<organization_name>/team/<team_name>/invite/<email>"
----
2 changes: 1 addition & 1 deletion modules/api-team-updateOrganizationTeamMember.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,5 @@ _required_|The name of the organization|string
----
$ curl -X PUT \
-H "Authorization: Bearer <your_access_token>" \
"quay-server.example.com/api/v1/organization/<organization_name>/team/<team_name>/members/<member_name>"
"<quay-server.example.com>/api/v1/organization/<organization_name>/team/<team_name>/members/<member_name>"
----
4 changes: 2 additions & 2 deletions modules/deleting-an-image-repository-via-the-api.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ Use the following procedure to delete a repository using the {productname} API.
+
[source,terminal]
----
$ curl -X DELETE -H "Authorization: Bearer <bearer_token>" "quay-server.example.com/api/v1/repository/<namespace>/<repository_name>"
$ curl -X DELETE -H "Authorization: Bearer <bearer_token>" "<quay-server.example.com>/api/v1/repository/<namespace>/<repository_name>"
----

. The CLI does not return information when deleting a repository from the CLI. To confirm deletion, you can check the {productname} UI, or you can enter the following link:https://docs.redhat.com/en/documentation/red_hat_quay/3/html-single/red_hat_quay_api_guide/index#getrepo[`GET /api/v1/repository/{repository}`] command to see if details are returned for the deleted repository:
+
[source,terminal]
----
$ curl -X GET -H "Authorization: Bearer <bearer_token>" "quay-server.example.com/api/v1/repository/<namespace>/<repository_name>"
$ curl -X GET -H "Authorization: Bearer <bearer_token>" "<quay-server.example.com>/api/v1/repository/<namespace>/<repository_name>"
----
+
Example output
Expand Down
14 changes: 7 additions & 7 deletions modules/deleting-robot-account-api.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ Use the following procedure to delete a robot account using the {productname} AP
[source,terminal]
----
curl -X DELETE \
-H "Authorization: Bearer lfV4lVf9qRsyoFnrgEno1umIOrsdp8lPyMnfUDYY" \
"quay-server.example.com/api/v1/organization/<organization_name>/robots/<robot_shortname>"
-H "Authorization: Bearer <bearer_token>" \
"<quay-server.example.com>/api/v1/organization/<organization_name>/robots/<robot_shortname>"
----

. The CLI does not return information when deleting a robot account with the API. To confirm deletion, you can check the {productname} UI, or you can enter the following link:https://docs.redhat.com/en/documentation/red_hat_quay/3/html-single/red_hat_quay_api_guide/index#getorgrobots[`GET /api/v1/organization/{orgname}/robots`] command to see if details are returned for the robot account:
Expand All @@ -39,22 +39,22 @@ Example output
{"robots": []}
----

* Enter the following command to delete a robot account for the current user with the link:https://docs.redhat.com/en/documentation/red_hat_quay/3/html-single/red_hat_quay_api_guide/index#deleteuserrobot[`DELETE /api/v1/user/robots/{robot_shortname}`] endpoint:
. Enter the following command to delete a robot account for the current user with the link:https://docs.redhat.com/en/documentation/red_hat_quay/3/html-single/red_hat_quay_api_guide/index#deleteuserrobot[`DELETE /api/v1/user/robots/{robot_shortname}`] endpoint:
+
[source,terminal]
----
$ curl -X DELETE \
-H "Authorization: Bearer lfV4lVf9qRsyoFnrgEno1umIOrsdp8lPyMnfUDYY" \
"quay-server.example.com/api/v1/user/robots/<robot_shortname>"
-H "Authorization: Bearer <bearer_token>" \
"<quay-server.example.com>/api/v1/user/robots/<robot_shortname>"
----

. The CLI does not return information when deleting a robot account for the current user with the API. To confirm deletion, you can check the {productname} UI, or you can enter the following link:https://docs.redhat.com/en/documentation/red_hat_quay/3/html-single/red_hat_quay_api_guide/index#getuserrobot[`GET /api/v1/user/robots/{robot_shortname}`] command to see if details are returned for the robot account:
+
[source,terminal]
----
$ curl -X GET \
-H "Authorization: Bearer lfV4lVf9qRsyoFnrgEno1umIOrsdp8lPyMnfUDYY" \
"quay-server.example.com/api/v1/user/robots/<robot_shortname>"
-H "Authorization: Bearer <bearer_token>" \
"<quay-server.example.com>/api/v1/user/robots/<robot_shortname>"
----
+
Example output
Expand Down
2 changes: 1 addition & 1 deletion modules/deleting-team-within-organization-api.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Use the following procedure to delete a team within an organization by using the
----
$ curl -X DELETE \
-H "Authorization: Bearer <your_access_token>" \
"quay-server.example.com/api/v1/organization/<organization_name>/team/<team_name>"
"<quay-server.example.com>/api/v1/organization/<organization_name>/team/<team_name>"
----
+
This command does not return output in the CLI.
10 changes: 5 additions & 5 deletions modules/managing-team-members-api.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Use the following procedures to add a member to a team (by direct invite or by e
----
$ curl -X PUT \
-H "Authorization: Bearer <your_access_token>" \
"quay-server.example.com/api/v1/organization/<organization_name>/team/<team_name>/members/<member_name>"
"<quay-server.example.com>/api/v1/organization/<organization_name>/team/<team_name>/members/<member_name>"
----
+
.Example output
Expand All @@ -38,7 +38,7 @@ $ curl -X PUT \
----
$ curl -X DELETE \
-H "Authorization: Bearer <your_access_token>" \
"quay-server.example.com/api/v1/organization/<organization_name>/team/<team_name>/members/<member_name>"
"<quay-server.example.com>/api/v1/organization/<organization_name>/team/<team_name>/members/<member_name>"
----
+
This command does not an output in the CLI. To ensure that a member has been deleted, you can enter the link:https://docs.redhat.com/en/documentation/red_hat_quay/3/html-single/red_hat_quay_api_guide/index#getorganizationteammembers[`GET /api/v1/organization/{orgname}/team/{teamname}/members`] command and ensure that the member is not returned in the output.
Expand All @@ -47,7 +47,7 @@ This command does not an output in the CLI. To ensure that a member has been del
----
$ curl -X GET \
-H "Authorization: Bearer <your_access_token>" \
"quay-server.example.com/api/v1/organization/<organization_name>/team/<team_name>/members"
"<quay-server.example.com>/api/v1/organization/<organization_name>/team/<team_name>/members"
----
+
.Example output
Expand All @@ -63,7 +63,7 @@ $ curl -X GET \
----
$ curl -X PUT \
-H "Authorization: Bearer <your_access_token>" \
"quay-server.example.com/api/v1/organization/<organization_name>/team/<team_name>/invite/<email>"
"<quay-server.example.com>/api/v1/organization/<organization_name>/team/<team_name>/invite/<email>"
----
* You can enter the link:https://docs.redhat.com/en/documentation/red_hat_quay/3/html-single/red_hat_quay_api_guide/index#deleteteammemberemailinvite[`DELETE /api/v1/organization/{orgname}/team/{teamname}/invite/{email}`] command to delete the invite of an email address to join a team. For example:
Expand All @@ -72,5 +72,5 @@ $ curl -X PUT \
----
$ curl -X DELETE \
-H "Authorization: Bearer <your_access_token>" \
"quay-server.example.com/api/v1/organization/<organization_name>/team/<team_name>/invite/<email>"
"<quay-server.example.com>/api/v1/organization/<organization_name>/team/<team_name>/invite/<email>"
----
4 changes: 2 additions & 2 deletions modules/org-delete-api.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Use the following procedure to delete an organization using the {productname} AP
[source,terminal]
----
$ curl -X DELETE \
-H "Authorization: Bearer lfV4lVf9qRsyoFnrgEno1umIOrsdp8lPyMnfUDYY" \
-H "Authorization: Bearer <bearer_token>" \
"https://<quay-server.example.com>/api/v1/organization/<organization_name>"
----

Expand All @@ -29,7 +29,7 @@ $ curl -X DELETE \
[source,terminal]
----
$ curl -X GET \
-H "Authorization: Bearer lfV4lVf9qRsyoFnrgEno1umIOrsdp8lPyMnfUDYY" \
-H "Authorization: Bearer <bearer_token>" \
"<quay-server.example.com>/api/v1/organization/<organization_name>"
----
+
Expand Down
4 changes: 2 additions & 2 deletions modules/regenerating-robot-account-token-api.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Use the following procedure to regenerate a robot account token using the {produ
----
$ curl -X POST \
-H "Authorization: Bearer <bearer_token>" \
"quay-server.example.com/api/v1/organization/<orgname>/robots/<robot_shortname>/regenerate"
"<quay-server.example.com>/api/v1/organization/<orgname>/robots/<robot_shortname>/regenerate"
----
+
. Example output
Expand All @@ -33,7 +33,7 @@ $ curl -X POST \
----
$ curl -X POST \
-H "Authorization: Bearer <bearer_token>" \
"quay-server.example.com/api/v1/user/robots/<robot_shortname>/regenerate"
"<quay-server.example.com>/api/v1/user/robots/<robot_shortname>/regenerate"
----
+
Example output
Expand Down
4 changes: 2 additions & 2 deletions modules/setting-role-of-team-within-organization-api.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Use the following procedure to view and set the role a team within an organizati
----
$ curl -X GET \
-H "Authorization: Bearer <your_access_token>" \
"quay-server.example.com/api/v1/organization/<organization_name>/team/<team_name>/permissions"
"<quay-server.example.com>/api/v1/organization/<organization_name>/team/<team_name>/permissions"
----
+
.Example output
Expand All @@ -43,7 +43,7 @@ $ curl -X PUT \
-d '{
"role": "<role>"
}' \
"quay-server.example.com/api/v1/organization/<organization_name>/team/<team_name>"
"<quay-server.example.com>/api/v1/organization/<organization_name>/team/<team_name>"
----
+
.Example output
Expand Down
2 changes: 1 addition & 1 deletion modules/viewing-tag-history-v2-api.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ $ curl -X GET \
+
[source,terminal]
----
$ curl -X GET -H "Authorization: Bearer lfV4lVf9qRsyoFnrgEno1umIOrsdp8lPyMnfUDYY" -H "Accept: application/json" "quay-server.example.com/api/v1/repository/quayadmin/busybox/tag/?onlyActiveTags=true&page=1&limit=20&specificTag=test-two"
$ curl -X GET -H "Authorization: Bearer <bearer_token>" -H "Accept: application/json" "<quay-server.example.com>/api/v1/repository/quayadmin/busybox/tag/?onlyActiveTags=true&page=1&limit=20&specificTag=test-two"
----
+
.Example output
Expand Down
4 changes: 2 additions & 2 deletions modules/viewing-usage-logs-api.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,14 @@ Detailed logs can be viewed by Organization, repository, a specific user, or the
+
[source,terminal]
----
$ curl -X GET -H "Authorization: Bearer lfV4lVf9qRsyoFnrgEno1umIOrsdp8lPyMnfUDYY" -H "Accept: application/json" "quay-server.example.com/api/v1/user/logs"
$ curl -X GET -H "Authorization: Bearer <bearer_token>" -H "Accept: application/json" "<quay-server.example.com>/api/v1/user/logs"
----
+
You can also pass in the `performer` and `startime/endtime` queries to obtain logs for a specific user between a specific time period. For example:
+
[source,terminal]
----
$ curl -X GET -H "Authorization: Bearer lfV4lVf9qRsyoFnrgEno1umIOrsdp8lPyMnfUDYY" -H "Accept: application/json" "http://quay-server.example.com/api/v1/user/logs?performer=quayuser&starttime=01/01/2024&endtime=06/18/2024"
$ curl -X GET -H "Authorization: Bearer <bearer_token>" -H "Accept: application/json" "http://quay-server.example.com/api/v1/user/logs?performer=quayuser&starttime=01/01/2024&endtime=06/18/2024"
----
+
.Example output
Expand Down

0 comments on commit 12c03d7

Please sign in to comment.