Information Classification: External Restricted.
See https://www.chili-publish.com/security
Webservice Functions - ResourceItemAddFromURL
Adds a ResourceItem by downloading the underlying file from an external URL
Declaration
public string ResourceItemAddFromURL ( string apiKey, string resourceName, string newName, string folderPath, string url, string login, string pw, bool reuseExisting, string previewFileURL, string previewExtension, bool isPermanentPreview );
Arguments
Name | Type | Description |
|---|---|---|
apiKey | The API key previously generated by calling the GenerateApiKey function | |
resourceName | The name of the resource | |
newName | The name for the new resource item | |
folderPath | Location for the new ResourceItem. | |
url | URL to download (needs to be accessible from the CHILI server) | |
login | string | Optional user name for authentication into the URL (passed on using Basic Authentication) |
pw | string | Optional user password for authentication into the URL (passed on using Basic Authentication) |
reuseExisting | bool | If true, the function will check if an item already exists in the Resource with the provided path/name. If it does, the existing ResourceItem is returned, and the URL is not downloaded. |
previewFileURL | Optional URL to a preview file. If provided, this is downloaded and used as a preview override file. | |
previewExtension | string | The extension of the downloaded preview file (if provided) |
isPermanentPreview | bool | If true, the provided preview override file remains valid even after the ResourceItem is modified |
Returns
Definition XML of the ResourceItem
Security rights needed
Add
Apply on resource
Resource from function parameter resourceName