Documentation of Thamos Python client

This documentation is automatically generated from sources.

POST /image/metadata

Get metadata for the given image

Query Parameters
  • image (string) – Name of image - can also specify remote registry to pull image from. (Required)

  • registry_user (string) – Registry user to be used for pulling images from registry.

  • registry_password (string) – Registry password or token to be used for pulling images from registry.

  • verify_tls (boolean) – Verify TLS certificates of registry from where images are pulled from.

Status Codes
POST /analyze

Analyze the given image asynchronously.

Query Parameters
  • image (string) – Name of image - can also specify remote registry to pull image from. (Required)

  • registry_user (string) – Registry user to be used for pulling images from registry.

  • registry_password (string) – Registry password or token to be used for pulling images from registry.

  • environment_type (string) – Type of environment (runtime or buildtime) which is being analyzed.

  • origin (string) – A remote where the image is being used. This is used for tracking as well as for automated reporting when results are available.

  • debug (boolean) – Run the given analyzer in a verbose mode so developers can debug analyzer.

  • verify_tls (boolean) – Verify TLS certificates of registry from where images are pulled from.

  • force (boolean) – Do not use cached results, always run analysis.

Status Codes
GET /analyze

Retrieve a list of document ids for analyzer results.

Query Parameters
  • page (integer) – Page offset in pagination.

Status Codes
GET /analyze/{analysis_id}

Retrieve an analyzer result.

Parameters
  • analysis_id (string) – Id of analysis that results should be retrieved.

Status Codes
GET /analyze/by-hash/{image_hash}

Retrieve an analyzer result.

Parameters
  • image_hash (string) – Image hash for identifying image (including hash type, now supported only “sha256”).

Status Codes
GET /analyze/{analysis_id}/log

Show logs of an analysis.

Parameters
  • analysis_id (string) – An id of requested analysis.

Status Codes
GET /analyze/{analysis_id}/status

Show analysis status.

Parameters
  • analysis_id (string) – An id of requested analysis.

Status Codes
POST /provenance/python

Check provenance of packages stated in an application stack.

Query Parameters
  • origin (string) – A repository where the application stack is used. This is used for tracking as well as for automated reporting when results are available.

  • debug (boolean) – Run the provenance checker in a verbose mode so developers can debug it.

  • force (boolean) – Do not use cached results, always run provenance checks.

Status Codes
GET /provenance/python/{analysis_id}

Retrieve a provenance check result.

Parameters
  • analysis_id (string) – An id of requested analysis.

Status Codes
GET /provenance/python/{analysis_id}/log

Show logs of a provenance checks.

Parameters
  • analysis_id (string) – An id of requested analysis.

Status Codes
GET /provenance/python/{analysis_id}/status

Show status of a provenance check.

Parameters
  • analysis_id (string) – An id of requested provenance check.

Status Codes
GET /run-software-environment

Retrieve a list of software environments analyzed for run.

Query Parameters
  • page (integer) – Page offset in pagination.

Status Codes
GET /build-software-environment

Retrieve a list of software environments analyzed for build.

Query Parameters
  • page (integer) – Page offset in pagination.

Status Codes
GET /python-package-index

List registered Python package indexes.

Status Codes
  • 200 OK – Listing of available Python package indexes.

GET /runtime-environment

Retrieve a list of supported runtime environments

Status Codes
GET /hardware-environment

Retrieve a list of supported hardware environments

Query Parameters
  • page (integer) – Page offset in pagination.

Status Codes
GET /software-environment

Retrieve a list of supported software environments

Query Parameters
  • page (integer) – Page offset in pagination.

Status Codes
GET /run-software-environment/analyses/{environment_name}

List analyses for the given software environment for run.

Parameters
  • environment_name (string) – Software environment name for run for which analyses should be retrieved.

Status Codes
  • 200 OK – Listing of analyses for the given software environment for run.

  • 404 Not Found – The given software environment for run with the provided name was not found.

GET /build-software-environment/analyses/{environment_name}

List analyses for the given software environment for build.

Parameters
  • environment_name (string) – Software environment name for run for which analyses should be retrieved.

Status Codes
  • 200 OK – Listing of analyses for the given software environment for build.

  • 404 Not Found – The given software environment for build with the provided name was not found.

POST /advise/python

Get advise for Python ecosystem.

