Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 14 Current »

Use curl

CAST Extend has a built in API that can be accessed in a manner of ways. It is therefore possible to download extensions using the API, for example with curl:

curl -# -O -J "https://extendng.castsoftware.com/api/package/download/<id>/[<version>]" -H "x-nuget-apikey: <my_api_key>" -H "accept: application/octet-stream"
curl option -#Displays a rudimentary progress bar to show download progress.
curl option -ODownloads the .nupkg file to the current folder using the file name specified on the Extend server. See https://curl.haxx.se/docs/manpage.html#-O
curl option -J

Tells the -O option to use the server-specified Content-Disposition filename instead of extracting a filename from the URL. See https://curl.haxx.se/docs/manpage.html#-J.

<id>

Specify the ID of the extension you would like to download. The ID of an extension always takes the form com.castsoftware.<name>, without any version numbers. You can determine the ID of an extension using the CAST Extend website:

[<version>]
Specify the version number of the extension you would like to download. You can determine the ID of an extension using the CAST Extend website:

This option is not mandatory. When omitted, the most recent version of the extension you require will always be downloaded.
-H "x-nuget-apikey: <my_api_key>"

Sends your your unique API key as a header - this will grant you access without needing to authenticate. You can find your API key in your user profile in the CAST Extend website:

-H "accept: application/octet-stream"Tells the server (CAST Extend) that the client (curl) is able to accept a specific type of binary download.

Examples

Download the com.castsoftware.shell extension, version 1.1.1-funcrel:

curl -# -O -J "https://extendng.castsoftware.com/api/package/download/com.castsoftware.shell/1.1.1-funcrel" -H "x-nuget-apikey: 57asdfs-bccb-44f380c1f905" -H "accept: application/octet-stream"

Download the lastest version of the com.castsoftware.shell extension:

curl -# -O -J "https://extendng.castsoftware.com/api/package/download/com.castsoftware.shell" -H "x-nuget-apikey: 57asdfs-bccb-44f380c1f905" -H "accept: application/octet-stream"

Download multiple extensions:

  • com.castsoftware.shell extension, version 1.1.1-funcrel
  • com.castsoftware.jee extension, latest version
curl -# -O -J "https://extendng.castsoftware.com/api/package/download/com.castsoftware.shell/1.1.1-funcrel" -H "x-nuget-apikey: 57asdfs-bccb-44f380c1f905" -H "accept: application/octet-stream"
curl -# -O -J "https://extendng.castsoftware.com/api/package/download/com.castsoftware.jee" -H "x-nuget-apikey: 57asdfs-bccb-44f380c1f905" -H "accept: application/octet-stream"
  • No labels