Update a Package

With this service, you can update an existing package.

The ETag value is mandatory to update a package. You must retrieve the ETag value of the package using the GET (/Package/v1/Packages('<package name>')) service. The ETag value is assigned to the request header parameter If-Match in the PATCH request. If you do not include the ETag value in the request header or if the ETag value is not correct, the server displays an error message.

Only the following actions are supported using this service:

  • You can change the scope of the package from private to tenant.

  • You can change the status of the package from Active to Freeze. After update, the system saves the status of the package as Frozen.

  • You can change the description of the package.

After updating a package, the system generates a new ETag value for the package and replaces the old value with the new value.

Request

URI: /Package/v1/Packages('<package name>')

Operation Type: CRUD

HTTP Method: PATCH

Permissions: <pkg>.u

Request Headers

Header Required Values
If-Match Yes Latest ETag value of a specific package that is updated using the PATCH request.

Request Parameters

Parameter Required Data Type Description
Name Yes String Unique name of the package

Request Example

/Package/v1/Packages('core.automobiles')

{
    "Name": "core.automobiles",
    "Scope": "tenant",
    "Descriptions": [{
        "LanguageCode": "en",
        "Description": "Automobiles Package"
    }]
}

Response

Response Headers

Name Description
Etag Identifies the updated package

Response Status and Error Codes

Code Description
204 Package updated successfully.
400 Bad request.