One Stop: Attachments CLI commands
One Stop overview · All One Stop CLI topics · MCP reference
List files on a verified target before downloading or changing them. Uploads use the configured One Stop upload directory. Uploading, downloading, renaming and deleting require confirmation.
ntu onestop attachments list request:REQUEST_ID
Replace capitalized placeholders with values returned by the service. Use --help after a command for its current options. Choose a command to see its arguments, examples and result fields.
TARGET identifies the parent record:
request:REQUEST_IDfor one of your requests; use--record-idwhen its details identify a particular record.article:ARTICLE_IDfor a readable knowledge article.comment:ARTICLE_ID/COMMENT_IDfor a visible article comment.
Draft attachments are managed inside the interactive request workflow rather than by a separate CLI command.
| Command | What it does |
|---|---|
ntu onestop attachments list |
List attachments on a verified own request/item or a readable knowledge article/comment. |
ntu onestop attachments upload |
Upload an explicitly selected file from the configured One Stop upload directory to the verified target. |
ntu onestop attachments download |
Download a listed attachment of the verified target to a new explicit absolute file path, up to 20 MB. |
ntu onestop attachments delete |
Delete an attachment only when it is listed on the verified target and native editing is allowed. |
ntu onestop attachments rename |
Rename a listed editable attachment using the native attachment service. |
Command details
ntu onestop attachments list
List attachments on a verified own request/item or a readable knowledge article/comment.
Usage
ntu onestop attachments list request:REQUEST_ID
Replace the uppercase placeholders with values returned by the relevant listing or details command. Use ntu onestop attachments list --help for the current interface.
Arguments and options
TARGET: Required. A verified target such asrequest:REQUEST_ID,article:ARTICLE_ID, orcomment:ARTICLE_ID/COMMENT_ID.--record-id: A record ID for a request target when the request contains multiple records.--json,-j: Write the result as JSON to stdout; diagnostics go to stderr.
Result
The result may include: retrieved_at, source_url, cached, attachments, can_upload, max_upload_bytes.
For the corresponding MCP operation and its field types, see the MCP schema.
ntu onestop attachments upload
Upload an explicitly selected file from the configured One Stop upload directory to the verified target.
This operation requires local confirmation and is refused when confirmation cannot be obtained interactively.
Usage
ntu onestop attachments upload request:REQUEST_ID /absolute/path/to/onestop-uploads/upload.pdf
Replace the uppercase placeholders with values returned by the relevant listing or details command. Use ntu onestop attachments upload --help for the current interface.
Arguments and options
TARGET: Required. A verified target such asrequest:REQUEST_ID,article:ARTICLE_ID, orcomment:ARTICLE_ID/COMMENT_ID.FILE_PATH: Required. The path of the local file to upload.--record-id: A record ID for a request target when the request contains multiple records.--json,-j: Write the result as JSON to stdout; diagnostics go to stderr.
Result
The result may include: operation, completed_at, source_url, resource_id, outcome, verified, message, references.
For the corresponding MCP operation and its field types, see the MCP schema.
ntu onestop attachments download
Download a listed attachment of the verified target to a new explicit absolute file path, up to 20 MB.
This operation requires local confirmation and is refused when confirmation cannot be obtained interactively.
Usage
ntu onestop attachments download request:REQUEST_ID ATTACHMENT_ID --output /absolute/path/attachment.pdf
Replace the uppercase placeholders with values returned by the relevant listing or details command. Use ntu onestop attachments download --help for the current interface.
Arguments and options
TARGET: Required. A verified target such asrequest:REQUEST_ID,article:ARTICLE_ID, orcomment:ARTICLE_ID/COMMENT_ID.ATTACHMENT_ID: Required. The attachment ID returned by the attachment listing.--output,-o: Required. The local destination path. Follow the command description for file or directory requirements.--record-id: A record ID for a request target when the request contains multiple records.--json,-j: Write the result as JSON to stdout; diagnostics go to stderr.
Result
The result may include: attachment_id, path, bytes_written, sha256, downloaded_at.
For the corresponding MCP operation and its field types, see the MCP schema.
ntu onestop attachments delete
Delete an attachment only when it is listed on the verified target and native editing is allowed.
This operation requires local confirmation and is refused when confirmation cannot be obtained interactively.
Usage
ntu onestop attachments delete request:REQUEST_ID ATTACHMENT_ID
Replace the uppercase placeholders with values returned by the relevant listing or details command. Use ntu onestop attachments delete --help for the current interface.
Arguments and options
TARGET: Required. A verified target such asrequest:REQUEST_ID,article:ARTICLE_ID, orcomment:ARTICLE_ID/COMMENT_ID.ATTACHMENT_ID: Required. The attachment ID returned by the attachment listing.--record-id: A record ID for a request target when the request contains multiple records.--json,-j: Write the result as JSON to stdout; diagnostics go to stderr.
Result
The result may include: operation, completed_at, source_url, resource_id, outcome, verified, message, references.
For the corresponding MCP operation and its field types, see the MCP schema.
ntu onestop attachments rename
Rename a listed editable attachment using the native attachment service.
This operation requires local confirmation and is refused when confirmation cannot be obtained interactively.
Usage
ntu onestop attachments rename request:REQUEST_ID ATTACHMENT_ID renamed.pdf
Replace the uppercase placeholders with values returned by the relevant listing or details command. Use ntu onestop attachments rename --help for the current interface.
Arguments and options
TARGET: Required. A verified target such asrequest:REQUEST_ID,article:ARTICLE_ID, orcomment:ARTICLE_ID/COMMENT_ID.ATTACHMENT_ID: Required. The attachment ID returned by the attachment listing.FILE_NAME: Required. The new file name, without a directory path.--record-id: A record ID for a request target when the request contains multiple records.--json,-j: Write the result as JSON to stdout; diagnostics go to stderr.
Result
The result may include: operation, completed_at, source_url, resource_id, outcome, verified, message, references.
For the corresponding MCP operation and its field types, see the MCP schema.