Skip to main content

Update archive settings

PUT 

https://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.

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

    Applicable settings when the storageType is S3.

    credentialsType stringrequired

    Possible values: [IAM, KEYS]

    Specifies which credentials will be used for authentication. The options are either KEYS with s3SecretCredentials, or IAM with s3IamCredentials.

    path stringrequired

    Specify a path to the root of the S3 bucket. (Currently, archiving to a sub-bucket is supported, but not restoring from one.) Unique buckets - It is important to archive each account/sub-account to a separate S3 bucket.

    s3SecretCredentials object

    Authentication with S3 Secret Credentials is supported for backward compatibility. IAM roles are strongly recommended.

    accessKey stringrequired
    secretKey stringrequired
    s3IamCredentials object
    arn string

    Amazon Resource Name (ARN) to uniquely identify the S3 bucket.

    azureBlobStorageSettings object

    Applicable settings when the storageType is Blob.

    tenantId stringrequired

    Azure Directory (tenant) ID. The Tenant ID of the AD app. Go to Azure Active Directory > App registrations and select the app to see it.

    clientId stringrequired

    Azure application (client) ID. The Client ID of the AD app, found under the App Overview page. Go to Azure Active Directory > App registrations and select the app to see it.

    clientSecret stringrequired

    Azure client secret. Password of the Client secret, found in the app's Certificates & secrets page. Go to Azure Active Directory > App registrations and select the app. Then select Certificates & secrets to see it.

    accountName stringrequired

    Azure Storage account name. Name of the storage account that holds the container where the logs will be archived.

    containerName stringrequired

    Name of the container in the Storage account. This is where the logs will be archived.

    path stringnullable

    Optional virtual sub-folder specifiying a path within the container. Logs will be archived under the path “{container-name}/{virtual sub-folder}”. Avoid leading and trailing slashes (/). For example, the prefix “region1” is good, but “/region1/” is not.

Responses

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 -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"
}
}'
Request Collapse all
Base URL
https://api.logz.io
Auth
Parameters
— pathrequired
Body
{
  "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"
  }
}