Bug 1308830
Summary: | Include examples for high-level API bindings | ||||||
---|---|---|---|---|---|---|---|
Product: | Red Hat Satellite | Reporter: | Evgeni Golov <egolov> | ||||
Component: | Docs API Guide | Assignee: | Stephen Wadeley <swadeley> | ||||
Status: | CLOSED CURRENTRELEASE | QA Contact: | Lucie Jirakova <ljirakov> | ||||
Severity: | medium | Docs Contact: | |||||
Priority: | medium | ||||||
Version: | 6.1.6 | CC: | adahms, mbacovsk, swadeley, tstrachota | ||||
Target Milestone: | Unspecified | ||||||
Target Release: | Unused | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2017-01-18 06:20:19 UTC | Type: | Bug | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Attachments: |
|
Description
Evgeni Golov
2016-02-16 09:01:54 UTC
Upstream docs are going to have this too: http://projects.theforeman.org/issues/17469 https://github.com/theforeman/theforeman.org/pull/754 And that's now live: https://theforeman.org/manuals/1.13/#5.1.9UsingApipie-Bindings Hello Thank you for raising this bug Hello Tomas As discussed in our meeting: Please provide some APIPIE examples to match the examples we currently have in the API guide[1] Thank you [1] https://access.redhat.com/documentation/en/red-hat-satellite/6.2/paged/api-guide/chapter-4-getting-started-with-the-red-hat-satellite-api#sect-API_Guide-API_Examples_Using_Curl Created attachment 1239155 [details]
Apipie bindings example
Please find the apipie bindings examples attached.
Please note that the attached examples are intended to be used with sat 6.2. Let me know if 6.1 version is needed too. Btw I discovered the current examples in 6.2 docs are broken: https://bugzilla.redhat.com/show_bug.cgi?id=1411892 (In reply to Tomas Strachota from comment #6) > Please note that the attached examples are intended to be used with sat 6.2. Thank you very much Tomas > Let me know if 6.1 version is needed too. I don't think that will be necessary, thank you. > > Btw I discovered the current examples in 6.2 docs are broken: > https://bugzilla.redhat.com/show_bug.cgi?id=1411892 Thank you for noticing and for raising that bug. Hello Tomas Please check this line is correct: prior_env_id = call_api(:lifecycle_environments, :create, {"name" => environment, "organization_id" => org_id, "prior_id" => prior_env_id, 'organization_id' => org_id })['id'] I ask because "organization_id" is duplicated. Than you Nice catch, it should have been: prior_env_id = call_api(:lifecycle_environments, :create, {"name" => environment, "organization_id" => org_id, "prior_id" => prior_env_id })['id'] It doesn't break functionality but the second organization_id is redundant. Just remove it, please. Thank you Tomas Another question; I want to change localhost in this bit: # Create an instance of apipie bindings @api = ApipieBindings::API.new({ :uri => 'https://localhost/', :username => 'admin', :password => 'changeme', :api_version => 2 }) To: https://satellite6.example.com or https://satellite6.example.com/katello/api/v2/ Thank you https://satellite6.example.com the rest is auto-detected by apipie :) (In reply to Evgeni Golov from comment #11) > https://satellite6.example.com > > the rest is auto-detected by apipie :) thank you Stephen, the correct version would be: 'https://satellite6.example.com/' Localhost is remnant from my testing. This content is now live on the Customer Portal. Closing. |