# Update

`PUT /api/2.1/marketplace-consumer/listings/{listing_id}/installations/{installation_id}`

This is a update API that will update the part of the fields defined in the installation table as well
 as interact with external services according to the fields not included in the installation table
 1. the token will be rotate if the rotateToken flag is true
 2. the token will be forcibly rotate if the rotateToken flag is true and the tokenInfo field is empty

API scopes: marketplace

## Path parameters

- `listing_id` (string, optional)
- `installation_id` (string, optional)

## Request body

- `installation` (object, optional)
  - `id` (string, optional)
  - `listing_id` (string, optional)
  - `share_name` (string, optional)
  - `catalog_name` (string, optional)
  - `installed_on` (int64, optional)
  - `status` (string, optional)
    Possible values: `INSTALLED`, `FAILED`
  - `error_message` (string, optional)
  - `listing_name` (string, optional)
  - `repo_name` (string, optional)
  - `repo_path` (string, optional)
  - `recipient_type` (string, optional)
    Possible values: `DELTA_SHARING_RECIPIENT_TYPE_DATABRICKS`, `DELTA_SHARING_RECIPIENT_TYPE_OPEN`
  - `tokens` (array of object, optional)
    - `id` (string, optional)
      Unique id of the Recipient Token.
    - `created_at` (int64, optional)
      Time at which this Recipient Token was created, in epoch milliseconds.
    - `created_by` (string, optional)
      Username of Recipient Token creator.
    - `activation_url` (string, optional)
      Full activation url to retrieve the access token.
       It will be empty if the token is already retrieved.
    - `expiration_time` (int64, optional)
      Expiration timestamp of the token in epoch milliseconds.
    - `updated_at` (int64, optional)
      Time at which this Recipient Token was updated, in epoch milliseconds.
    - `updated_by` (string, optional)
      Username of Recipient Token updater.
  - `token_detail` (object, optional)
    - `shareCredentialsVersion` (int32, optional)
      These field names must follow the delta sharing protocol.
       Original message: RetrieveToken.Response in managed-catalog/api/messages/recipient.proto
    - `bearerToken` (string, optional)
    - `endpoint` (string, optional)
    - `expirationTime` (string, optional)
- `rotate_token` (boolean, optional)

## Returns

- `installation` (object, optional)
  - `id` (string, optional)
  - `listing_id` (string, optional)
  - `share_name` (string, optional)
  - `catalog_name` (string, optional)
  - `installed_on` (int64, optional)
  - `status` (string, optional)
    Possible values: `INSTALLED`, `FAILED`
  - `error_message` (string, optional)
  - `listing_name` (string, optional)
  - `repo_name` (string, optional)
  - `repo_path` (string, optional)
  - `recipient_type` (string, optional)
    Possible values: `DELTA_SHARING_RECIPIENT_TYPE_DATABRICKS`, `DELTA_SHARING_RECIPIENT_TYPE_OPEN`
  - `tokens` (array of object, optional)
    - `id` (string, optional)
      Unique id of the Recipient Token.
    - `created_at` (int64, optional)
      Time at which this Recipient Token was created, in epoch milliseconds.
    - `created_by` (string, optional)
      Username of Recipient Token creator.
    - `activation_url` (string, optional)
      Full activation url to retrieve the access token.
       It will be empty if the token is already retrieved.
    - `expiration_time` (int64, optional)
      Expiration timestamp of the token in epoch milliseconds.
    - `updated_at` (int64, optional)
      Time at which this Recipient Token was updated, in epoch milliseconds.
    - `updated_by` (string, optional)
      Username of Recipient Token updater.
  - `token_detail` (object, optional)
    - `shareCredentialsVersion` (int32, optional)
      These field names must follow the delta sharing protocol.
       Original message: RetrieveToken.Response in managed-catalog/api/messages/recipient.proto
    - `bearerToken` (string, optional)
    - `endpoint` (string, optional)
    - `expirationTime` (string, optional)

## Response

```json
{
  "installation": {
    "id": "string",
    "listing_id": "string",
    "share_name": "string",
    "catalog_name": "string",
    "installed_on": 0,
    "status": "string",
    "error_message": "string",
    "listing_name": "string",
    "repo_name": "string",
    "repo_path": "string",
    "recipient_type": "string",
    "tokens": [
      {}
    ],
    "token_detail": {}
  }
}
```

