Update audit log settings in project
Changes the audit log settings of an organization or a project. The body is a JSON merge patch (RFC 7396), sent as application/merge-patch+json: a setting left out keeps its value, null unsets it, so that it takes what the level above makes apply, and a value replaces it, a list's whole. With If-Match, the update fails with failed_precondition, as 412, if the settings changed since it was read.
Changes the audit log settings of an organization or a project.
The body is a JSON merge patch (RFC 7396), sent as application/merge-patch+json: a setting left out keeps its value, null unsets it, so that it takes what the level above makes apply, and a value replaces it, a list's whole. With If-Match, the update fails with failed_precondition, as 412, if the settings changed since it was read.
bearerAuthorizationBearer <token>An access token, or an API key.
project*stringThe project's ID.
^prj_[0-7][0-9a-hjkmnp-tv-z]{25}$If-Match?stringThe ETag of the settings as they were read: the update fails with failed_precondition, as 412, if they changed since.
application/merge-patch+json- body
dataAccess?array<>|Which calls Data Access records, by service, each at most once, replacing those set; or null to record nothing besides what the level above records.
1 <= itemsdataAccessRetentionDays?|How many days Data Access entries are kept, from 1 to 400, or null for 30. Organizations only. Keeping them for less time deletes the older ones within the hour.
int321 <= value <= 400OK
application/json- response
dataAccess?array<>Which calls Data Access records, by service, as set here, besides what the level above records; absent while unset, which adds nothing to it. Reads of audit logs are recorded whatever it says.
dataAccessRetentionDays?integerHow many days Data Access entries are kept, those of the organization's projects included; absent while unset, which keeps them 30 days. Organizations only.
int32effective*What the level above makes apply, which this level adds to and cannot turn off: for a project, its organization's effective settings; for an organization, kosem's defaults, which record nothing and keep Data Access entries 30 days.
inherited*What the level above makes apply, which this level adds to and cannot turn off: for a project, its organization's effective settings; for an organization, kosem's defaults, which record nothing and keep Data Access entries 30 days.
name*stringResource name, organizations/{organization_id}/settings/auditLog or projects/{project_id}/settings/auditLog.
updateTime?stringWhen the settings set here last changed; absent if they never did.
date-timecurl -X PATCH 'https://api.kosem.ai/v1/projects/string/settings/auditLog' \
-H 'Content-Type: application/merge-patch+json' \
-d '{}'{
"dataAccess": [
{
"service": "string",
"types": [
"ADMIN_READ"
]
}
],
"dataAccessRetentionDays": 0,
"effective": {
"dataAccess": [
{
"service": "string",
"types": [
{
"source": "organization",
"value": "ADMIN_READ"
}
]
}
],
"dataAccessRetentionDays": {
"source": "organization",
"value": 0
}
},
"inherited": {
"dataAccess": [
{
"service": "string",
"types": [
{
"source": "organization",
"value": "ADMIN_READ"
}
]
}
],
"dataAccessRetentionDays": {
"source": "organization",
"value": 0
}
},
"name": "string",
"updateTime": "2019-08-24T14:15:22Z"
}