Issue #4457 has been updated by James Turnbull.

Category set to API
Assignee changed from Matt Robinson to Nigel Kersten


----------------------------------------
Feature #4457: Don't be just REST, let's be RESTful
https://projects.puppetlabs.com/issues/4457

Author: Jiří Kubíček
Status: Needs design decision
Priority: Normal
Assignee: Nigel Kersten
Category: API
Target version: 
Affected Puppet version: 
Keywords: Puppet REST RESTful
Branch: 


After reading new REST doc I'm a little bit disapointed puppet is not RESTful

for example folowing:
<pre>
curl -k -H "Accept: yaml" 
https://puppetmaster:8140/production/certificate_requests/all
curl -k -H "Accept: yaml" 
https://puppetmaster:8140/production/certificate_request/puppetclient
</pre>
for RESTful the URL should look more like this:
<pre>
all requests - /certificate_requests
specific request - /certificate_requests/some.server.com
</pre>

environment portion of URL can stay as is, but /environments/production would 
look better

It would be also nice to have the environment portion optional (with production 
as default) or selectable by custom HTTP header.

--

Requested content type can by also requested as suffix in the URL.
<pre>
Example: /certificate_requests/some.server.com.yaml
Format: :resource(/:key)(.:format)
</pre>
--

I suggest folowing changes in URLs:
<pre>
certificate/ca => certificates/ca
certificate/puppetclient => certificates/puppetclient
catalog/myclient => catalogs/myclient
certificate_revocation_list/ca => certificate_revocation_list (singleton?)
certificate_requests/{anything} => certificate_requests
certificate_request/{node certificate name} => certificate_requests/{node 
certificate name}
report/{node certificate name} => reports/{node certificate name}
node/{node certificate name} => nodes/{node certificate name}
status/{anything} => /status (singleton)
</pre>
Documentatio for puppet REST also states I should use /node for getting facts 
from master and /facts for getting facts from agent. I think this should be 
unified.





-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to