> For the complete documentation index, see [llms.txt](https://docs.octoxlabs.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.octoxlabs.com/action-center/jira/update-insight-asset-per-asset-on-jira-cloud.md).

# Update Insight Asset Per Asset on Jira Cloud

Updates the Jira Assets (Insight) object that is linked to each asset the workflow collected, in Jira Service Management Cloud, setting the attribute values you define. It uses the object id that the Jira Assets Cloud adapter discovered.

### Before you begin

* Jira Service Management Cloud with Assets (Standard, Premium or Enterprise), an Atlassian account email and an API token that may work with Assets objects.
* The `jira-assets-cloud` adapter must be connected and discovered, because the job reads the object id from the asset. Required column: `Specifics.jira-assets-cloud.id`. Assets without an object id are left out.
* Accepted asset type: `device`.
* Defaults you saved for this job in [Action Center Settings](broken://pages/c24f789e38de30d1826122b3a82f349153f232b9) pre-fill the node form. Options you leave out are filled from them when you save the node.

### Settings

These are the fields of the job node form.

| Setting              | Type | Required | Default                     | Description                                                                                                                                                                                                                                                          |
| -------------------- | ---- | -------- | --------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Site URL             | Text | Yes      | None                        | Your Jira site URL, used to resolve the workspace. Example: `https://company.atlassian.net`.                                                                                                                                                                         |
| Assets API Base URL  | Text | No       | `https://api.atlassian.com` | Assets Cloud API base URL. Leave as default unless Atlassian changes it.                                                                                                                                                                                             |
| Email                | Text | Yes      | None                        | Email of the Atlassian account used for Basic authentication.                                                                                                                                                                                                        |
| API Token            | Text | Yes      | None                        | Atlassian API token for that account. Secret. Masked after saving.                                                                                                                                                                                                   |
| Workspace ID         | Text | No       | None                        | Leave blank to resolve it automatically from the Site URL.                                                                                                                                                                                                           |
| Object Type ID       | Text | Yes      | None                        | Assets object type id of the objects being updated. Example: `8`.                                                                                                                                                                                                    |
| Attributes to update | JSON | No       | `{}`                        | JSON mapping of attribute name (or id) to the new value, applied to every matched object. Any attribute can be set, including Name. Example: `{"Name": "new-name", "IP Address": "10.0.0.5"}`. The help text marks it as required, and the job fails if it is empty. |

### How it works

* The job reads the attributes of the object type, then builds one attribute list from **Attributes to update**. Entries with an empty value, `null` or an unknown attribute are dropped. If nothing remains, the job fails.
* An attribute can be given by name (matched case-insensitively against the attributes of the object type) or by its id.
* It sends one `PUT` per asset to `<Assets API Base URL>/jsm/assets/workspace/<workspace>/v1/object/<id>`, where the id is the object id stored on the asset by the Jira Assets adapter. Every object gets the same values.
* An asset whose request fails is logged and skipped. The job fails only when no object could be updated for any matched asset. If none of the matched assets carries an object id, it does nothing.
* The assets pass on to the next node unchanged.

### Example

Set a static attribute on the Assets object of every matched device.

| Setting              | Value                           |
| -------------------- | ------------------------------- |
| Site URL             | `https://example.atlassian.net` |
| Email                | `your-user@example.com`         |
| API Token            | `YOUR_API_TOKEN`                |
| Object Type ID       | `8`                             |
| Attributes to update | `{"Managed By": "OctoXLabs"}`   |

### What's next?

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>About Action Center</strong></td><td>Workflows, triggers, conditions and job nodes.</td><td><a href="broken://pages/08e1c051f3c3fc15c184408533696e2939698d56">Broken link</a></td></tr><tr><td><strong>Action Center Settings</strong></td><td>Save default values for this job.</td><td><a href="broken://pages/c24f789e38de30d1826122b3a82f349153f232b9">Broken link</a></td></tr><tr><td><strong>Update Insight Asset Per Asset on Jira Self-Hosted</strong></td><td>The same job for Jira Data Center.</td><td><a href="broken://pages/8c246712d977d631ca1c7b9ca587206ba47675fb">Broken link</a></td></tr><tr><td><strong>Create Insight Asset Per Asset on Jira Cloud</strong></td><td>Create the objects.</td><td><a href="broken://pages/39a8566dc8fc5cea1f98e582bd458b732a89e207">Broken link</a></td></tr></tbody></table>

{% hint style="info" %}
Available starting from version 6.7.0.
{% endhint %}
