WPN-XM Server Stack REST API Documentation
A RESTful web API to the Software Components Registry of the WPN-XM Server Stack.
Introduction
This document describes the REST interface, which provides access to the
Software Components Registry of the WPN-XM Server Stack.
API Client
For convenience, you might install the PHP client for this API.
It is provided as a Composer library.
Installation
To install the the PHP client as a local, per-project dependency to your project,
simply add a dependency on wpn-xm/api-client
to your project's composer.json
file, like so:
{
"require" : {
"wpn-xm/api-client" : "*"
}
}
Download
Download - Download a certain version of a component
/download/:component/:version
Parameter
Field |
Type |
Description |
component |
String |
Name of the Software Component. |
version |
String |
Version of the Software Component. |
Success (302)
A 302 Moved Temporarily response is sent, redirecting to the download URL of the software component.
Error (404)
A 404 header response is sent, when the requested software component or version was not found.
Response
HTTP/1.1 404 NotFound
Download - Download the latest version of a component
/download/:component
Parameter
Field |
Type |
Description |
component |
String |
Name of the Software Component. |
Success (302)
A 302 Moved Temporarily response is sent, redirecting to the download URL of the software component.
Error (404)
A 404 header response is sent, when the requested software component was not found.
Response
HTTP/1.1 404 NotFound
Version
Version - List latest versions of the Software Components Registry
/versions/latest
Success (200)
HTTP/1.1 200 Ok
{
"adminer" : {
"latest" : {
"url" : "http://garr.dl.sourceforge.net/project/adminer/Adminer/Adminer%204.0.3/adminer-4.0.3.php",
"version" : "4.0.3"
},
"name" : "Adminer",
"website" : "http://adminer.org/"
},
....
}
Version - Determine, if a certain version of a component is the latest version
/version/:component/:version
Parameter
Field |
Type |
Description |
component |
String |
Name of the Software Component. |
version |
String |
Version of the Software Component. |
Success (200)
Field |
Type |
Description |
software |
String |
Name of the Software Component. |
your_version |
String |
Your Version of the Software Component. |
latest_version |
String |
The latest version number of the Software Component. |
href |
String |
The download URL of the latest version. |
message |
String |
The update immediately message. |
Response for "GET /version/nginx/1.2.1"
HTTP/1.1 200 Ok
{
"software" : "nginx",
"your_version" : "1.2.1",
"latest_version" : "1.5.10",
"href" : "http:\/\/nginx.org\/download\/nginx-1.5.10.zip",
"message" : "You are running an old version of nginx and should update immediately."
}
Error (404)
A 404 header response is sent, when the requested software component or version was not found.
Response
HTTP/1.1 404 NotFound