Web/API/Products
From Mandriva Community Wiki
This API is supposed to describe Mandriva products available (distribution releases, especially).
Contents |
Relies on Mandriva Release Spec to identify objects (distribution, release, and so on).
MUST describe:
- all Mandriva distributions that are shipped (including Community and specific distributions for customers) and supported.
- each product lifetime,
- distribution (2006.0), release (2006.0 Official for x86_64), product (Powerpack 2006.0 Official for x86_64).
- medias,
- attached services to products
[edit] Returned document formats
UTF-8 encoded XML documents.
Depending on the object, the schema will be different.
[edit] Error document
[edit] List document (list of objects found)
[edit] Release document
[edit] Public methods
[edit] get information on an arbitrary object
HTTP GET on http://api/id?id=[identifier]
Will return a XML-formatted string, depending on the object type (see above).
[edit] get all distributions
HTTP GET on http://api/distribution?
[edit] get distribution (id)
HTTP GET on http://api/id?distribution=Mandriva%40Linux
[edit] get all versions
HTTP GET on http://api/id?version
[edit] get version
HTTP GET on http://api/id?version=2006.0
[edit] get all releases (after /etc/release)
HTTP GET on http://api/id?etc_release
HTTP GET on http://api/id?etc_release=Mandriva%20Linux%20release%202006.1%20(Official)%20for%20i586
[edit] get all products
HTTP GET on http://api/id?product
[edit] get product (type)
HTTP GET on http://api/id?product=PowerPack
[edit] Complex queries
You may make complex queries, when they make sense.
HTTP GET on http://api/id?distribution=2006.0&tag=Official&arch=x86_64&product=PowerPack
will return a XML document listing all matching objects (can be 0, 1 or many), with their respective ids.
To get the detail about an object, you will have to use the http://api/id?id=... query.