Skip to content

Update a resource

Ryan Newington edited this page Feb 22, 2018 · 7 revisions

Used to update a resource in the FIM Service using its object ID

Request

Method URL
PUT /v1/resources/{id}
PUT /v1/resources/{id}/?locale={locale}
PATCH /v2/resources/{id}
PATCH /v2/resources/{id}/?locale={locale}

Note: The v2 API uses PATCH as the method for updating a resource, while v1 uses PUT

URL Parameters

Parameter name Description
{id} The object ID of the resource to update

Query Parameters

Parameter name Description
{locale} Specifies the language code of the culture to save a localized representation of the resource in. This requires the appropriate language packs to be installed on the FIM/MIM Service. e.g en-US, de-de, ja-jp, es-es, it-it.

Request Body

A JSON-formatted list of attribute-value pairs to update

Response

Response Codes

See the topic on error handling for the response codes that this API call can return.

Response Body

This method does not return a response body for a successful operation. See the topic on [error handling] for details on the response body returned for some exception types

Examples

Update an attribute on a resource

Request

PATCH  /v2/resources/f03f50c0-f40a-4370-8531-e5d025d22cb2
{
    "AccountName":"testuser9"
}

Response

HTTP/1.1 200 OK

Update a localized value of a resource

Request

PATCH  /v2/resources/f03f50c0-f40a-4370-8531-e5d025d22cb2/?locale=it-IT
{
    "DisplayName":"Nome visualizzato"
}

Response

HTTP/1.1 200 OK