ManageIQ / manageiq-documentation

Documentation for the ManageIQ Management Platform
https://www.manageiq.org/docs/
Other
38 stars 113 forks source link

[API] Missing API documentation #1441

Open Fryguy opened 4 years ago

Fryguy commented 4 years ago

Several new collections were added over the last few releases but have no examples in the API Docs->Reference section other than the general mention in the Reference->Primary Collections and the HATEOAS like things one can query via /api, returned actions on collections and resources and OPTIONS on collections.

We need endpoint examples in their own Reference entry or part of a related topic section, i.e. Physical Server Management.

cc @abellotti Please update this issue with other things you've found

abellotti commented 4 years ago

Ok, updated @Fryguy

starcraftnight commented 4 years ago

Have we really implemented /api/configured_systems? Can not find any clue in https://github.com/ManageIQ/manageiq-api/tree/master/spec/requests.
https://github.com/ManageIQ/manageiq-api/blob/master/app/controllers/api/configured_systems_controller.rb have no actual implementation as well.

abellotti commented 4 years ago

It's leveraging the base controller's methods, no extra logic needed. looking at config/api.yml it's exposed read-only as a primary collection as well as a subcollection of providers. The only logic added was how to fetch the subcollection resources in app/controllers/api/subcollections/configured_systems.rb

specs we have:

spec/requests/collections_spec.rb has tests for it as primary spec/request/providers_spec.rb as subcollection

GET /api/configured_systems GET /api/configured_systems/:id GET /api/providers/:id/configured_systems GET /api/providers/:id/configured_systems/:c_id also OPTIONS /api/configured_systems

last one would show you any optional virtual attributes and relationships you can query off configured system resources via ?attributes=...

Hope this helps.

Fryguy commented 4 years ago

@starcraftnight Which version of ManageIQ are you using? /api/configured_systems was added in jansa release, so if you are using ivanchuk, it's not there yet.

(Compare https://github.com/ManageIQ/manageiq-api/blob/jansa/config/api.yml#L899-L921 to https://github.com/ManageIQ/manageiq-api/blob/ivanchuk/config/api.yml)

miq-bot commented 1 year ago

This issue has been automatically marked as stale because it has not been updated for at least 3 months.

If you can still reproduce this issue on the current release or on master, please reply with all of the information you have about it in order to keep the issue open.

Thank you for all your contributions! More information about the ManageIQ triage process can be found in the triage process documentation.