odm_api.CellsAsCuratorApi¶
All URIs are relative to http://localhost
| Method | HTTP request | Description |
|---|---|---|
| get_cell_by_id_as_curator | GET /api/v1/as-curator/cells/{id} | Retrieve a cell by ID |
| get_cells_by_group_as_curator | GET /api/v1/as-curator/cells/by/group/{id} | Retrieve cells from a given group |
get_cell_by_id_as_curator¶
object get_cell_by_id_as_curator(id)
Retrieve a cell by 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.CellsAsCuratorApi(api_client)
id = 'id_example' # str | Unique cell identifier. Consists of a cell group accession and a cell barcode, separated by a hyphen, e.g. `GSF123456-AAACCTGAGCGCTCCA-1`.
try:
# Retrieve a cell by ID
api_response = api_instance.get_cell_by_id_as_curator(id)
print("The response of CellsAsCuratorApi->get_cell_by_id_as_curator:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling CellsAsCuratorApi->get_cell_by_id_as_curator: %s\n" % e)
Parameters¶
| Name | Type | Description | Notes |
|---|---|---|---|
| id | str | Unique cell identifier. Consists of a cell group accession and a cell barcode, separated by a hyphen, e.g. `GSF123456-AAACCTGAGCGCTCCA-1`. |
Return type¶
object
Authorization¶
Access-token, Genestack-API-Token
HTTP request headers¶
- Content-Type: Not defined
- Accept: application/json
HTTP response details¶
| Status code | Description | Response headers |
|---|---|---|
| 200 | The request was successful. The returned value is the object. | - |
| 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 ID 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]
get_cells_by_group_as_curator¶
CellListResponse get_cells_by_group_as_curator(id, page_limit=page_limit, cursor=cursor)
Retrieve cells from a given group
Paging¶
For performance reasons this endpoint returns results in "pages" of limited size together with a cursor tag.
To retrieve the next page of results please supply this cursor tag to resume the query from your previous result and get the next page.
If there are no more results you will just retrieve an empty result.
Example¶
- Api Key Authentication (Access-token):
- Api Key Authentication (Genestack-API-Token):
import odm_api
from odm_api.models.cell_list_response import CellListResponse
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.CellsAsCuratorApi(api_client)
id = 'id_example' # str | Unique identifier (accession) of the cell group.
page_limit = 56 # int | Maximum number of results to return per page (see Paging above). This value must be between 0 and 10000 (inclusive). The default is 2000. (optional)
cursor = 'cursor_example' # str | The page tag to resume results from (see Paging above). Cell ID is currently used as a cursor. (optional)
try:
# Retrieve cells from a given group
api_response = api_instance.get_cells_by_group_as_curator(id, page_limit=page_limit, cursor=cursor)
print("The response of CellsAsCuratorApi->get_cells_by_group_as_curator:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling CellsAsCuratorApi->get_cells_by_group_as_curator: %s\n" % e)
Parameters¶
| Name | Type | Description | Notes |
|---|---|---|---|
| id | str | Unique identifier (accession) of the cell group. | |
| page_limit | int | Maximum number of results to return per page (see Paging above). This value must be between 0 and 10000 (inclusive). The default is 2000. | [optional] |
| cursor | str | The page tag to resume results from (see Paging above). Cell ID is currently used as a cursor. | [optional] |
Return type¶
Authorization¶
Access-token, Genestack-API-Token
HTTP request headers¶
- Content-Type: Not defined
- Accept: application/json
HTTP response details¶
| Status code | Description | Response headers |
|---|---|---|
| 200 | The request was successful. The returned value is a list of objects. | - |
| 400 | Cell data cannot be retrieved. | - |
| 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 | No object exists with the given ID. | - |
| 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]