Update archive settings
PUThttps://api.logz.io/v2/archive/settings/:id
Updates the archiving settings for a time-based log account. (The API token identifies the account.) Please ensure to change the region in the URL to match your account's region.
You can use this endpoint to:
- Switch archive settings between AWS and Azure Blob Storage or vice versa.
- Update credentials.
- Switch your AWS authentication method between credential keys and IAM roles.
Note that only one archive can be active per account.
Request
Path Parameters
id int32required
ID of the archive settings.
- application/json
Body
storageType stringrequired
Possible values: [S3
, BLOB
]
Specifies the storage provider. If S3
, the amazonS3StorageSettings
are relevant. If BLOB
, the azureBlobStorageSettings
are relevant.
enabled boolean
Default value: true
If true
, archiving is currently enabled.
compressed boolean
Default value: true
If true
, logs are compressed before they are archived.
amazonS3StorageSettings object
azureBlobStorageSettings object
Responses
- default
successful operation
Authorization: X-API-TOKEN
name: X-API-TOKENtype: apiKeydescription: You can manage your API tokens from the [Logz.io API tokens](https://app.logz.io/#/dashboard/settings/manage-tokens/api) page. API tokens are account-specific. You will need to be logged into the relevant Log Management or SIEM account to view the API tokens associated with it. To manage your API tokens, log into the relevant account in your Logz.io platform, click the gear in the top-right menu, and select [**Tools > Manage tokens > API tokens**](https://app.logz.io/#/dashboard/settings/manage-tokens/api). It's important to keep your tokens secure. API tokens carry privileges to make changes to users and accounts, so if you believe an API token has been compromised, delete it, and replace it with a new token in your integrations.in: header
- curl
- python
- go
- nodejs
- ruby
- csharp
- php
- java
- powershell
- CURL
curl -L -X PUT 'https://api.logz.io/v2/archive/settings/:id' \
-H 'Content-Type: application/json' \
-H 'X-API-TOKEN: <API_KEY_VALUE>' \
--data-raw '{
"storageType": "S3",
"enabled": true,
"compressed": true,
"amazonS3StorageSettings": {
"credentialsType": "IAM",
"path": "string",
"s3SecretCredentials": {
"accessKey": "string",
"secretKey": "string"
},
"s3IamCredentials": {
"arn": "string"
}
},
"azureBlobStorageSettings": {
"tenantId": "string",
"clientId": "string",
"clientSecret": "string",
"accountName": "string",
"containerName": "string",
"path": "string"
}
}'