Editing Retention Settings
This section explains how to edit retention settings of:
- Lingering snapshots retention
- Sessions retention
Request
PUT https://<hostname>/api/v1/settings/retention |
Request Headers
The request header must contain an authorization token of the current session.
Request Parameters
None.
Request Body
Property | Type | Description |
|---|---|---|
sessionsSettings | Contains session retention settings. | |
lingeringSnapshotsSettings | Contains lingering retention settings. | |
_links | Dictionary of string [key] and Object [value] | Links to related resources (navigation property). |
Property | Type | Description |
|---|---|---|
duration | int32 | Sets the duration of both the sessions and the lingering retention. |
type | string | Sets the duration type. Can be either Daily or Monthly. |
keepForever | boolean | Defines if sessions and lingering retention data records must be kept forever. |
Request Example
Request: PUT https://abc.ukwest.cloudapp.azure.com/api/v1/settings/retention
Request Header: Authorization: Bearer <Access-Token>
Request Body: { "sessionsSettings": { "duration": 10, "type": "Monthly", "keepForever": false }, "lingeringSnapshotsSettings": { "duration": 5, "type": "Monthly", "keepForever": true } } |
Response
The server returns the following response to the client.
Response Codes
A successfully completed operation returns a response code 200 (OK).
Response Headers
The response to this request contains the following headers. The response may also include additional standard HTTPS headers.
Header | Description |
Content-length | The length of the response body. |
Content-type | The media type and syntax of the response body message: application/json; charset=utf-8 |
Response Body
The response contains the following information.
Property | Type | Description |
|---|---|---|
sessionsSettings | Contains session retention settings. | |
lingeringSnapshotsSettings | Contains lingering retention settings. | |
_links | Dictionary of string [key] and Object [value] | Links to related resources (navigation property). |
Sessions and Lingering Retention Object
Property | Type | Description |
|---|---|---|
duration | int32 | Shows a duration of both the sessions and the lingering retention. |
type | string | Shows a duration type. Can be either Daily or Monthly. |
keepForever | boolean | Shows if sessions and lingering retention data records must be kept forever. |
Response Example
Response: 200 OK
Response Body: { "sessionsSettings": { "duration": 10, "type": "Monthly", "keepForever": false }, "lingeringSnapshotsSettings": { "duration": 5, "type": "Monthly", "keepForever": true }, "_links": {"self": {"href": "https://abc.ukwest.cloudapp.azure.com/api/v1/settings/retention"}} } |