# defaultIndex removed

> Source: https://docs.strapi.io/cms/migration/v4-to-v5/breaking-changes/do-not-update-repeatable-components-with-document-service-api

In Strapi 5, updating repeatable components with the Document Service API is not recommended because draft and published components have different IDs, preventing successful updates using `documentId`.

In Strapi 5, it's not recommended to update repeatable components with the API, due to some limitations of the new Document Service API.

This page is part of the [breaking changes database](/cms/migration/v4-to-v5/breaking-changes) and provides information about the breaking change and additional instructions to migrate from Strapi v4 to Strapi 5.

- Is this breaking change affecting plugins? Yes
- Is this breaking change automatically handled by a codemod? No

## Breaking change description

**In Strapi v4**

You could update a repeatable component with its `id`.

**In Strapi 5**

Strapi 5 uses `documentId` due to the introduction of the [Document Service API](/cms/api/document-service), and you can't update a repeatable component by its `documentId` due to the way the [Draft & Publish](/cms/features/draft-and-publish) feature works with the new API.

## Migration

<br/>

### Notes

In Strapi 5, draft components and published components have different ids, and you could fetch data like follows:

```js
// Request
GET /articles // -> returns published article

// Response
{
   documentId …
   component: [
     { id: 2, name: 'component-1'  },
     { id: 4, name: 'component-2'  },
   ]
}
```

You can then try to do the following:

```js
PUT /articles/{documentId} // <== Update draft article
{
   documentId …
   component: [
     { id: 2, name: 'component-1-updated'  }, // <== Update component 1
   ]
}
```

However, this would fail because the component id of the draft article is different from the published one. Therefore, it's not recommended to try to update repeatable components with the Document Service API.
