MetadataVersioningAsCuratorApi¶
All URIs are relative to http://localhost
| Method | HTTP request | Description |
|---|---|---|
| PublishStudyByAccessionAsCurator | POST /api/v1/as-curator/integration/studies/{id}/tasks/publish-versions | Asynchronous task that publishes all pending versions for a single study. |
PublishStudyByAccessionAsCurator¶
TaskInfo PublishStudyByAccessionAsCurator(id, version_message = var.version_message)
Asynchronous task that publishes all pending versions for a single study.
This endpoint publishes information from drafts and creates new metadata versions for the specified study and all associated objects. The version name is set to “Auto-published by API call”. Only curators with access to the specified studies can use this method.
Example¶
library(odmApi)
# Asynchronous task that publishes all pending versions for a single study.
#
# prepare function argument(s)
var_id <- "id_example" # character | Supply the accession of the study to be published
var_version_message <- "version_message_example" # character | Supply text to name this version. If not supplied the version name is set to “Auto-published by API call” (Optional)
api_instance <- MetadataVersioningAsCuratorApi$new()
# Configure API key authorization: Access-token
api_instance$api_client$api_keys["Authorization"] <- Sys.getenv("API_KEY")
# Configure API key authorization: Genestack-API-Token
# api_instance$api_client$api_keys["Genestack-API-Token"] <- Sys.getenv("API_KEY")
# to save the result into a file, simply add the optional `data_file` parameter, e.g.
# result <- api_instance$PublishStudyByAccessionAsCurator(var_id, version_message = var_version_messagedata_file = "result.txt")
result <- api_instance$PublishStudyByAccessionAsCurator(var_id, version_message = var_version_message)
dput(result)
Parameters¶
| Name | Type | Description | Notes |
|---|---|---|---|
| id | character | Supply the accession of the study to be published | |
| version_message | character | Supply text to name this version. If not supplied the version name is set to “Auto-published by API call” | [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 | Task information. | - |
| 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). | - |
| 403 | Forbidden | - |
| 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. | - |