Data Release

Create a data release.

Creates a data release.

Takes DataReleaseInitiation JSON as input. Kicks off the Data Release Creation Workflow.

Only USGS identities or members of USGS Data Release Create group can create a data release using this endpoint.

If successful, returns a success message and the data model for the data release that was created only once the document has been written to the Globus Search Index

If unsuccessful, returns an error message.

Invalidates the user's group membership cache so that they can see their new group membership. Uses :func:crud.DataRelease.create.

Data Release Management Groups

Optionally, a user may choose to control access to a data release. This is done by providing Globus groups upon data release creation. For more information about Globus groups, visit: https://docs.globus.org/api/groups/.

A read-only and a read-write group will need to be created in Globus.

.. code-block::

from globus_sdk import GroupsClient, AccessTokenAuthorizer

# 1. Obtain an authorizer (using your access token)
# See https://globus-sdk-python.readthedocs.io/en/3.x-line/user_guide/getting_started/minimal_script.html
authorizer = AccessTokenAuthorizer("<YOUR_ACCESS_TOKEN>")

# 2. Initialize the GroupsClient
groups_client = GroupsClient(authorizer=authorizer)

# 3. Create the group
# See https://globus-sdk-python.readthedocs.io/en/3.x-line/services/groups.html
group_data = {
    "name": "Read-write group",
    "description": "Read-write permissions group for data release",
}
new_group = groups_client.create_group(group_data)

print(f"Group created with ID: {new_group['id']}")

The Horizon service will need to be given permission in the group. Please contact

.. code-block::

import globus_sdk

# 1. Setup the GroupsClient (assumes you have a valid authorizer)
groups_client = globus_sdk.GroupsClient(authorizer=your_authorizer)

# 2. Add the identity with the 'manager' role
group_id = "your-group-uuid"
identity_id = "contact ask-sdm@usgs.gov for the value to use"

response = groups_client.add_member(
    group_id, 
    identity_id, 
    role="manager"
)

print(f"Successfully added manager: {response}")

The resulting UUIDs from the creation of the groups should be saved and included in the request to create the data release.

:param release: The DataReleaseInitiation JSON of the data release to create. :param token: A valid bearer token for the user.

post/datacatalog/api/data-release

Request

  • Base URL
    https://data.usgs.gov (the document declares no server; this is the origin it was published from)
  • Auth
    OAuth 2
    Authorization code: https://auth.globus.org/v2/oauth2/authorize?scope=openid
    Token URL: https://data.usgs.gov/datacatalog/api/auth/login

Request body

usgsApprovalIdentifierstring required
titlestring required
usgsReleaseType'Data Release' | 'Dynamic' | 'Legacy' | 'Software Release'

The type of release. Different types of releases fall under different USGS policy requirements.

dataRelease = "Data Release" Data that are released as a static dataset and governed by USGS Survey Manual Chapter 502.8 dynamic = "Dynamic" Data that are continually collected, processed, quality-controlled, and released in real-time or near-real-time. legacy = "Legacy" Data that were released prior to the implementation of USGS Survey Manual Chapter 502.8. softwareRelease = "Software Release" Software that were released prior to the requirement to publish software at code.usgs.gov.

r_group_uuidstring nullable
rw_group_uuidstring nullable

Response

Successful Response

successboolean required

A boolean (true/false) indicating if the request was successful.

Changes

No recorded changes to this operation across all 1 revision of this API.