Query Parameters
  • recommendation_type (string) – Recommendation type. (Required)

  • count (integer) – Number of software stacks that should be returned.

  • limit (integer) – Limit number of software stacks scored.

  • origin (string) – A repository where the application stack is used. This is used for tracking as well as for automated reporting when results are available.

  • source_type (string) –

    A flag marking what Thoth integration is requesting adviser:
    • cli: Thamos CLI.

    • s2i: OpenShift’s S2I (Source-to-Image) build.

    • github_app: Qeb-Hwt GitHub App.

    • kebechet: Kebechet Bot.

    • jupyter_notebook: Jupyter Notebook (nb-requirements).

  • dev (boolean) – Consider or do not consider development dependencies when resolving stacks.

  • debug (boolean) – Run the given adviser in a verbose mode so developers can debug it.

  • force (boolean) – Do not use cached results, always run adviser.

  • github_event_type (string) – GitHub’s event type.

  • github_check_run_id (integer) – GitHub’s event id.

  • github_installation_id (integer) – GitHub’s installation id.

  • github_base_repo_url (string) – URL of the GitHub repository containing the Pull Request.

Status Codes
GET /advise/python

Get adviser results available.

Query Parameters
  • page (integer) – Page offset in pagination.

Status Codes
GET /advise/python/{analysis_id}/log

Retrieve a adviser run log.

Parameters
  • analysis_id (string) – An id of analysis for which log should be retrieved.

Status Codes
GET /advise/python/{analysis_id}/status

Show status of an adviser computing recommendations.

Parameters
  • analysis_id (string) – An id of requested adviser run.

Status Codes
GET /advise/python/{analysis_id}

Get computed adviser result based on its id.

Parameters
  • analysis_id (string) – Advise id returned on advise request.

Status Codes
  • 200 OK – Computed pinned down stack with information based on requested requirements advise.

  • 202 Accepted – Results are not ready yet.

  • 400 Bad Request – On invalid request.

  • 404 Not Found – The given advise does not exist.

POST /buildlog

Store the given build log.

Status Codes
GET /buildlog

Retrieve a list of document ids for stored build logs.

Query Parameters
  • page (integer) – Page offset in pagination.

Status Codes
GET /buildlog/{document_id}

Retrieve the given build log.

Parameters
  • document_id (string) – Build log to be retrieved.

Status Codes
POST /kebechet-webhook

Schedule kebechet instance from webhook

Status Codes
POST /qeb-hwt

Schedule Thamos advise for GitHub App.

Status Codes
POST /build-analysis

Analyze the given build imagestream and log.

Query Parameters
  • registry_user (string) – Registry user to be used for pulling images from registry.

  • registry_password (string) – Registry password or token to be used for pulling images from registry.

  • environment_type (string) – Type of environment (runtime or buildtime) which is being analyzed.

  • origin (string) – A remote where the image is being used. This is used for tracking as well as for automated reporting when results are available.

  • debug (boolean) – Run the given analyzer in a verbose mode so developers can debug analyzer.

  • registry_verify_tls (boolean) – Verify TLS certificates of registry from where images are pulled from.

  • force (boolean) – Do not use cached results, always run analysis.

Status Codes
GET /buildlog-analyze

Retrieve a list of document ids for build analyzer results.

Query Parameters
  • page (integer) – Page offset in pagination.

Status Codes
GET /buildlog-analyze/{analysis_id}

Retrieve a build analyzer result.

Parameters
  • analysis_id (string) – An id of requested analysis.

Status Codes
GET /python/platform

Get supported platforms for Python ecosystem.

Status Codes
  • 200 OK – A list of platforms supported for Python ecosystem.

GET /python/dependencies

Get direct dependencies of Python libraries. If environment is provided, take into account environment markers that are evaluated during dependencies installation. If environment is not provided, any environment is considered.

Query Parameters
  • name (string) – Name of the Python Package. (Required)

  • version (string) – Version of the Python Package. (Required)

  • index (string) – Index url of the Python Package. (Required)

  • os_name (string) – Name of operating system to consider as environment where package is installed in.

  • os_version (string) – Version of operating system to consider as environment where package is installed in.

  • python_version (string) – Version of Python interpreter used to install the given package.

  • marker_evaluation_result (boolean) – Consider marker evaluation result for the given environment. If set to None, marker evaluation result is not taken into account.

Status Codes
  • 200 OK – The number of Python packages in Thoth Knowledge Graph.

  • 404 Not Found – The given record does not exist.

GET /python/packages/count

Retrieve information from the Knowledge Graph with regards to total number of Python packages.

Query Parameters
  • name (string) – Name of the Python Package.

  • version (string) – Version of the Python Package.

  • index (string) – Index url of the Python Package.

Status Codes
GET /python/package/metadata

Retrieve metadata relative to a Python Package from the Knowledge Graph.

Query Parameters
  • name (string) – Name of the Python Package. (Required)

  • version (string) – Version of the Python Package. (Required)

  • index (string) – Index url of the Python Package. (Required)

Status Codes