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 an 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
200 OK – Information about the given image
400 Bad Request – On an invalid request
403 Forbidden – If the user or anonymous is not authorized to pull image
- Response Headers
x-thoth-version – Thoth User API version identifier
x-user-api-service-version – Full Thoth User API version identifier used for debugging
x-thoth-search-ui-url – Thoth Search UI URL
x-thoth-version – Thoth User API version identifier
x-user-api-service-version – Full Thoth User API version identifier used for debugging
x-thoth-version – Thoth User API version identifier
x-user-api-service-version – Full Thoth User API version identifier used for debugging
- POST /analyze¶
Analyze the given image asynchronously
- Query Parameters
image (string) – Name of an 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
debug (boolean) – Run the given analyzer in a verbose mode so developers can debug it
verify_tls (boolean) – Verify TLS certificates of registry from where images are pulled from
force (boolean) – Do not use cached results, always run the analysis
- Status Codes
202 Accepted – Successful response with an analyzer identifier
400 Bad Request – On an invalid request
- Response Headers
x-thoth-version – Thoth User API version identifier
x-user-api-service-version – Full Thoth User API version identifier used for debugging
x-thoth-search-ui-url – Thoth Search UI URL
x-thoth-version – Thoth User API version identifier
x-user-api-service-version – Full Thoth User API version identifier used for debugging
- GET /analyze/{analysis_id}¶
Retrieve an analyzer result
- Parameters
analysis_id (string) – An identifier of the requested analysis
- Status Codes
200 OK – Analyzer result retrieved
202 Accepted – Results are not ready yet
400 Bad Request – On an invalid request
404 Not Found – The given document does not exist
- Response Headers
x-thoth-version – Thoth User API version identifier
x-user-api-service-version – Full Thoth User API version identifier used for debugging
x-thoth-search-ui-url – Thoth Search UI URL
x-thoth-version – Thoth User API version identifier
x-user-api-service-version – Full Thoth User API version identifier used for debugging
x-thoth-version – Thoth User API version identifier
x-user-api-service-version – Full Thoth User API version identifier used for debugging
x-thoth-version – Thoth User API version identifier
x-user-api-service-version – Full Thoth User API version identifier used for debugging
- 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
200 OK – Analyzer result retrieved
202 Accepted – Results are not ready yet
400 Bad Request – On an invalid request
404 Not Found – The given document does not exist
- Response Headers
x-thoth-version – Thoth User API version identifier
x-user-api-service-version – Full Thoth User API version identifier used for debugging
x-thoth-version – Thoth User API version identifier
x-user-api-service-version – Full Thoth User API version identifier used for debugging
x-thoth-version – Thoth User API version identifier
x-user-api-service-version – Full Thoth User API version identifier used for debugging
x-thoth-version – Thoth User API version identifier
x-user-api-service-version – Full Thoth User API version identifier used for debugging
- GET /analyze/{analysis_id}/log¶
Show logs of an analysis
- Parameters
analysis_id (string) – An identifier of the requested analysis
- Status Codes
200 OK – A container image analysis log
400 Bad Request – On an invalid request
404 Not Found – The given image analysis log does not exist
- Response Headers
x-thoth-version – Thoth User API version identifier
x-user-api-service-version – Full Thoth User API version identifier used for debugging
x-thoth-search-ui-url – Thoth Search UI URL
x-thoth-version – Thoth User API version identifier
x-user-api-service-version – Full Thoth User API version identifier used for debugging
x-thoth-version – Thoth User API version identifier
x-user-api-service-version – Full Thoth User API version identifier used for debugging
- GET /analyze/{analysis_id}/status¶
Show an analysis status
- Parameters
analysis_id (string) – An identifier of the requested analysis
- Status Codes
200 OK – Status for the given container image analysis
404 Not Found – No analysis with the given identifier found
400 Bad Request – On an invalid request
- Response Headers
x-thoth-version – Thoth User API version identifier
x-user-api-service-version – Full Thoth User API version identifier used for debugging
x-thoth-search-ui-url – Thoth Search UI URL
x-thoth-version – Thoth User API version identifier
x-user-api-service-version – Full Thoth User API version identifier used for debugging
x-thoth-version – Thoth User API version identifier
x-user-api-service-version – Full Thoth User API version identifier used for debugging
- POST /provenance/python¶
Check provenance of packages stated in an application stack
- Query Parameters
origin (string) – A repository where the application stack is used
debug (boolean) – Run the given analyzer in a verbose mode so developers can debug it
force (boolean) – Do not use cached results, always run the analysis
token (string) – An API token for authenticated requests
- Status Codes
202 Accepted – The provided files will be checked for provenance
401 Unauthorized – Unauthorized request
400 Bad Request – On an invalid request
- Response Headers
x-thoth-version – Thoth User API version identifier
x-user-api-service-version – Full Thoth User API version identifier used for debugging
x-thoth-version – Thoth User API version identifier
x-user-api-service-version – Full Thoth User API version identifier used for debugging
x-thoth-version – Thoth User API version identifier
x-user-api-service-version – Full Thoth User API version identifier used for debugging
- GET /provenance/python/{analysis_id}¶
Retrieve a provenance check result
- Parameters
analysis_id (string) – An identifier of the requested analysis
- Status Codes
200 OK – Provenance report retrieved
202 Accepted – Results are not ready yet
400 Bad Request – On an invalid request
404 Not Found – The given document does not exist
- Response Headers
x-thoth-version – Thoth User API version identifier
x-user-api-service-version – Full Thoth User API version identifier used for debugging
x-thoth-version – Thoth User API version identifier
x-user-api-service-version – Full Thoth User API version identifier used for debugging
x-thoth-version – Thoth User API version identifier
x-user-api-service-version – Full Thoth User API version identifier used for debugging
x-thoth-version – Thoth User API version identifier
x-user-api-service-version – Full Thoth User API version identifier used for debugging
- GET /provenance/python/{analysis_id}/log¶
Show logs of a provenance check
- Parameters
analysis_id (string) – An identifier of the requested analysis
- Status Codes
200 OK – A provenance check log
400 Bad Request – On an invalid request
404 Not Found – The given image analysis log does not exist
- Response Headers
x-thoth-version – Thoth User API version identifier
x-user-api-service-version – Full Thoth User API version identifier used for debugging
x-thoth-version – Thoth User API version identifier
x-user-api-service-version – Full Thoth User API version identifier used for debugging
x-thoth-version – Thoth User API version identifier
x-user-api-service-version – Full Thoth User API version identifier used for debugging
- GET /provenance/python/{analysis_id}/status¶
Show status of a provenance check
- Parameters
analysis_id (string) – An identifier of the requested analysis
- Status Codes
200 OK – Status for the given provenance checker
404 Not Found – No analysis with the given identifier found
400 Bad Request – On an invalid request
- Response Headers
x-thoth-version – Thoth User API version identifier
x-user-api-service-version – Full Thoth User API version identifier used for debugging
x-thoth-version – Thoth User API version identifier
x-user-api-service-version – Full Thoth User API version identifier used for debugging
x-thoth-version – Thoth User API version identifier
x-user-api-service-version – Full Thoth User API version identifier used for debugging
- GET /python-package-index¶
List registered Python package indexes
- Status Codes
200 OK – Listing of available Python package indexes
- Response Headers
x-thoth-version – Thoth User API version identifier
x-user-api-service-version – Full Thoth User API version identifier used for debugging
x-thoth-search-ui-url – Thoth Search UI URL
- POST /advise/python¶
Get an advise for a Python application
- Query Parameters
recommendation_type (string) – Recommendation type (Required)
origin (string) – A repository where the application stack is used
source_type (string) – A flag marking what Thoth integration is requesting adviser: * cli: Thamos CLI * s2i: OpenShift’s S2I (Source-to-Image) build * kebechet: Kebechet Bot * jupyter_notebook: Jupyter Notebook using jupyterlab-requirements
dev (boolean) – Consider or do not consider development dependencies when resolving stacks
debug (boolean) – Run the given analyzer in a verbose mode so developers can debug it
force (boolean) – Do not use cached results, always run the analysis
token (string) – An API token for authenticated requests
- Status Codes
202 Accepted – The adviser is scheduled
401 Unauthorized – Unauthorized request
400 Bad Request – On an invalid request
- Response Headers
x-thoth-version – Thoth User API version identifier
x-user-api-service-version – Full Thoth User API version identifier used for debugging
x-thoth-search-ui-url – Thoth Search UI URL
x-thoth-version – Thoth User API version identifier
x-user-api-service-version – Full Thoth User API version identifier used for debugging
x-thoth-version – Thoth User API version identifier
x-user-api-service-version – Full Thoth User API version identifier used for debugging
- GET /container-images¶
List available Thoth container images
- Query Parameters
page (integer) – Page offset in pagination
per_page (integer) – Number of items returned per page
os_name (string) – Name of the operating system to consider
os_version (string) – Version of the operating system to consider
python_version (string) – Version of Python interpreter provided
cuda_version (string) – Filter based on CUDA version available
image_name (string) – Filter based on the image name
library_name (string) – Filter based on library name
symbol (string) – Filter based on symbol
package_name (string) – Filter based on Python package name
rpm_package_name (string) – Filter based on RPM package name
- Status Codes
200 OK – A list of available Thoth container images
400 Bad Request – On an invalid request
404 Not Found – No Thoth container images with the given Image found
- Response Headers
x-thoth-version – Thoth User API version identifier
x-user-api-service-version – Full Thoth User API version identifier used for debugging
x-thoth-search-ui-url – Thoth Search UI URL
page – Current page
per_page – Page size
page_count – Number of pages
entries_count – Total number of entries
next – Next page in pagination, if any
prev – Previous page in pagination, if any
x-thoth-version – Thoth User API version identifier
x-user-api-service-version – Full Thoth User API version identifier used for debugging
x-thoth-version – Thoth User API version identifier
x-user-api-service-version – Full Thoth User API version identifier used for debugging
- GET /advise/python/{analysis_id}/log¶
Retrieve an adviser run log
- Parameters
analysis_id (string) – An identifier of the requested analysis
- Status Codes
200 OK – An adviser log
400 Bad Request – On an invalid request
404 Not Found – The given adviser log does not exist
- Response Headers
x-thoth-version – Thoth User API version identifier
x-user-api-service-version – Full Thoth User API version identifier used for debugging
x-thoth-search-ui-url – Thoth Search UI URL
x-thoth-version – Thoth User API version identifier
x-user-api-service-version – Full Thoth User API version identifier used for debugging
x-thoth-version – Thoth User API version identifier
x-user-api-service-version – Full Thoth User API version identifier used for debugging
- GET /advise/python/{analysis_id}/status¶
Show status of an adviser computing recommendations
- Parameters
analysis_id (string) – An identifier of the requested analysis
- Status Codes
200 OK – An adviser status
404 Not Found – No analysis with the given identifier found
400 Bad Request – On an invalid request
- Response Headers
x-thoth-version – Thoth User API version identifier
x-user-api-service-version – Full Thoth User API version identifier used for debugging
x-thoth-search-ui-url – Thoth Search UI URL
x-thoth-version – Thoth User API version identifier
x-user-api-service-version – Full Thoth User API version identifier used for debugging
x-thoth-version – Thoth User API version identifier
x-user-api-service-version – Full Thoth User API version identifier used for debugging
- GET /advise/python/{analysis_id}¶
Get computed adviser result based on its identifier
- Parameters
analysis_id (string) – An identifier of the requested analysis
- Status Codes
200 OK – Computed pinned down stack for the given Python application
202 Accepted – Results are not ready yet
400 Bad Request – On an invalid request
404 Not Found – The given advise does not exist
- Response Headers
x-thoth-version – Thoth User API version identifier
x-user-api-service-version – Full Thoth User API version identifier used for debugging
x-thoth-search-ui-url – Thoth Search UI URL
x-thoth-version – Thoth User API version identifier
x-user-api-service-version – Full Thoth User API version identifier used for debugging
x-thoth-version – Thoth User API version identifier
x-user-api-service-version – Full Thoth User API version identifier used for debugging
x-thoth-version – Thoth User API version identifier
x-user-api-service-version – Full Thoth User API version identifier used for debugging
- GET /buildlog/{document_id}¶
Retrieve the given build log
- Parameters
document_id (string) – Build log to be retrieved
- Status Codes
200 OK – Relevant build log document
400 Bad Request – On an invalid request
404 Not Found – The given build log does not exist
- Response Headers
x-thoth-version – Thoth User API version identifier
x-user-api-service-version – Full Thoth User API version identifier used for debugging
x-thoth-version – Thoth User API version identifier
x-user-api-service-version – Full Thoth User API version identifier used for debugging
x-thoth-version – Thoth User API version identifier
x-user-api-service-version – Full Thoth User API version identifier used for debugging
- POST /kebechet-webhook¶
Schedule kebechet instance from webhook, this endpoint is not intended for users
- Status Codes
202 Accepted – Accepted
400 Bad Request – Invalid
501 Not Implemented – Functionality not supported
- Response Headers
x-thoth-version – Thoth User API version identifier
x-user-api-service-version – Full Thoth User API version identifier used for debugging
x-thoth-version – Thoth User API version identifier
x-user-api-service-version – Full Thoth User API version identifier used for debugging
x-thoth-version – Thoth User API version identifier
x-user-api-service-version – Full Thoth User API version identifier used for debugging
- POST /repo-init¶
Initialize the user’s provided repository.
- Status Codes
202 Accepted – Repository initialization has been scheduled
400 Bad Request – Invalid
- Response Headers
x-thoth-version – Thoth User API version identifier
x-user-api-service-version – Full Thoth User API version identifier used for debugging
x-thoth-version – Thoth User API version identifier
x-user-api-service-version – Full Thoth User API version identifier used for debugging
- POST /build-analysis¶
Analyze the given build imagestream and log
- Query Parameters
base_registry_user (string) – Registry user to be used for pulling images from registry
base_registry_password (string) – Registry password or token to be used for pulling images from source registry
base_registry_verify_tls (boolean) – Verify TLS certificates of registry from where images are pulled from during the build
output_registry_user (string) – Registry user to be used for pulling images from registry
output_registry_password (string) – Registry password or token to be used for pulling images from destination registry
output_registry_verify_tls (boolean) – Verify TLS certificates of registry from where images are pulled to during the build
environment_type (string) – Type of environment (runtime or buildtime) which is being analyzed
origin (string) – A remote where the image is being used
debug (boolean) – Run the given analyzer in a verbose mode so developers can debug it
force (boolean) – Do not use cached results, always run the analysis
- Status Codes
202 Accepted – Successful response with an analyzer identifier
400 Bad Request – On an invalid request
- Response Headers
x-thoth-version – Thoth User API version identifier
x-user-api-service-version – Full Thoth User API version identifier used for debugging
x-thoth-version – Thoth User API version identifier
x-user-api-service-version – Full Thoth User API version identifier used for debugging
- GET /python/platform¶
Get supported platforms for the Python ecosystem
- Status Codes
200 OK – A list of platforms supported for the Python ecosystem
- Response Headers
x-thoth-version – Thoth User API version identifier
x-user-api-service-version – Full Thoth User API version identifier used for debugging
x-thoth-search-ui-url – Thoth Search UI URL
- GET /python/environment¶
Get environments available for Python resolutions
- Status Codes
200 OK – Listing of available environments
- Response Headers
x-thoth-version – Thoth User API version identifier
x-user-api-service-version – Full Thoth User API version identifier used for debugging
x-thoth-search-ui-url – Thoth Search UI URL
- GET /python/package/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 the operating system to consider
os_version (string) – Version of the operating system to consider
python_version (string) – Version of Python interpreter provided
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 – Dependencies for the given Python package
404 Not Found – The given record does not exist
- Response Headers
x-thoth-version – Thoth User API version identifier
x-user-api-service-version – Full Thoth User API version identifier used for debugging
x-thoth-search-ui-url – Thoth Search UI URL
x-thoth-version – Thoth User API version identifier
x-user-api-service-version – Full Thoth User API version identifier used for debugging
- GET /python/package¶
List Python packages
- Query Parameters
page (integer) – Page offset in pagination
per_page (integer) – Number of items returned per page
os_name (string) – Name of the operating system to consider
os_version (string) – Version of the operating system to consider
python_version (string) – Version of Python interpreter provided
like (string) – Filter Python package name by string. (wildcard characters “%” and “_” are supported)
- Status Codes
200 OK – Listing of available Python packages
- Response Headers
x-thoth-version – Thoth User API version identifier
x-user-api-service-version – Full Thoth User API version identifier used for debugging
x-thoth-search-ui-url – Thoth Search UI URL
page – Current page
per_page – Page size
page_count – Number of pages
entries_count – Total number of entries
next – Next page in pagination, if any
prev – Previous page in pagination, if any
- GET /python/package/versions¶
List versions of the given Python package
- Query Parameters
order_by (string) – Sort the response list
name (string) – Name of the Python Package (Required)
os_name (string) – Name of the operating system to consider
os_version (string) – Version of the operating system to consider
python_version (string) – Version of Python interpreter provided
- Status Codes
200 OK – Listing of available Python versions
404 Not Found – The given record does not exist
400 Bad Request – On an invalid request
- Response Headers
x-thoth-version – Thoth User API version identifier
x-user-api-service-version – Full Thoth User API version identifier used for debugging
x-thoth-search-ui-url – Thoth Search UI URL
x-thoth-version – Thoth User API version identifier
x-user-api-service-version – Full Thoth User API version identifier used for debugging
x-thoth-version – Thoth User API version identifier
x-user-api-service-version – Full Thoth User API version identifier used for debugging
- GET /python/package/version/environments¶
List environments used to solve the given Python package
- 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
200 OK – Listing of environments used to solve the given Python package
- Response Headers
x-thoth-version – Thoth User API version identifier
x-user-api-service-version – Full Thoth User API version identifier used for debugging
x-thoth-search-ui-url – Thoth Search UI URL
- GET /python/package/version/metadata¶
Get metadata for the given package
- 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 (Required)
os_version (string) – Version of operating system to consider as environment where package is installed in (Required)
python_version (string) – Version of Python interpreter used to install the given package (Required)
- Status Codes
200 OK – Metadata information for the given Python package version
404 Not Found – No record found
- Response Headers
x-thoth-version – Thoth User API version identifier
x-user-api-service-version – Full Thoth User API version identifier used for debugging
x-thoth-search-ui-url – Thoth Search UI URL
x-thoth-version – Thoth User API version identifier
x-user-api-service-version – Full Thoth User API version identifier used for debugging
- GET /python/imports¶
List imported packages (name, version, index)
- Query Parameters
import_name (string) – Names of the Python Packages (name, version, index) for the given import package name (Required)
- Status Codes
200 OK – Listing of available Python package names
404 Not Found – The given record does not exist
- Response Headers
x-thoth-version – Thoth User API version identifier
x-user-api-service-version – Full Thoth User API version identifier used for debugging
x-thoth-version – Thoth User API version identifier
x-user-api-service-version – Full Thoth User API version identifier used for debugging