Skip to main content

Download Project Ingredients

An ActiveState runtime consists of multiple components, dependencies, and language files. This document outlines how you can download the source files for components in your runtime.

For more info on the ActiveState GraphQL API, click here.

In this article:

To download a current list of the components of your project you must:

  1. Download and install the State Tool.
  2. Authenticate your account using the state auth command.
  3. Generate a JSON web token for your project by using the state export jwt command and copy the result.
  4. Open the GraphQL interface.
  5. Click on the Headers button at the bottom of the page and paste in the following:
{
"Authorization": "Bearer <JWT-here>"
}
  1. Use the GraphQL interface to send a query. See a sample query below. The query output includes a download link to each of the individual components. You will use these links to download the tar.gz for each component.

Using graphQL

Example query:

query slsa {
project(organization: "<ORG-NAME>", project: "<PROJECT-NAME>") {
__typename
... on Project {
commit {
... on Commit {
build {
... on Build {
nodes {
__typename
... on Source {
nodeId
namespace
name
url
patches {
sequenceNumber
description
content
}
}
}
}
}
}
}
}
}
}

Replace <ORG-NAME> and <PROJECT-NAME> with information about your project and run the query. After running this query, replacing the project name and org in the example with the information from your project, you will get an output on the right-hand side of the screen.

Example query output:

{
"__typename": "Source",
"nodeId": "<node-id-here>",
"namespace": "language/python",
"name": "scipy",
"url": "<download-link>",
}

Download a tar.gz for a specific component

You can download any of the component's tar/zip files using the component link generated by the process above and by using the following curl command:

curl -v -L -O --header "Authorization: Bearer <JWT_TOKEN>" <FILE_URL>

Replace the <JWT_TOKEN> with the JSON web token generated in step 3. Use the URL of the tar/zip file in the GraphQL output as the <FILE_URL> in the above curl command. This will download the requested file to your current working directory.