[Pulp-list] (Sort of) REST Question

Jason Dobies jason.dobies at redhat.com
Thu Sep 16 18:19:05 UTC 2010


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

The consumer history query lets you filter on event type (repo bound,
consumer created, etc). So in the body of the query you'd pass something
like:

{ 'event_type' : 'package_installed' }

I understand a fair amount of the HATEOAS ideas and I know we're using
it in a lot of ways (i.e. a repo sync returning the URL to check its
status). But where does a client get the list of event types that can be
queried?

I have an API method to return them; that much was simple. I was going
to add a web service call to it so our CLI could run that separately if
the user wanted more information. But when I couldn't come up with a
good URL to hang that list from, I figured this was probably a common
thing we'd have to deal with.

Right now the consumer history URL looks like:

/consumers/<id>/history

Would the event type enumeration be something like:

/consumer-queries/history/event_types

Or is this list of possible values something that only exists in
documentation. I know this sort of thing isn't directly covered by
HATEOAS, but it seems like if you're keeping the client that thin/dumb,
you should also provide a server means for this sort of information.

Thoughts?

- -- 
Jason Dobies
RHCE# 805008743336126
Freenode: jdob
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJMkl+ZAAoJEOMmcTqOSQHCeD4H/3LMI0BF5UlVEbPnQnb9gf0o
yygP1HG9gHrsKfXPBrN9cXHfU1B7Rq3IvQLUCsoFLssnXoWQb+z9w7wp4Jirz2Rz
8O+SSe3ec0yPQiOamWM8jw5VkdMhsRS1XlUnL7bn7BPaL3ls/mAC+rWc6b7XLgCy
Q/vMP+m1CbXwQ4E7/LeykNBWCnKUzvcOMt3dtb5iwCUyPsR7fk98yHBEZaPa3E1j
TZH1F68B4dd2JIgZ95l/2g/rDAhuXcDoddU0HuXam1CeoYD3PZ65+uRwinmy5Ect
HRL9Tfq5iAKiIF8zXbyqn3Hjf9Oyi+fYGzOexAb+PGMuMyB4YegLekFlM/0VLTw=
=dHS+
-----END PGP SIGNATURE-----




More information about the Pulp-list mailing list