Alexey,
You are correct, you won't be able to use the artifact object within a script that is in a playbook with the object type of incident.
You'll need to create a partial ArtifactDTO object with an updated description and send that to the PUT /orgs/{org_id}/incidents/{inc_id}/artifacts/{artifact_id} endpoint.
To update the description of an artifact you'd need to send the API endpoint a payload that looks something like this:
```
{
"description": {
"format": "text",
"content": "Hello, from the API"
}
}
```
This will completely override the description of the artifact. If you want to append to the artifact's description, you need to use the existing description value from your GET call in the string supplied for the 'content' key.
Here's some pseudo-code for that:
```
artifact = http_request.get('<resilient_url>/rest/orgs/201/incidents/{0}/artifacts/')
update_payload = {
"description": {
"format": "text",
"content": f"{artifact.get('description').get('content')}\nThis is my new value from the API"
}
}
update_response = http_request.put(f"<resilient_url>/rest/orgs/201/incidents/{0}/artifacts/{artifact.get('id')}", update_payload)
```
Hopefully this helps
------------------------------
Liam Mahoney
------------------------------