Project

General

Profile

Actions

Bug #18488

closed

GET /api/v2/provisioning_templates/build_pxe_default returns error "Resource provisioning_template not found by id 'build_pxe_default'

Added by Swapnil Abnave about 7 years ago. Updated almost 6 years ago.

Status:
Rejected
Priority:
Normal
Category:
API
Target version:
-
Difficulty:
trivial
Triaged:
Fixed in Releases:
Found in Releases:

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.


Related issues 1 (0 open1 closed)

Related to Foreman - Bug #6976: Build default PXE menu should be POST request instead of GETClosedTomáš Strachota08/07/2014Actions
Actions #1

Updated by Dominic Cleal about 7 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.

Actions #2

Updated by Swapnil Abnave about 7 years ago

  • Related to Bug #6976: Build default PXE menu should be POST request instead of GET added
Actions #3

Updated by The Foreman Bot about 7 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/4278 added
Actions #4

Updated by Dominic Cleal about 7 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.

Actions

Also available in: Atom PDF