> For the complete documentation index, see [llms.txt](https://interfacing.gitbook.io/interfacing-help-files/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://interfacing.gitbook.io/interfacing-help-files/interfacing-help-files-fr/developpeurs-de-solutions/api-and-information-repository/api-rest/cas-dutilisation-et-exemples/mettre-a-jour-un-objet.md).

# Mettre à jour un objet

Utilisez le point de terminaison `PUT /items/{nodeId}` pour mettre à jour un objet existant dans **IMS**. Il sert souvent à synchroniser des données entre IMS et des systèmes externes, dans un sens ou dans les deux sens, via un script intégré.

***

## Démarrage rapide

* **URL de base du point de terminaison :** <https://YOURIMS.interfacing.com/api/v1/items/{nodeId}>
* **Authentification :** obtenez un jeton valide. Consultez [Authentification et gestion des jetons](/interfacing-help-files/interfacing-help-files-fr/developpeurs-de-solutions/api-and-information-repository/api-rest.md#authentification-et-gestion-des-jetons).
* **Documentation Swagger :** <https://YOUREPC.interfacing.com/api/v1/swagger/#/Common/updateItem>

***

## Conseils pour la méthode de mise à jour

La méthode de mise à jour la plus simple est la suivante :

1. [**Récupérez** l’objet](/interfacing-help-files/interfacing-help-files-fr/developpeurs-de-solutions/api-and-information-repository/api-rest/cas-dutilisation-et-exemples/recuperer-un-objet.md) avec une requête `GET`.
2. **Modifiez** les valeurs de champ souhaitées localement.
3. **Envoyez** l’objet mis à jour avec ce point de terminaison `PUT`.

Vérifiez que les champs `nodeId` et `nodeVersionId` figurent dans le corps de la requête.

## Exemple de requête

<pre class="language-json"><code class="lang-json">15:35:11.354 request:
3 > PUT http://myims.interfacing.com/api/v1/items/1450CEF9-89A3-4B48-98F7-09735BECD54B?draft=true
3 > Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...
3 > Content-Type: application/json; charset=UTF-8
3 > Content-Length: 229
3 > Host: myims.interfacing.com
<strong>3 > Connection: Keep-Alive
</strong>3 > User-Agent: Apache-HttpClient/4.5.13 (Java/11.0.15)
3 > Accept-Encoding: gzip,deflate
{
  "parent": {
    "nodeId": "A9CCB5F4-9A79-8AE7-8C4C-289A025D0D88"
  },
  "@type": "NodeElement",
  "nodeVersionId": "413426F8-66D4-49F6-843C-2F7AFEB298F5",
  "name": "new name",
  "nodeType": "DOCUMENT_SET",
  "nodeId": "1450CEF9-89A3-4B48-98F7-09735BECD54B"
}

</code></pre>

***

## Exemple de réponse

```json
15:35:11.440 response time in milliseconds: 86
3 < 200
3 < Server: nginx/1.21.6
3 < Date: Wed, 08 Jun 2022 19:35:11 GMT
3 < Content-Type: application/json
3 < Content-Length: 513
3 < X-Varnish: 198279
3 < Age: 0
3 < Via: 1.1 varnish (Varnish/7.1)
3 < Connection: keep-alive
{
  "nodeSubTypeName": null,
  "userNodeSubType": null,
  "@type": "BaseElement",
  "nodeVersionId": "BFA4C9F0-89C6-46C1-BD93-7CE15988BF5C",
  "nodeType": "DOCUMENT_SET",
  "creationDate": "2022-06-08T15:35:11.253-04:00",
  "nodeStatus": "IN_PROGRESS",
  "publishedNodeVersionId": null,
  "version": "0.0002",
  "nodeSubType": null,
  "modificationDate": "2022-06-08T15:35:11.367-04:00",
  "extensions": null,
  "deleted": false,
  "system": false,
  "referenceNumber": null,
  "name": "new name",
  "locked": false,
  "nodeId": "1450CEF9-89A3-4B48-98F7-09735BECD54B",
  "favorite": false
}
```

***

## Exemple CURL

```bash
curl --request PUT --url 'http://myims.interfacing.com/api/v1/items/1450CEF9-89A3-4B48-98F7-09735BECD54B?draft=true' --header 'Content-Type: application/json' -b /tmp/cookie.tmp \
--data '{
"parent": {
"nodeId": "A9CCB5F4-9A79-8AE7-8C4C-289A025D0D88"
},
"@type": "NodeElement",
"nodeVersionId": "413426F8-66D4-49F6-843C-2F7AFEB298F5",
"name": "new name",
"nodeType": "DOCUMENT_SET",
"nodeId": "1450CEF9-89A3-4B48-98F7-09735BECD54B"
}'
```

***

## À quelle fonctionnalité IMS cela correspond-il ?

Les utilisateurs disposant de l’autorisation de sécurité **Modifier** peuvent mettre à jour ou modifier des objets directement dans l’application web IMS. Cela inclut les utilisateurs ayant les rôles de suppression, d’administrateur d’environnement ou d’administrateur système.

Le bouton **Modifier** est disponible dans la liste de la Bibliothèque et dans le panneau de détails de l’élément. Il ouvre la fenêtre Modifier les détails de l’objet sélectionné. Cette fenêtre permet de modifier les informations métier de l’objet, comme les associations, les responsabilités et d’autres données pertinentes.

***

## Voir aussi

<table data-view="cards"><thead><tr><th></th><th data-hidden data-card-target data-type="content-ref"></th><th data-hidden data-card-cover data-type="files"></th></tr></thead><tbody><tr><td>Authentification et gestion des jetons</td><td><a href="/interfacing-help-files/interfacing-help-files-fr/developpeurs-de-solutions/api-and-information-repository/api-rest.md#authentification-et-gestion-des-jetons">API REST</a></td><td><a href="https://content.gitbook.com/content/AgpNu7XmgN3Z9B8kIShD/blobs/DQLtctQLTOs0sgjURwgJ/IMS-V16-NAV-Home-Icons-5.png">IMS-V16-NAV-Home-Icons-5.png</a></td></tr><tr><td>Référence de l’API (Swagger)</td><td><a href="/interfacing-help-files/interfacing-help-files-fr/developpeurs-de-solutions/api-and-information-repository/api-rest/api-reference-swagger.md">API Reference (Swagger)</a></td><td><a href="https://content.gitbook.com/content/AgpNu7XmgN3Z9B8kIShD/blobs/ony9eUVasEC7cHrPfFn0/IMS-V16-NAV-Library-Icons-41.png">IMS-V16-NAV-Library-Icons-41.png</a></td></tr><tr><td>Effectuer d’autres cas d’utilisation</td><td><a href="/interfacing-help-files/interfacing-help-files-fr/developpeurs-de-solutions/api-and-information-repository/api-rest/cas-dutilisation-et-exemples/effectuer-dautres-cas-dutilisation.md">Effectuer d’autres cas d’utilisation</a></td><td><a href="https://content.gitbook.com/content/AgpNu7XmgN3Z9B8kIShD/blobs/q1F1diigeTjKR94GHSiL/IMS-V16-Intro-7.png">IMS-V16-Intro-7.png</a></td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://interfacing.gitbook.io/interfacing-help-files/interfacing-help-files-fr/developpeurs-de-solutions/api-and-information-repository/api-rest/cas-dutilisation-et-exemples/mettre-a-jour-un-objet.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
