# ScriptRunner Connect Managed API for Jira Service Management Cloud Assets
Managed API for Jira Service Management Cloud Assets is an API Client for Jira Service Management Cloud Assets by [Adaptavist](https://www.adaptavist.com/). You can read more about Managed APIs [here](https://docs.adaptavist.com/src/managed-apis).

This is [ScriptRunner Connect](https://scriptrunnerconnect.com) runtime specific version of the Managed API (with `sr-connect` suffix). If you want to use Managed API in any other runtime, have a look at the [runtime agnostic version](https://www.npmjs.com/package/@managed-api/jira-service-management-cloud-assets-core).

# Supported API calls
- [fetch](https://docs.adaptavist.com/src/managed-apis/managed-api-abstractions)
- Aql
    - [getObjects](https://developer.atlassian.com/cloud/assets/rest/api-group-aql/#api-aql-objects-get)
- Config
    - [createConfigStatus](https://developer.atlassian.com/cloud/assets/rest/api-group-config/#api-config-statustype-post)
    - [deleteConfigStatus](https://developer.atlassian.com/cloud/assets/rest/api-group-config/#api-config-statustype-id-delete)
    - [getConfigStatus](https://developer.atlassian.com/cloud/assets/rest/api-group-config/#api-config-statustype-id-get)
    - [getConfigStatuses](https://developer.atlassian.com/cloud/assets/rest/api-group-config/#api-config-statustype-get)
    - [updateConfigStatus](https://developer.atlassian.com/cloud/assets/rest/api-group-config/#api-config-statustype-id-put)
- Global
    - [updateGlobalObjectSchema](https://developer.atlassian.com/cloud/assets/rest/api-group-global/#api-global-config-objectschema-id-property-post)
- Icon
    - [getGlobalIcons](https://developer.atlassian.com/cloud/assets/rest/api-group-icon/#api-icon-global-get)
    - [getIcon](https://developer.atlassian.com/cloud/assets/rest/api-group-icon/#api-icon-id-get)
- Import
    - [startImport](https://developer.atlassian.com/cloud/assets/rest/api-group-import/#api-import-start-id-post)
- Object
    - [createObject](https://developer.atlassian.com/cloud/assets/rest/api-group-object/#api-object-create-post)
    - [deleteObject](https://developer.atlassian.com/cloud/assets/rest/api-group-object/#api-object-id-delete)
    - [getObject](https://developer.atlassian.com/cloud/assets/rest/api-group-object/#api-object-id-get)
    - [getObjectsByAql](https://developer.atlassian.com/cloud/assets/rest/api-group-object/#api-object-aql-post)
    - [getObjectsWithAql](https://developer.atlassian.com/cloud/assets/rest/api-group-object/#api-object-navlist-aql-post)
    - [updateObject](https://developer.atlassian.com/cloud/assets/rest/api-group-object/#api-object-id-put)
    - Attribute
        - [getAttributes](https://developer.atlassian.com/cloud/assets/rest/api-group-object/#api-object-id-attributes-get)
    - History
        - [getHistory](https://developer.atlassian.com/cloud/assets/rest/api-group-object/#api-object-id-history-get)
    - Reference
        - [getReferences](https://developer.atlassian.com/cloud/assets/rest/api-group-object/#api-object-id-referenceinfo-get)
    - Schema
        - [createSchema](https://developer.atlassian.com/cloud/assets/rest/api-group-objectschema/#api-objectschema-create-post)
        - [deleteSchema](https://developer.atlassian.com/cloud/assets/rest/api-group-objectschema/#api-objectschema-id-delete)
        - [getSchema](https://developer.atlassian.com/cloud/assets/rest/api-group-objectschema/#api-objectschema-id-get)
        - [getSchemaObjectTypeAttributes](https://developer.atlassian.com/cloud/assets/rest/api-group-objectschema/#api-objectschema-id-attributes-get)
        - [getSchemaObjectTypes](https://developer.atlassian.com/cloud/assets/rest/api-group-objectschema/#api-objectschema-id-objecttypes-flat-get)
        - [getSchemas](https://developer.atlassian.com/cloud/assets/rest/api-group-objectschema/#api-objectschema-list-get)
        - [updateSchema](https://developer.atlassian.com/cloud/assets/rest/api-group-objectschema/#api-objectschema-id-put)
    - Ticket
        - [getConnectedTickets](https://developer.atlassian.com/cloud/assets/rest/api-group-objectconnectedtickets/#api-objectconnectedtickets-objectid-tickets-get)
    - Type
        - [changeTypePosition](https://developer.atlassian.com/cloud/assets/rest/api-group-objecttype/#api-objecttype-id-position-post)
        - [createType](https://developer.atlassian.com/cloud/assets/rest/api-group-objecttype/#api-objecttype-create-post)
        - [deleteType](https://developer.atlassian.com/cloud/assets/rest/api-group-objecttype/#api-objecttype-id-delete)
        - [getType](https://developer.atlassian.com/cloud/assets/rest/api-group-objecttype/#api-objecttype-id-get)
        - [getTypeAttributes](https://developer.atlassian.com/cloud/assets/rest/api-group-objecttype/#api-objecttype-id-attributes-get)
        - [updateType](https://developer.atlassian.com/cloud/assets/rest/api-group-objecttype/#api-objecttype-id-put)
        - Attribute
            - [createAttribute](https://developer.atlassian.com/cloud/assets/rest/api-group-objecttypeattribute/#api-objecttypeattribute-objecttypeid-post)
            - [deleteAttribute](https://developer.atlassian.com/cloud/assets/rest/api-group-objecttypeattribute/#api-objecttypeattribute-id-delete)
            - [updateAttribute](https://developer.atlassian.com/cloud/assets/rest/api-group-objecttypeattribute/#api-objecttypeattribute-objecttypeid-id-put)
- Progress
    - [getImportProgress](https://developer.atlassian.com/cloud/assets/rest/api-group-progress/#api-progress-category-imports-id-get)


# Constructing Managed API
In ScriptRunner Connect a Managed API is constructed for you, but if you need to construct it manually, here's how you can do it:
```typescript
import { JiraServiceManagementCloudAssetsApi } from '@managed-api/jira-service-management-cloud-assets-sr-connect';

export default async function() {
    const api = new JiraServiceManagementCloudAssetsApi('API_CONNECTION_ID');
}
```

# Contact
Feel free to drop ideas, suggestions or improvements into our [Community hub](https://loop.scriptrunnerhq.com/c/integration-forum).

 # Changelog
# 2.1.0

- Removed non-empty body from HEAD requests.

# 2.0.0

- # Breaking change: URL and query string parameters are now URL encoded, meaning if you encoded them explicitly before you have to remove your own encoding, otherwise they will get double encoded.

- # Updated OpenApi Specification.

- # Added support for the following Object method:

    * [Fetch Objects by AQL](https://developer.atlassian.com/cloud/assets/rest/api-group-object/#api-object-aql-post) that can be used as `Object.getObjectsByAql` or `All.getObjectsByAql`.

Copyright Adaptavist 2025 (c) All rights reserved