Difference between revisions of "Get WHMCS Download Information"

From WHMCS Documentation

(Created page with " === Getting download information === You can use the Internal API to retrieve information about [https://download.whmcs.com/|recent WHMCS releases], including download locat...")
 
(Response Parameters)
 
(13 intermediate revisions by 2 users not shown)
Line 2: Line 2:
 
=== Getting download information ===
 
=== Getting download information ===
  
You can use the Internal API to retrieve information about [https://download.whmcs.com/|recent WHMCS releases], including download locations, with a <code>curl</code> command.  
+
You can use the WHMCS Service API to retrieve information about [https://download.whmcs.com/ recent WHMCS releases], including download locations, with a <tt>curl</tt> command.  
  
 
For example:
 
For example:
  
<nowiki>curl https://api1.whmcs.com/download/latest?type=stable</nowiki>
+
<div class="source-cli"><nowiki>
 +
curl https://api1.whmcs.com/download/latest?type=stable
 +
</nowiki></div>
  
 
=== Input Parameters ===
 
=== Input Parameters ===
  
{| class="wikitable"
+
<table class="table table-striped table-condensed">
!  style="padding: 10px" bgcolor="#F1F1F1" | Parameter
+
<tr><th>Parameter</th>
!  style="padding: 10px" bgcolor="#F1F1F1" | Type
+
<th>Type</th>
!  style="padding: 10px" bgcolor="#F1F1F1" | Description
+
<th>Description</th>
!  style="padding: 10px" bgcolor="#F1F1F1" | Required
+
<th>Required</th></tr>
|-
+
<tr>
|  style="padding: 10px" bgcolor="#FFFFFF" | <code>type</code>
+
<td><tt>type</tt></td>
|  style="padding: 10px" bgcolor="#FFFFFF" | string
+
<td>string</td>
|  style="padding: 10px" bgcolor="#FFFFFF" | The type of release information to retrieve. You can specify <code>stable</code>, <code>beta</code>, <code>rc</code>, <code>preprod</code>, or <code>any</code>.  
+
<td>The type of release information to retrieve. You can specify <tt>stable</tt>, <tt>beta</tt>, <tt>rc</tt>, <tt>preprod</tt>, or <tt>any</tt>.  
  
The default value is <code>stable</code>.
+
The default value is <tt>stable</tt>.</td>
|  style="padding: 10px" bgcolor="#FFFFFF" | No
+
<td>No</td></tr>
|}
+
</table>
  
 
=== Response Parameters ===
 
=== Response Parameters ===
  
{| class="wikitable"
+
<table class="table table-striped table-condensed">
!  style="padding: 10px" bgcolor="#F1F1F1" | Parameter
+
<tr>
!  style="padding: 10px" bgcolor="#F1F1F1" | Type
+
<th>Parameter</th>
!  style="padding: 10px" bgcolor="#F1F1F1" | Description
+
<th>Type</th>
|-
+
<th>Description</th>
|  style="padding: 10px" bgcolor="#FFFFFF" | <code>version</code>
+
</tr><tr>
|  style="padding: 10px" bgcolor="#FFFFFF" | string
+
<td><tt>version</tt></td>
|  style="padding: 10px" bgcolor="#FFFFFF" | The most recent version that matches the specified release type.
+
<td>string</td>
|-
+
<td>The most recent version that matches the specified release type.</td>
|  style="padding: 10px" bgcolor="#FFFFFF" | <code>url</code>
+
</tr><tr>
|  style="padding: 10px" bgcolor="#FFFFFF" | string
+
<td><tt>url</tt></td>
|  style="padding: 10px" bgcolor="#FFFFFF" | The download location for the <code>.zip</code> file for that version release.
+
<td>string</td>
|-
+
<td>The download location for the <tt>.zip</tt> file for that version release.</td>
|  style="padding: 10px" bgcolor="#FFFFFF" | <code>sha256Checksum</code>
+
</tr><tr>
|  style="padding: 10px" bgcolor="#FFFFFF" | string
+
<td><tt>sha256Checksum</tt></td>
|  style="padding: 10px" bgcolor="#FFFFFF" | The <code>.zip</code> file's SHA-256 checksum value.  
+
<td>string</td>
|-
+
<td>The <tt>.zip</tt> file's SHA-256 checksum value. </td>
|  style="padding: 10px" bgcolor="#FFFFFF" | <code>releaseNotesUrl</code>
+
</tr><tr>
|  style="padding: 10px" bgcolor="#FFFFFF" | string
+
<td><tt>releaseNotesUrl</tt></td>
|  style="padding: 10px" bgcolor="#FFFFFF" | The URL for the version's [[Release_Notes|release notes]].
+
<td>string</td>
|-
+
<td>The URL for the version's [[Release_Notes|release notes]].</td>
|  style="padding: 10px" bgcolor="#FFFFFF" | <code>changelogUrl</code>
+
</tr><tr>
|  style="padding: 10px" bgcolor="#FFFFFF" | string
+
<td><tt>changelogUrl</tt></td>
|  style="padding: 10px" bgcolor="#FFFFFF" | The URL for the version's [[Changelogs|change log]].
+
<td>string</td>
|}
+
<td>The URL for the version's [[Changelogs|change log]].</td>
 +
</tr>
 +
</table>
  
 
=== Example Request (CURL) ===
 
=== Example Request (CURL) ===
  
<nowiki>curl https://api1.whmcs.com/download/latest?type=stable</nowiki>
+
<div class="source-cli"><nowiki>
 +
curl https://api1.whmcs.com/download/latest?type=stable
 +
</nowiki></div>
  
 
=== Example Response (JSON) ===
 
=== Example Response (JSON) ===
  
<nowiki>{
+
<div class="source-cli">
  "version": "7.9.2",
+
{
  "url": "https://releases.whmcs.com/v2/pkgs/whmcs-7.9.2-release.1.zip",
+
<br/>  "version": "7.9.2",
  "sha256Checksum": "f82c95a78251d4ece9065700f6a66bcc88984b59649e5713bfac07af7cac2707",
+
<br/>  <nowiki>"url": "https://releases.whmcs.com/v2/pkgs/whmcs-7.9.2-release.1.zip"</nowiki>,
  "releaseNotesUrl": "https://docs.whmcs.com/Version_7.9.2_Release_Notes",
+
<br/>  "sha256Checksum": "f82c95a78251d4ece9065700f6a66bcc88984b59649e5713bfac07af7cac2707",
  "changelogUrl": "https://docs.whmcs.com/Changelog:WHMCS_V7.9.2"
+
<br/>  <nowiki>"releaseNotesUrl": "https://docs.whmcs.com/Version_7.9.2_Release_Notes"</nowiki>,
}</nowiki>
+
<br/>  <nowiki>"changelogUrl": "https://docs.whmcs.com/Changelog:WHMCS_V7.9.2"</nowiki>
 +
<br/>}
 +
</div>

Latest revision as of 13:48, 4 May 2020

Getting download information

You can use the WHMCS Service API to retrieve information about recent WHMCS releases, including download locations, with a curl command.

For example:

curl https://api1.whmcs.com/download/latest?type=stable

Input Parameters

Parameter Type Description Required
type string The type of release information to retrieve. You can specify stable, beta, rc, preprod, or any. The default value is stable. No

Response Parameters

Parameter Type Description
version string The most recent version that matches the specified release type.
url string The download location for the .zip file for that version release.
sha256Checksum string The .zip file's SHA-256 checksum value.
releaseNotesUrl string The URL for the version's release notes.
changelogUrl string The URL for the version's change log.

Example Request (CURL)

curl https://api1.whmcs.com/download/latest?type=stable

Example Response (JSON)

{
"version": "7.9.2",
"url": "https://releases.whmcs.com/v2/pkgs/whmcs-7.9.2-release.1.zip",
"sha256Checksum": "f82c95a78251d4ece9065700f6a66bcc88984b59649e5713bfac07af7cac2707",
"releaseNotesUrl": "https://docs.whmcs.com/Version_7.9.2_Release_Notes",
"changelogUrl": "https://docs.whmcs.com/Changelog:WHMCS_V7.9.2"
}