Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions dts/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -389,14 +389,16 @@ def transfer_status(self: "Client",
)

def cancel_transfer(self: "Client",
id: uuid.UUID) -> None:
id: uuid.UUID,
orcid: str) -> None:
"""Cancels a file transfer with the requested UUID.

Status information for the cancelled transfer is retained for a time so its
cancellation can be seen.

Args:
id: A UUID that uniquely identifies the transfer operation to be cancelled.
orcid: The ORCID of the user that initiated the transfer.

Raises:
RuntimeError: Indicates an issue with the DTS client and its connection to the server.
Expand All @@ -406,7 +408,7 @@ def cancel_transfer(self: "Client",
if not self.uri:
raise RuntimeError('dts.Client: not connected.')
try:
response = requests.delete(url=f'{self.uri}/transfers/{id}',
response = requests.delete(url=f'{self.uri}/transfers/{id}?orcid={orcid}',
auth=self.auth)
response.raise_for_status()
except HTTPError as http_err:
Expand Down
2 changes: 1 addition & 1 deletion test/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def setUp(self):
if not self.token:
raise ValueError('Environment variable DTS_KBASE_DEV_TOKEN must be set!')
self.orcid = os.getenv('DTS_KBASE_TEST_ORCID')
self.server = "https://lb-dts.staging.kbase.us"
self.server = "https://dts.kbase.us"

def test_ctor(self):
client = dts.Client(api_key = self.token, server = self.server)
Expand Down
Loading