> 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/adapters/j/jira-assets-licenses.md).

# Jira Assets Licenses

Jira Assets is the asset and configuration management module of Jira Service Management. This adapter reads the objects of one object type that represents software entitlements and adds them to the license inventory.

## Use cases

* **Find licenses that expire soon.** List licenses that expire within 60 days.

```
Adapters = jira-assets-licenses AND ExpiryDate next now+60d/d
```

* **Review license usage.** List the licenses recorded in the CMDB with their purchased and used seat counts.

```
Adapters = jira-assets-licenses AND Total = *
```

## Before you begin

### Network

| Source              | Destination                                            | Port               | Protocol |
| ------------------- | ------------------------------------------------------ | ------------------ | -------- |
| OctoXLabs connector | Jira Assets host (Jira Service Management Data Center) | 443 (configurable) | HTTPS    |

The port is the value of the **Port** parameter. Use HTTP and the matching port if you clear **SSL**.

### Required permissions

Not verified: the connector code does not name a Jira permission. The account must be able to read the object type set in **Object Name** and its attributes. The baseline only states that an **API-User** is needed.

## Create credentials in Jira Assets

{% stepper %}
{% step %}

### Create an API user

In Jira, open the settings section and create an **API-User**. The Jira Assets API access of the adapter uses this account.
{% endstep %}

{% step %}

### Give the account read access to the object type

Make sure the account can view the objects of the object type you plan to fetch. Not verified in the connector code, see the note at the end of the page.
{% endstep %}

{% step %}

### Note the object type name

Copy the exact name of the Jira Assets object type. You enter it as **Object Name** in OctoXLabs.
{% endstep %}
{% endstepper %}

{% hint style="info" %}
Objects without a value in the primary key field are skipped. Dates that cannot be parsed are stored empty.
{% endhint %}

## Connection parameters

| Parameter           | Required | Type    | Default       | Description                                                                                                           |
| ------------------- | -------- | ------- | ------------- | --------------------------------------------------------------------------------------------------------------------- |
| IP & Domain         | Yes      | String  | None          | IP address or domain of the Jira Assets host.                                                                         |
| Port                | No       | Integer | 443           | Port of the Jira Assets host.                                                                                         |
| Username            | Yes      | String  | None          | Username of the API user.                                                                                             |
| Password            | Yes      | String  | None          | Password of the API user.                                                                                             |
| SSL                 | No       | Boolean | True          | Connect over HTTPS.                                                                                                   |
| Object Name         | Yes      | String  | None          | Name of the Jira Assets object type to fetch. Child object types are included.                                        |
| Per Page            | No       | Integer | 500           | Number of objects requested per page.                                                                                 |
| Primary Key Field   | No       | String  | objectKey     | Object field or Jira Assets attribute name. Unique identifier of each license.                                        |
| Name Field          | No       | String  | name          | Object field or Jira Assets attribute name. License name, for example `Office 365 E3`.                                |
| Description Field   | No       | String  | Description   | Object field or Jira Assets attribute name. Free-text description.                                                    |
| Status Field        | No       | String  | Status        | Object field or Jira Assets attribute name. License status, for example `Active`.                                     |
| Total Field         | No       | String  | Total         | Object field or Jira Assets attribute name. Number of purchased seats. Values that are not whole numbers are ignored. |
| Used Field          | No       | String  | Used          | Object field or Jira Assets attribute name. Number of used seats. Values that are not whole numbers are ignored.      |
| Expiry Date Field   | No       | String  | Expiry Date   | Object field or Jira Assets attribute name. Expiry date.                                                              |
| Purchase Date Field | No       | String  | Purchase Date | Object field or Jira Assets attribute name. Purchase date.                                                            |
| Timeout             | No       | Integer | 120           | Seconds to wait for an API response.                                                                                  |
| Thread Count        | No       | Integer | 16            | Number of parallel threads used to request result pages.                                                              |

## Troubleshooting

| Error message                                                                   | Cause                                                                                     | Fix                                                                                            |
| ------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
| AQL response for page {page} carries no 'objectEntries'; the page is skipped.   | A result page came back without an `objectEntries` list.                                  | Check the object type and the account permissions, then run discovery again.                   |
| AQL response carries no 'totalFilterCount'; only the first page is fetched.     | The first response did not include a total count, so the page count cannot be calculated. | Check that the host exposes the Assets AQL endpoint and that the object type returns objects.  |
| AQL response carries no 'objectTypeAttributes'; asset attributes will be empty. | The attribute definitions are missing from the response.                                  | Check that the object type has attributes and that the account can read them.                  |
| Status Code: `, followed by URL, Method and the response body`                  | The API answered with a status other than 200. This is the shared REST connector error.   | Read the status code and body in the message, then check the credentials, permissions and URL. |

## Change history

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