> 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/create-insight-asset-per-asset-on-jira-cloud.md).

# Create Insight Asset Per Asset on Jira Cloud

Creates one Jira Assets (Insight) object for each asset the workflow collected, in Jira Service Management Cloud. You map the hostname, IP address and OS version to attributes of an object type.

### 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.
* Required column: `Hostname`. Assets without a hostname 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. Provide it to skip the lookup.                                |
| Object Type ID           | Text | Yes                 | None                        | Assets object type the new object is created under. Example: `11`.                                                       |
| Attribute for Hostname   | Text | Yes                 | None                        | Attribute name (as shown in Assets) or its id that stores the hostname. Example: `Name`.                                 |
| Attribute for IP Address | Text | Yes (blank allowed) | None                        | Attribute name or id for IP addresses. Leave blank to skip.                                                              |
| Attribute for OS Version | Text | Yes (blank allowed) | None                        | Attribute name or id for OS version. Leave blank to skip.                                                                |
| Custom attributes        | JSON | No                  | `{}`                        | JSON mapping of attribute name (or id) to a static value applied to every asset. Example: `{"Managed By": "OctoXLabs"}`. |

### How it works

* The job first reads the attributes of the object type (name to id), after resolving the Assets workspace from the Site URL unless you gave a **Workspace ID** (the first workspace is used if there are several).
* Then it sends one create request per matched asset to `<Assets API Base URL>/jsm/assets/workspace/<workspace>/v1/object/create`.
* Each object gets the hostname, the OS version (`OS.Major`, `OS.Minor` and `OS.Build` joined with dots), the IP addresses (comma separated) and every **Custom attributes** entry. An attribute can be given by name (matched case-insensitively against the attributes of the object type) or by its id.
* Values that are empty are not sent. An asset for which no attribute has a value is skipped.
* An asset whose request fails is logged and skipped. The job fails only when no object could be created for any matched asset. With no matched assets it does nothing.
* The assets pass on to the next node unchanged.

### Example

Create a Server object for every device that the condition node matched.

| Setting                  | Value                           |
| ------------------------ | ------------------------------- |
| Site URL                 | `https://example.atlassian.net` |
| Email                    | `your-user@example.com`         |
| API Token                | `YOUR_API_TOKEN`                |
| Object Type ID           | `11`                            |
| Attribute for Hostname   | `Name`                          |
| Attribute for IP Address | `IP Address`                    |
| Attribute for OS Version | `OS Version`                    |
| Custom attributes        | `{"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>Create Insight Asset Per Asset on Jira Self-Hosted</strong></td><td>The same job for Jira Data Center.</td><td><a href="broken://pages/f02a5df27844778460b014319c6f99649f598325">Broken link</a></td></tr><tr><td><strong>Update Insight Asset Per Asset on Jira Cloud</strong></td><td>Update the objects later.</td><td><a href="broken://pages/fdb9516273ed74a62ec146e3a66c1625af6e4695">Broken link</a></td></tr></tbody></table>

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