diff --git a/guides/common/assembly_api-requests-in-various-languages.adoc b/guides/common/assembly_api-requests-in-various-languages.adoc index aacb709134..c96fdc71d1 100644 --- a/guides/common/assembly_api-requests-in-various-languages.adoc +++ b/guides/common/assembly_api-requests-in-various-languages.adoc @@ -18,4 +18,4 @@ include::modules/proc_calling-the-api-in-python.adoc[leveloffset=+1] include::modules/proc_creating-objects-by-using-python.adoc[leveloffset=+2] -include::modules/proc_requesting-information-from-the-api-by-using-python.adoc[leveloffset=+2] +include::modules/proc_retrieving-resource-information-by-using-python.adoc[leveloffset=+2] diff --git a/guides/common/modules/proc_applying-errata-to-hosts.adoc b/guides/common/modules/proc_applying-errata-to-hosts.adoc index ea0b664675..abe1ce6091 100644 --- a/guides/common/modules/proc_applying-errata-to-hosts.adoc +++ b/guides/common/modules/proc_applying-errata-to-hosts.adoc @@ -21,7 +21,7 @@ Navigate to *Hosts* > *Host Collections* and select a host collection. Go to *Collection Actions* > *Errata Installation* and notice the search query box contents. For example, for a Host Collection called _my-collection_, the search box contains `host_collection="my-collection"`. -[id="api-appyling-errata-to-a-host"] +[id="api-applying-errata-to-a-host"] .Applying errata to a host This example uses the API URL for bulk actions `/katello/api/hosts/bulk/install_content` to show the format required for a simple search. diff --git a/guides/common/modules/proc_creating-and-modifying-resources.adoc b/guides/common/modules/proc_creating-and-modifying-resources.adoc index 4f41048a4a..c52a35f899 100644 --- a/guides/common/modules/proc_creating-and-modifying-resources.adoc +++ b/guides/common/modules/proc_creating-and-modifying-resources.adoc @@ -19,7 +19,8 @@ $ curl \ --request POST \ --user _My_User_Name_:__My_Password__ \ --data "{\"firstname\":\"_Test Name_\",\"mail\":\"_test@example.com_\",\"login\":\"_test_user_\",\"password\":\"_password123_\",\"auth_source_id\":__1__}" \ -https://_{foreman-example-com}_/api/users | python3 -m json.tool +https://_{foreman-example-com}_/api/users \ +| python3 -m json.tool ---- [id="api-modifying-a-user"] @@ -36,5 +37,6 @@ $ curl \ --request PUT \ --user _My_User_Name_:__My_Password__ \ --data "{\"firstname\":\"_New Test Name_\",\"mail\":\"_test@example.com_\",\"login\":\"_new_test_user_\",\"password\":\"_password123_\",\"auth_source_id\":__1__}" \ -https://_{foreman-example-com}_/api/users/_8_ | python3 -m json.tool +https://_{foreman-example-com}_/api/users/_8_ \ +| python3 -m json.tool ---- diff --git a/guides/common/modules/proc_deleting-openscap-reports.adoc b/guides/common/modules/proc_deleting-openscap-reports.adoc index fc5ee10baa..dbc6f58e83 100644 --- a/guides/common/modules/proc_deleting-openscap-reports.adoc +++ b/guides/common/modules/proc_deleting-openscap-reports.adoc @@ -15,7 +15,8 @@ Example request: ---- $ curl \ --user _My_User_Name_:__My_Password__ \ -https://_{foreman-example-com}_/api/v2/compliance/arf_reports/ | python3 -m json.tool +https://_{foreman-example-com}_/api/v2/compliance/arf_reports/ \ +| python3 -m json.tool ---- + Example response: diff --git a/guides/common/modules/proc_retrieving-a-list-of-resources.adoc b/guides/common/modules/proc_retrieving-a-list-of-resources.adoc index f573590d2c..202bb4be51 100644 --- a/guides/common/modules/proc_retrieving-a-list-of-resources.adoc +++ b/guides/common/modules/proc_retrieving-a-list-of-resources.adoc @@ -18,7 +18,8 @@ Example request: $ curl \ --request GET \ --user _My_User_Name_:__My_Password__ \ -https://_{foreman-example-com}_/api/users | python3 -m json.tool +https://_{foreman-example-com}_/api/users \ +| python3 -m json.tool ---- Example response: diff --git a/guides/common/modules/proc_requesting-information-from-the-api-by-using-python.adoc b/guides/common/modules/proc_retrieving-resource-information-by-using-python.adoc similarity index 96% rename from guides/common/modules/proc_requesting-information-from-the-api-by-using-python.adoc rename to guides/common/modules/proc_retrieving-resource-information-by-using-python.adoc index a19ff8f1a8..600b5bdbf8 100644 --- a/guides/common/modules/proc_requesting-information-from-the-api-by-using-python.adoc +++ b/guides/common/modules/proc_retrieving-resource-information-by-using-python.adoc @@ -1,5 +1,5 @@ -[id="requesting-information-from-the-api-by-using-python"] -= Requesting information from the API by using Python +[id="retrieving-resource-information-by-using-python"] += Retrieving resource information by using Python This is an example script that uses Python for various API requests. diff --git a/guides/common/modules/proc_using-the-get-http-method.adoc b/guides/common/modules/proc_using-the-get-http-method.adoc index 11b67db952..553b6229ea 100644 --- a/guides/common/modules/proc_using-the-get-http-method.adoc +++ b/guides/common/modules/proc_using-the-get-http-method.adoc @@ -10,7 +10,8 @@ This example requests the number of registered {Project} hosts. $ curl \ --request GET \ --user _My_User_Name_:__My_Password__ \ -https://_{foreman-example-com}_/api/hosts | python3 -m json.tool +https://_{foreman-example-com}_/api/hosts \ +| python3 -m json.tool ---- .Example response diff --git a/guides/common/modules/proc_working-with-hosts.adoc b/guides/common/modules/proc_working-with-hosts.adoc index 6d3b529e6b..9f3f6a9712 100644 --- a/guides/common/modules/proc_working-with-hosts.adoc +++ b/guides/common/modules/proc_working-with-hosts.adoc @@ -12,7 +12,8 @@ Example request: $ curl \ --request GET \ --user _My_User_Name_:__My_Password__ \ -https://_{foreman-example-com}_/api/v2/hosts | python3 -m json.tool +https://_{foreman-example-com}_/api/v2/hosts \ +| python3 -m json.tool ---- Example response: diff --git a/guides/common/modules/ref_json-response-format.adoc b/guides/common/modules/ref_json-response-format.adoc index 4b5112b218..55cf5b8b0c 100644 --- a/guides/common/modules/ref_json-response-format.adoc +++ b/guides/common/modules/ref_json-response-format.adoc @@ -17,7 +17,8 @@ Example request: $ curl \ --request GET \ --user _My_User_Name_:__My_Password__ \ -https://_{foreman-example-com}_/api/domains/23 | python3 -m json.tool +https://_{foreman-example-com}_/api/domains/23 \ +| python3 -m json.tool ---- Example response: @@ -46,7 +47,8 @@ Example request: $ curl \ --request GET \ --user _My_User_Name_:__My_Password__ \ -https://_{foreman-example-com}_/api/domains | python3 -m json.tool +https://_{foreman-example-com}_/api/domains \ +| python3 -m json.tool ---- Example response: diff --git a/guides/common/modules/snip_managing-packages-api.adoc b/guides/common/modules/snip_managing-packages-api.adoc index 0c412dd314..9770539eac 100644 --- a/guides/common/modules/snip_managing-packages-api.adoc +++ b/guides/common/modules/snip_managing-packages-api.adoc @@ -34,7 +34,8 @@ curl https://_{foreman-example-com}_/api/job_invocations \ -H "content-type: application/json" \ -X POST \ -d @_Path_To_My_API_Request_Body_ \ --u _My_Username_:__My_Password__ | python3 -m json.tool +-u _My_Username_:__My_Password__ \ +| python3 -m json.tool ---- .Verification