Adhoc Commands
The adhoc command group views and manages Adhoc Shares. An Adhoc Share is a temporary, on-demand file share created by a WTC user. It generates a link that allows recipients to download the file without a UDMG Account. Each share tracks its download count, expiration date, and can be revoked or unrevoked by an Admin.
For command line syntax, see the UDMG Client CLI overview.
Commands Overview
| Command | Description | Required Role |
|---|---|---|
adhoc get <shareID> | Retrieves the details of an Adhoc Share identified by ID. | Any |
adhoc list | Returns all Adhoc Shares. | Any |
adhoc refresh <shareID> | Resets the download count for an Adhoc Share to zero. |
|
adhoc revoke <shareID> | Disables an Adhoc Share, preventing further downloads. |
|
adhoc unrevoke <shareID> | Re-enables a previously revoked Adhoc Share. |
|
Authentication
Every udmg-client command authenticates to the UDMG Server using a UDMG username and password. Supply them with the --auth-username and --auth-password flags, or set the UDMG_CLI_AUTH_USERNAME and UDMG_CLI_AUTH_PASSWORD environment variables. For details and examples, see Authentication.
Commands Reference
get
Description
Retrieves the details of an Adhoc Share identified by ID.
Required role
- Any
Command line syntax
udmg-client [global options] adhoc get <shareID>
Arguments
| Argument | Description |
|---|---|
<shareID> | Adhoc Share ID. |
Global options
See Global Options for connection, authentication, and output options. These can appear anywhere in the command line. Connection and authentication options can be supplied as environment variables.
Example
udmg-client adhoc get 550e8400-e29b-41d4-a716-446655440000
list
Description
Returns all Adhoc Shares.
Required role
- Any
Command line syntax
udmg-client [global options] adhoc list [command-specific options]
Command-specific options
| Option | Description | Required | Default |
|---|---|---|---|
--page | Page number. | No | (none) |
--page-size | Number of items per page. | No | (none) |
--order-by | Field to sort results by. Accepted values: id, size, expiresAt, sharedAt, filename. | No | (none) |
--order | Sort direction. Accepted values: asc, desc. | No | (none) |
Global options
See Global Options for connection, authentication, and output options. These can appear anywhere in the command line. Connection and authentication options can be supplied as environment variables.
Example
udmg-client adhoc list --page 1 --page-size 10 --order asc --order-by sharedAt
refresh
Description
Resets the download count for an Adhoc Share to zero.
Required role
- System Administrator
- Domain Administrator
Command line syntax
udmg-client [global options] adhoc refresh <shareID>
Arguments
| Argument | Description |
|---|---|
<shareID> | Adhoc Share ID. |
Global options
See Global Options for connection, authentication, and output options. These can appear anywhere in the command line. Connection and authentication options can be supplied as environment variables.
Example
udmg-client adhoc refresh 550e8400-e29b-41d4-a716-446655440000
revoke
Description
Disables an Adhoc Share, preventing further downloads.
Required role
- System Administrator
- Domain Administrator
Command line syntax
udmg-client [global options] adhoc revoke <shareID>
Arguments
| Argument | Description |
|---|---|
<shareID> | Adhoc Share ID. |
Global options
See Global Options for connection, authentication, and output options. These can appear anywhere in the command line. Connection and authentication options can be supplied as environment variables.
Example
udmg-client adhoc revoke 550e8400-e29b-41d4-a716-446655440000
unrevoke
Description
Re-enables a previously revoked Adhoc Share.
Required role
- System Administrator
- Domain Administrator
Command line syntax
udmg-client [global options] adhoc unrevoke <shareID>
Arguments
| Argument | Description |
|---|---|
<shareID> | Adhoc Share ID. |
Global options
See Global Options for connection, authentication, and output options. These can appear anywhere in the command line. Connection and authentication options can be supplied as environment variables.
Example
udmg-client adhoc unrevoke 550e8400-e29b-41d4-a716-446655440000