Bug #18488
closedGET /api/v2/provisioning_templates/build_pxe_default returns error "Resource provisioning_template not found by id 'build_pxe_default'
Description
Description of problem:
GET /api/v2/provisioning_templates/build_pxe_default returns:
> "error": {"message":"Resource provisioning_template not found by id 'build_pxe_default'"}
However, deprecated GET /api/v2/config_templates/build_pxe_default works as expected:
> {"message":"PXE Default file has been deployed to all Capsules"}
Version-Release number of selected component (if applicable):
Satellite 6.3.0 Snap 8 / Foreman 1.13.2.2-1
Satellite 6.2.7 Snap 3.0 / Foreman 1.11.0.65-1
The API request should be POST instead of GET.
POST /api/v2/provisioning_templates/build_pxe_default
--
GET call however works for "api/v2/config_templates/build_pxe_default" but it's depricated.
--
Can adopt one of the following:
1. Obsolete GET api/v2/config_templates/build_pxe_default
2. Add GET api/v2/provisioning_templates/build_pxe_default
Later doesn't make sense to me, since it would unnecessarily leverage the use of GET instead of POST on an update action. Hence going with option #1.
Updated by Dominic Cleal almost 8 years ago
Is the route GET /api/v2/provisioning_templates/build_pxe_default
documented?
Only POST /api/provisioning_templates/build_pxe_default
is listed in the API documentation, so a 404 is correct.
Updated by Swapnil Abnave almost 8 years ago
- Related to Bug #6976: Build default PXE menu should be POST request instead of GET added
Updated by The Foreman Bot almost 8 years ago
- Status changed from New to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/4278 added
Updated by Dominic Cleal almost 8 years ago
- Status changed from Ready For Testing to Rejected
PR rejected - the GET..provisioning_templates API is not documented or supported, and the GET..config_templates remains deprecated until the next API version.