Download a certificate or a report
hisinone_download_documentGenerates a document in the HISinOne portal and saves it locally. Provide the document key from hisinone_list_documents; returns the file path after the portal job finishes.
Instructions
Let the portal produce one document and store it on disk. Call hisinone_list_documents first to get a key. The tool waits for the portal job and returns the path of the stored file.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | Document key from hisinone_list_documents. | |
| target_dir | No | Directory for the file. The configured download directory applies if this is absent. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Absolute path of the stored file | |
| filename | Yes | File name | |
| media_type | Yes | Media type that the portal reported | |
| size_bytes | Yes | Size of the stored file | |
| source_url | Yes | Portal address that delivered the file |