# Import saved object of type "apm-indices" does not work correctly

**URL:** <https://discuss.elastic.co/t/import-saved-object-of-type-apm-indices-does-not-work-correctly/356174>\
**Category:** Kibana\
**Tags:** saved-objects\
**Created:** [March 26, 2024, 12:00pm UTC](https://discuss.elastic.co/t/import-saved-object-of-type-apm-indices-does-not-work-correctly/356174 "2024-03-26T12:00:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![fuphil](https://avatars.discourse-cdn.com/v4/letter/f/bb73d2/32.png) [@fuphil](https://discuss.elastic.co/u/fuphil)\
**Post date:** [March 26, 2024, 12:00pm UTC](https://discuss.elastic.co/t/import-saved-object-of-type-apm-indices-does-not-work-correctly/356174/1 "2024-03-26T12:00:38Z")

</div>

Hi,

I am running version 8.12.2 and have an issue with the import of a saved object of type "apm-indices". It is not possible to set the attribute "apmIndices", it is always empty.

API:  
`/s/myspace/api/saved_objects/_import?overwrite=true`

Payload (needs to be sent via POST as multipart-encoded files):  
`{"type":"apm-indices","id":"apm-indices","attributes":{"apmIndices":{"transaction":"apm-*","span":"apm-*","error":"apm-*","metric":"apm-*","onboarding":"apm-*"},"isSpaceAware":true}}`

Result:

```auto
{
  "success": true,
  "successCount": 1,
  "successResults": [
    {
      "id": "apm-indices",
      "managed": false,
      "meta": {
        "icon": "apmApp",
        "title": "APM Settings - Index"
      },
      "overwrite": true,
      "type": "apm-indices"
    }
  ],
  "warnings": []
}

```

But if I then inspect the created saved object, "apmIndices" is empty...

```auto
{
  "id": "apm-indices",
  "type": "apm-indices",
  "namespaces": [
    "philipp"
  ],
  "updated_at": "2024-03-26T11:47:39.982Z",
  "created_at": "2024-03-26T11:47:39.982Z",
  "version": "WzI2MjM4OCwyNV0=",
  "attributes": {
    "apmIndices": {}
  },
  "references": [],
  "managed": false,
  "coreMigrationVersion": "8.8.0",
  "typeMigrationVersion": "10.1.0"
}

```

Does anyone know why, am I doing anything wrong?  
For other types like "metrics-data-source" same procedure works fine.

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![fuphil](https://avatars.discourse-cdn.com/v4/letter/f/bb73d2/32.png) [@fuphil](https://discuss.elastic.co/u/fuphil)\
**Post date:** [March 26, 2024, 1:45pm UTC](https://discuss.elastic.co/t/import-saved-object-of-type-apm-indices-does-not-work-correctly/356174/2 "2024-03-26T13:45:41Z")

</div>

Solved it on my own by adding the following to the payload:

```auto
"typeMigrationVersion": "10.1.0"

```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [April 23, 2024, 1:45pm UTC](https://discuss.elastic.co/t/import-saved-object-of-type-apm-indices-does-not-work-correctly/356174/3 "2024-04-23T13:45:47Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
