xpressinsight.scenario.InsightRestClient.put_scenario_attachment
xpressinsight.scenario.InsightRestClient.put_scenario_attachment(self, scenario_id: str, attachment_name: str, source: str | TextIO | BinaryIO, tag_name: Optional[str] = None, overwrite: bool = False, encoding: Optional[str] = 'utf-8') -> scenario.Attachment
scenario_id
|
The ID of the scenario on which to save the attachment.
|
attachment_name
|
The name to give the attachment (for example,
"factories.csv").
|
source
|
Where to read the attachment content. This may be the name of a local file, or any file-like object.
|
tag_name
|
The name of a tag to give the attachment, if any.
|
overwrite
|
If set to
True, the new attachment overwrites any existing scenario attachment that has the same name. If
False, the new attachment will be given a different name if there is an existing attachment with the same name.
|
encoding
|
The character encoding to use when
source is of type
TextIO. Defaults to
utf-8.
|
Information about the new or updated scenario attachment record.
This function may raise the following errors:
>>> with ins.InsightRestClient(insight_url='http://localhost:8080/') as client: ... client.put_scenario_attachment( ... scenario_id='570b9100-46e3-4643-baee-2e24aa538f25', ... attachment_name='factories.csv', ... source='factories.csv')
© 2001-2025 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.