Please remove this {{Draft}}template, when you're sure the page is complete and correct.
|
Existing API
rpmdrake downloads a file located on the http://mirrors.mageia.org/api/ server.
The full URL is built from that plus: {file|/mirrors|/{type}.{version}.{branch}.{arch}.list}
The product type, version, branch and architecture are derived from the product id attributes, and must be lowercased.
OLD fact, still valid?: Note that for compatibility reasons with Mandriva 2007.x versions out there, the following file format is available as well: /mirrors/{type}.{version}.{arch}.list
linking to /mirrors/{type}.{version}.final.{arch}.list
What is returned is a list, each line describing a valid mirror. Example:
The first returned line reads:
continent=EU,zone=FR,country=FR,city=Paris,latitude=46,longitude=2,version=6,arch=x86_64,type=distrib,url=http://ftp.free.fr/mirrors/mageia.org/distrib
Attributes of each line are the following. Bold attributes are undocumented ones.
attribute name | role | possible values | |
---|---|---|---|
continent | AS, EU, NA, SA, AF | ||
zone | country ISO code | FR, DE, US, etc. | |
country | country name | France, Germany, United States, etc. | |
city | city name | Paris, Berlin, | |
version | 1, 2, 3, 4, 5, 6, 7, ...etc..., cauldron | ||
arch | i586, x86_64, armv5tl, armv7hl | ||
type | type of content this mirror provides | distrib (RPM distribution), updates (RPM updates distribution), iso (full ISO images), restricted (restricted/commercial RPM distribution) | |
url | |||
latitude | |||
longitude | |||
restricted | optional - means that the mirror should not be used outside of its own country | country | |
bw | bandwidth provided by the server? or limit bandwidth to use? | 100Mb, 10Mb, etc. |
Optional (recommanded) parameters
Note these are notes for mdkonline only. You may call the mirrors API with optional GET parameters, used for metrics purpose for now mostly:
parameter name | role | possible values | |
---|---|---|---|
reason | why do you query the api? | "install" when installing the distribution for the first time (setting up install/update medias and pinging api.mandriva.com - should happen once) "update" when updating/checking media to update packages (should happen many times a year) "upgrade" when upgrading the system from one version to another (should happen once per version, exclusive from "install" above) |
|
upgrade_from | the version of the distribution you are upgrading from | 2008.1, 2009.0 (only when reason=upgrade) | |
upgrade_by | the client software used to upgrade | drakx, mdkonline, other? (only when reason=upgrade) |