json-api/readme.md

108 lines
3.2 KiB
Markdown
Raw Normal View History

2019-09-14 17:38:35 +02:00
UUP dump JSON API
-----------------
### Description
2020-03-11 10:27:18 +01:00
A simple endpoint allowing access to the UUP dump API using simple HTTP GET requests.
2019-09-14 17:38:35 +02:00
### Usage
All requests are done using GET requests with parameters specified in the URL.
2020-03-11 10:27:18 +01:00
Responses are provided in JSON format.
2019-09-14 17:38:35 +02:00
Example response:
```json
{
"response": {
"apiVersion": "1.27.0"
},
"jsonApiVersion": "0.1.0-alpha"
}
```
Responses from the UUP dump API are always returned in the `response` key.
If request fails, a HTTP error code will be set to:
2019-09-14 17:38:35 +02:00
- `400` if request was malformed
- `429` if user is being rate limited
- `500` if retrieval of data was unsuccessful
In such cases `response` key will contain an `error` key with short description
of the error.
### Supported endpoints
#### `/` or `/index.php`
Returns versions of APIs
Parameters:
- None
#### `/listid.php`
2020-03-11 10:27:18 +01:00
Returns a list of builds in the local database. (like "Browse the list of known builds" on the website)
2019-09-14 17:38:35 +02:00
Parameters:
2020-03-11 10:27:18 +01:00
- `search` - Optional search query
2019-09-14 17:38:35 +02:00
- **Supported values:** any text
2020-03-11 10:27:18 +01:00
- `sortByDate` - Optional sorting results by creation date
2019-09-14 17:38:35 +02:00
- **Supported values:** 0 = Disable, 1 = Enable
#### `/fetchupd.php`
Fetches the latest builds from Windows Update servers using specified
2020-03-11 10:27:18 +01:00
parameters. (like "Fetch the latest build" on the website)
2019-09-14 17:38:35 +02:00
Parameters:
2020-03-11 10:27:18 +01:00
- `arch` - Specifies which architecture the API will return.
2019-09-14 17:38:35 +02:00
- **Supported values:** `amd64`, `arm64`, `x86`
2020-03-11 10:27:18 +01:00
- `ring` - Specifies the ring the API uses when querying Windows Update servers.
2019-09-14 17:38:35 +02:00
- **Supported values:** `WIF`, `WIS`, `RP`, `RETAIL`
2020-03-11 10:27:18 +01:00
- `WIF` - Windows Insider Fast
- `WIS` - Windows Insider Slow
- `RP` - Release Preview
- `RETAIL` - Retail
2019-09-14 17:38:35 +02:00
- `flight` - Flight to use when fetching information
- **Supported values:** `Active`, `Skip`, `Current`
- **NOTE:** `Skip` is for `WIF` ring only. `Current` is for `RP` ring only.
2020-03-11 10:27:18 +01:00
- `build` - Build number to use by the API when fetching information
2019-09-14 17:38:35 +02:00
- **Supported values:** >= 9841 and <= PHP_INT_MAX-1
- `sku` - SKU number to use when fetching information
2020-03-11 10:27:18 +01:00
- **Supported values:** Any SKU integer
2019-09-14 17:38:35 +02:00
#### `/get.php`
Retrieves download links for specified Update ID and provides lists of ready to
use UUP sets.
Parameters:
2020-03-11 10:27:18 +01:00
- `id` - Update identifier (UUIDv4 string)
- **Supported values:** Any valid update identifier in the UUIDv4 format.
2019-09-14 17:38:35 +02:00
- `lang` - Create UUP set for selected language (optional)
- **Supported values:** language name in xx-xx format
2020-03-11 10:27:18 +01:00
- `edition` - Create UUP set for the selected edition (optional)
- **Supported values:** Any edition name
- **NOTE:** Must be used with `lang`
2019-09-14 17:38:35 +02:00
2020-03-11 10:27:18 +01:00
- `noLinks` - Do not retrieve download links for the created UUP set (optional)
- **Supported values:** 0 = Disable, 1 = Enable
2019-09-14 17:38:35 +02:00
#### `/listlangs.php`
2020-03-11 10:27:18 +01:00
Lists available languages for the specified Update ID.
2019-09-14 17:38:35 +02:00
Parameters:
2020-03-11 10:27:18 +01:00
- `id` - Optional Update identifier (UUIDv4 string)
- **Supported values:** Any valid update identifier in the UUIDv4 format.
2019-09-14 17:38:35 +02:00
#### `/listlangs.php`
2020-03-11 10:27:18 +01:00
Lists available editions for the specified Update ID.
2019-09-14 17:38:35 +02:00
Parameters:
2020-03-11 10:27:18 +01:00
- `lang` - Generate edition list for the selected language
- **Supported values:** Language name in xx-xx format
2019-09-14 17:38:35 +02:00
2020-03-11 10:27:18 +01:00
- `id` - Optional update identifier (UUIDv4 string)
- **Supported values:** Any valid update identifier in the UUIDv4 format.