odm_api.FilesIntegrationAsUserApi¶
All URIs are relative to http://localhost
| Method | HTTP request | Description |
|---|---|---|
| get_files_by_study_as_user | GET /api/v1/as-user/integration/link/files/by/study/{id} | Retrieve file's metadata by study ID |
get_files_by_study_as_user¶
List[object] get_files_by_study_as_user(id, include_contents=include_contents)
Retrieve file's metadata by study ID
Example¶
- Api Key Authentication (Access-token):
- Api Key Authentication (Genestack-API-Token):
import odm_api
from odm_api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = odm_api.Configuration(
host = "http://localhost"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: Access-token
configuration.api_key['Access-token'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Access-token'] = 'Bearer'
# Configure API key authorization: Genestack-API-Token
configuration.api_key['Genestack-API-Token'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Genestack-API-Token'] = 'Bearer'
# Enter a context with an instance of the API client
with odm_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = odm_api.FilesIntegrationAsUserApi(api_client)
id = 'id_example' # str | Unique identifier (accession) of the object.
include_contents = False # bool | Select `true` in order to include file structure (contents) for .h5, .h5ad, .zip, .gz to the response. (optional) (default to False)
try:
# Retrieve file's metadata by study ID
api_response = api_instance.get_files_by_study_as_user(id, include_contents=include_contents)
print("The response of FilesIntegrationAsUserApi->get_files_by_study_as_user:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling FilesIntegrationAsUserApi->get_files_by_study_as_user: %s\n" % e)
Parameters¶
| Name | Type | Description | Notes |
|---|---|---|---|
| id | str | Unique identifier (accession) of the object. | |
| include_contents | bool | Select `true` in order to include file structure (contents) for .h5, .h5ad, .zip, .gz to the response. | [optional] [default to False] |
Return type¶
List[object]
Authorization¶
Access-token, Genestack-API-Token
HTTP request headers¶
- Content-Type: Not defined
- Accept: application/json, text/tab-separated-values
HTTP response details¶
| Status code | Description | Response headers |
|---|---|---|
| 200 | The request was successful. The returned value is a list of objects. | - |
| 400 | Invalid data in the request. See the error message for details. | - |
| 401 | User is not authenticated. Please supply a valid Access Token in the `Authorization` HTTP header (e.g. Authorization: bearer [token]) or Genestack API token in the `Genestack-API-Token` header (this token may be obtained from the Genestack UI Profile page). | - |
| 404 | Object with provided accession could not be found in ODM. | - |
| 500 | An internal server error occurred. This indicates an unexpected failure in the Genestack system, please file a bug report to support@genestack.com, including the error details. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]