Audit Log
Audit log displays a record of all the activities performed in a stack and helps you keep a track of all published items, updates, deletes, and current status of the existing content.
Read more about Audit Log.
You can now pass the branch header in the API request to fetch or manage modules located within specific branches of the stack. Additionally, you can also set the include_branch query parameter to true to include the _branch top-level key in the response. This key specifies the unique ID of the branch where the concerned Contentstack module resides.
Get audit log
https://api.contentstack.io/v3/audit-logsThe Get audit log request is used to retrieve the audit log of a stack.
You can apply queries to filter the results. Refer to the Queries section for more details.
To configure the permissions for your application via OAuth, please include the cm.audit-logs:read scope.
Note You can retrieve audit log information only for 30 days prior to the current day (for an organization).
{
"logs":[
{
"uid":"blt3502b7d1528607d300d0",
"stack":"blt8d542b122115b153",
"created_at":"2021-08-19T12:37:44.429Z",
"created_by":"blt7b815b05d2fe5dd8",
"module":"environment",
"event_type":"create",
"request_id":"86352",
"metadata":{
"title":"production",
"uid":"blt2c60160a046ce26d"
},
"remote_addr":"202.179.94.0",
"request":{
"r":"0.5090218519397551",
"environment":{
"deploy_content":false,
"servers":[
],
"urls":[
{
"url":"",
"locale":"en-us"
}
],
"name":"production",
"color":"#01977c"
}
},
"response":{
"notice":"Environment created successfully.",
"environment":{
"deploy_content":false,
"servers":[
],
"urls":[
{
"url":"",
"locale":"en-us"
}
],
"name":"production",
"uid":"blt2c60160a046ce26d",
"created_by":"blt7b815b05d2fe5dd8",
"updated_by":"blt7b815b05d2fe5dd8",
"created_at":"2021-08-19T12:37:44.414Z",
"updated_at":"2021-08-19T12:37:44.414Z",
"ACL":{
},
"_version":1,
"isEnvironment":true
}
}
},
{
"uid":"blt904c8db22bb5f0cc6066",
"stack":"blt8d542b122115b153",
"created_at":"2021-08-19T12:37:13.629Z",
"created_by":"blt7b815b05d2fe5dd8",
"module":"entry",
"event_type":"create",
"request_id":"41774",
"metadata":{
"content_type":{
"title":"Sample",
"uid":"sample"
},
"locale":{
"name":"English - United States",
"code":"en-us"
},
"title":"Test",
"uid":"bltfab061dff1aa989b",
"version":1
},
"remote_addr":"202.179.94.0",
"request":{
"form_uid":"sample",
"locale":"en-us",
"r":"0.09477605369787079",
"entry":{
"title":"Test",
"json_rte":{
"type":"doc",
"attrs":{
"dirty":true
},
"uid":"3ccce4d01b9e4f46a2153b9de8e3e3e3",
"children":[
{
"type":"p",
"attrs":{
"dirty":true
},
"uid":"bf6548b838504b458d3fce4bcbeb9a68",
"children":[
{
"text":"Hello World!"
}
]
}
]
},
"tags":[
"new",
"entry"
],
"locale":"en-us"
},
"deleted":null,
"fallback_locale":"en-us"
},
"response":{
"notice":"Entry created successfully.",
"entry":{
"title":"Test",
"json_rte":{
"type":"doc",
"attrs":{
},
"uid":"3ccce4d01b9e4f46a2153b9de8e3e3e3",
"children":[
{
"type":"p",
"attrs":{
},
"uid":"bf6548b838504b458d3fce4bcbeb9a68",
"children":[
{
"text":"Hello World!"
}
]
}
],
"_version":1
},
"tags":[
"new",
"entry"
],
"locale":"en-us",
"uid":"bltfab061dff1aa989b",
"created_by":"blt7b815b05d2fe5dd8",
"updated_by":"blt7b815b05d2fe5dd8",
"created_at":"2021-08-19T12:37:13.553Z",
"updated_at":"2021-08-19T12:37:13.553Z",
"ACL":{
},
"_version":1,
"_in_progress":false
}
}
},
{
"uid":"blt83c51a06f22550179da7",
"stack":"blt8d542b122115b153",
"created_at":"2021-08-19T12:36:44.681Z",
"created_by":"blt7b815b05d2fe5dd8",
"module":"content_type",
"event_type":"update",
"request_id":"41315",
"metadata":{
"title":"Sample",
"uid":"sample",
"version":2,
"scope":null
},
"remote_addr":"202.179.94.0",
"request":{
"r":"0.5419430454788539",
"content_type":{
"created_at":"2021-08-19T12:36:33.899Z",
"updated_at":"2021-08-19T12:36:33.899Z",
"title":"Sample",
"uid":"sample",
"_version":1,
"schema":[
{
"data_type":"text",
"display_name":"Title",
"field_metadata":{
"_default":true,
"version":3
},
"mandatory":true,
"uid":"title",
"unique":true,
"multiple":false,
"non_localizable":false,
"indexed":false,
"inbuilt_model":false
},
{
"data_type":"json",
"display_name":"JSON Rich Text Editor",
"uid":"json_rte",
"field_metadata":{
"allow_json_rte":true,
"embed_entry":false,
"description":"",
"default_value":"",
"multiline":false,
"rich_text_type":"advanced",
"options":[
]
},
"format":"",
"error_messages":{
"format":""
},
"reference_to":[
"sys_assets"
],
"multiple":false,
"non_localizable":false,
"unique":false,
"mandatory":false,
"indexed":false,
"inbuilt_model":false
}
],
"last_activity":{
},
"maintain_revisions":true,
"description":"",
"DEFAULT_ACL":{
"others":{
"read":false,
"create":false
},
"users":[
{
"read":true,
"sub_acl":{
"read":true
},
"uid":"blt893f7ed431972225"
}
],
"management_token":{
"read":true
}
},
"SYS_ACL":{
"roles":[
{
"uid":"bltbc79e980cd6e5f1f",
"read":true,
"sub_acl":{
"create":true,
"read":true,
"update":true,
"delete":true,
"publish":true
},
"update":true,
"delete":true
},
{
"uid":"blt027922b7aee26e6c",
"read":true,
"sub_acl":{
"create":true,
"read":true,
"update":true,
"delete":true,
"publish":true
}
},
{
"uid":"bltf59a1e55f70e4fd0",
"read":true,
"sub_acl":{
"create":true,
"read":true,
"update":true,
"delete":true,
"publish":true
},
"update":true,
"delete":true
}
],
"others":{
"read":false,
"create":false,
"update":false,
"delete":false,
"sub_acl":{
"read":false,
"create":false,
"update":false,
"delete":false,
"publish":false
}
}
},
"options":{
"is_page":false,
"singleton":true,
"sub_title":[
],
"title":"title"
},
"abilities":{
"get_one_object":true,
"get_all_objects":true,
"create_object":true,
"update_object":true,
"delete_object":true,
"delete_all_objects":true
},
"extension_uids":[
],
"id":"rootfields"
},
"form_uid":"sample",
"deleted":false
},
"response":{
"notice":"Content Type updated successfully.",
"content_type":{
"created_at":"2021-08-19T12:36:33.899Z",
"updated_at":"2021-08-19T12:36:44.643Z",
"title":"Sample",
"uid":"sample",
"_version":2,
"inbuilt_class":false,
"schema":[
{
"data_type":"text",
"display_name":"Title",
"field_metadata":{
"_default":true,
"version":3
},
"mandatory":true,
"uid":"title",
"unique":true,
"multiple":false,
"non_localizable":false
},
{
"data_type":"json",
"display_name":"JSON Rich Text Editor",
"uid":"json_rte",
"field_metadata":{
"allow_json_rte":true,
"embed_entry":false,
"description":"",
"default_value":"",
"multiline":false,
"rich_text_type":"advanced",
"options":[
]
},
"format":"",
"error_messages":{
"format":""
},
"reference_to":[
"sys_assets"
],
"multiple":false,
"non_localizable":false,
"unique":false,
"mandatory":false
}
],
"last_activity":{
},
"maintain_revisions":true,
"description":"",
"DEFAULT_ACL":{
"others":{
"read":false,
"create":false
},
"users":[
{
"uid":"blt893f7ed431972225",
"read":true,
"sub_acl":{
"read":true
}
}
]
},
"SYS_ACL":{
"roles":[
],
"others":{
"read":false,
"create":false,
"update":false,
"delete":false,
"sub_acl":{
"read":false,
"create":false,
"update":false,
"delete":false,
"publish":false
}
}
},
"field_rules":null,
"options":{
"is_page":false,
"singleton":true,
"sub_title":[
],
"title":"title"
},
"abilities":{
"get_one_object":true,
"get_all_objects":true,
"create_object":true,
"update_object":true,
"delete_object":true,
"delete_all_objects":true
}
}
}
},
{
"uid":"blt0eb433d0dc9f6ed2b25f",
"stack":"blt8d542b122115b153",
"created_at":"2021-08-19T12:36:33.934Z",
"created_by":"blt7b815b05d2fe5dd8",
"module":"content_type",
"event_type":"create",
"request_id":"80989",
"metadata":{
"title":"Sample",
"uid":"sample",
"version":1
},
"remote_addr":"202.179.94.0",
"request":{
"r":"0.0007076494692754842",
"content_type":{
"title":"Sample",
"description":"",
"options":{
"is_page":false,
"singleton":true,
"sub_title":[
],
"title":"title"
},
"schema":[
{
"data_type":"text",
"display_name":"Title",
"field_metadata":{
"_default":true,
"version":3
},
"mandatory":true,
"uid":"title",
"unique":true,
"multiple":false,
"indexed":false,
"inbuilt_model":false,
"non_localizable":false
}
],
"uid":"sample"
},
"prevcreate":true,
"limit":100,
"environment":null
},
"response":{
"notice":"Content Type created successfully.",
"content_type":{
"created_at":"2021-08-19T12:36:33.899Z",
"updated_at":"2021-08-19T12:36:33.899Z",
"title":"Sample",
"uid":"sample",
"_version":1,
"inbuilt_class":false,
"schema":[
{
"data_type":"text",
"display_name":"Title",
"field_metadata":{
"_default":true,
"version":3
},
"mandatory":true,
"uid":"title",
"unique":true,
"multiple":false,
"non_localizable":false
}
],
"last_activity":{
},
"maintain_revisions":true,
"description":"",
"DEFAULT_ACL":{
"others":{
"read":false,
"create":false
},
"users":[
{
"read":true,
"sub_acl":{
"read":true
},
"uid":"blt893f7ed431972225"
}
],
"management_token":{
"read":true
}
},
"SYS_ACL":{
"roles":[
],
"others":{
"read":false,
"create":false,
"update":false,
"delete":false,
"sub_acl":{
"read":false,
"create":false,
"update":false,
"delete":false,
"publish":false
}
}
},
"field_rules":null,
"options":{
"is_page":false,
"singleton":true,
"sub_title":[
],
"title":"title"
},
"abilities":{
"get_one_object":true,
"get_all_objects":true,
"create_object":true,
"update_object":true,
"delete_object":true,
"delete_all_objects":true
}
}
}
},
{
"uid":"bltf5917f09e8ccda132fc1",
"stack":"blt8d542b122115b153",
"created_at":"2021-08-19T12:36:23.047Z",
"created_by":"blt7b815b05d2fe5dd8",
"module":"stack",
"event_type":"create",
"request_id":"17045",
"metadata":{
"title":"Test",
"uid":"blt76a929e3bf2324c9"
},
"remote_addr":"202.179.94.0",
"request":{
"r":"0.30356792013646405",
"stack":{
"name":"Test",
"master_locale":"en-us"
},
"include_discrete_variables":true,
"limit":200
},
"response":{
"notice":"Stack created successfully.",
"stack":{
"cluster":"default",
"created_at":"2021-08-19T12:36:21.510Z",
"updated_at":"2021-08-19T12:36:23.025Z",
"uid":"blt76a929e3bf2324c9",
"name":"Test",
"description":null,
"org_uid":"blt4051c65ea6ddf287",
"api_key":"blt8d542b122115b153",
"master_locale":"en-us",
"is_asset_download_public":true,
"owner_uid":"blt7b815b05d2fe5dd8",
"user_uids":[
"blt7b815b05d2fe5dd8"
],
"settings":{
"version":"2019-04-30",
"rte_version":3,
"fallback_publish_contents":true,
"blockAuthQueryParams":false,
"allowedCDNTokens":[
"authtoken",
"access_token",
"authorization"
],
"webhook_enabled":false,
"live_preview":{
},
"language_fallback":false
},
"master_key":"blt716b635e7e01bc33",
"SYS_ACL":{
"others":{
"invite":false,
"sub_acl":{
"create":false,
"read":false,
"update":false,
"delete":false
}
},
"roles":[
{
"uid":"bltbc79e980cd6e5f1f",
"name":"Developer",
"invite":true,
"sub_acl":{
"create":true,
"read":true,
"update":true,
"delete":true
}
},
{
"uid":"bltf59a1e55f70e4fd0",
"name":"Admin",
"invite":true,
"sub_acl":{
"create":true,
"read":true,
"update":true,
"delete":true
}
}
]
},
"discrete_variables":{
"cms":true,
"_version":3,
"secret_key":"e7c0a91c26c12e8f4b0cc8fd4465d1c70ece58ec"
}
}
}
},
{
"uid":"bltf1d8caa6ea22d77c4da4",
"stack":"blt8d542b122115b153",
"created_at":"2021-08-19T12:36:22.916Z",
"created_by":"blt7b815b05d2fe5dd8",
"module":"locale",
"event_type":"create",
"request_id":"17045",
"metadata":{
"title":"English - United States",
"uid":"en-us"
},
"remote_addr":"202.179.94.0",
"request":{
"r":"0.30356792013646405",
"stack":{
"name":"Test",
"master_locale":"en-us"
}
},
"response":{
"code":"en-us",
"fallback_locale":null,
"uid":"blt160172ec89fa4a8f",
"created_by":"blt7b815b05d2fe5dd8",
"updated_by":"blt7b815b05d2fe5dd8",
"created_at":"2021-08-19T12:36:22.906Z",
"updated_at":"2021-08-19T12:36:22.906Z",
"api_key":"blt8d542b122115b153",
"org_uid":"blt4051c65ea6ddf287",
"name":"English - United States",
"ACL":{
},
"_version":1,
"isLanguage":true
}
},
{
"uid":"blt55e8bb1fb9f52f96627e",
"stack":"blt8d542b122115b153",
"created_at":"2021-08-19T12:36:22.906Z",
"created_by":"blt7b815b05d2fe5dd8",
"module":"roles",
"event_type":"create",
"request_id":"17045",
"metadata":{
"title":"Admin",
"uid":"bltf59a1e55f70e4fd0",
"description":"Admin can perform all actions and manage all settings of the stack, except the ability to delete or transfer ownership of the stack."
},
"remote_addr":"202.179.94.0",
"request":{
"r":"0.30356792013646405",
"stack":{
"name":"Test",
"master_locale":"en-us"
}
},
"response":{
"name":"Admin",
"description":"Admin can perform all actions and manage all settings of the stack, except the ability to delete or transfer ownership of the stack.",
"uid":"bltf59a1e55f70e4fd0",
"org_uid":"blt4051c65ea6ddf287",
"api_key":"blt8d542b122115b153",
"created_by":"blt7b815b05d2fe5dd8",
"updated_by":"blt7b815b05d2fe5dd8",
"created_at":"2021-08-19T12:36:22.886Z",
"updated_at":"2021-08-19T12:36:22.886Z",
"deleted_at":false,
"_id":"611e504617da5917890a656a"
}
},
{
"uid":"blt21bbbddffec2a55cd93e",
"stack":"blt8d542b122115b153",
"created_at":"2021-08-19T12:36:22.901Z",
"created_by":"blt7b815b05d2fe5dd8",
"module":"roles",
"event_type":"create",
"request_id":"17045",
"metadata":{
"title":"Content Manager",
"uid":"blt027922b7aee26e6c",
"description":"Content Managers can view all content types, manage entries and assets. They cannot edit content types or access stack settings."
},
"remote_addr":"202.179.94.0",
"request":{
"r":"0.30356792013646405",
"stack":{
"name":"Test",
"master_locale":"en-us"
}
},
"response":{
"name":"Content Manager",
"description":"Content Managers can view all content types, manage entries and assets. They cannot edit content types or access stack settings.",
"uid":"blt027922b7aee26e6c",
"rules":[
{
"module":"locale",
"locales":[
"$all"
]
},
{
"module":"environment",
"environments":[
"$all"
]
},
{
"module":"asset",
"assets":[
"$all"
],
"acl":{
"create":true,
"read":true,
"update":true,
"delete":true,
"publish":true
}
}
],
"org_uid":"blt4051c65ea6ddf287",
"api_key":"blt8d542b122115b153",
"created_by":"blt7b815b05d2fe5dd8",
"updated_by":"blt7b815b05d2fe5dd8",
"created_at":"2021-08-19T12:36:22.886Z",
"updated_at":"2021-08-19T12:36:22.886Z",
"deleted_at":false,
"_id":"611e504617da5917890a6569"
}
},
{
"uid":"blta408bd1f57664b451d4f",
"stack":"blt8d542b122115b153",
"created_at":"2021-08-19T12:36:22.890Z",
"created_by":"blt7b815b05d2fe5dd8",
"module":"roles",
"event_type":"create",
"request_id":"17045",
"metadata":{
"title":"Developer",
"uid":"bltbc79e980cd6e5f1f",
"description":"Developer can perform all Content Manager's actions, view audit logs, create roles, invite users, manage content types, languages, and environments."
},
"remote_addr":"202.179.94.0",
"request":{
"r":"0.30356792013646405",
"stack":{
"name":"Test",
"master_locale":"en-us"
}
},
"response":{
"name":"Developer",
"description":"Developer can perform all Content Manager's actions, view audit logs, create roles, invite users, manage content types, languages, and environments.",
"uid":"bltbc79e980cd6e5f1f",
"rules":[
{
"module":"locale",
"locales":[
"$all"
]
},
{
"module":"environment",
"environments":[
"$all"
]
},
{
"module":"asset",
"assets":[
"$all"
],
"acl":{
"create":true,
"read":true,
"update":true,
"delete":true,
"publish":true
}
}
],
"org_uid":"blt4051c65ea6ddf287",
"api_key":"blt8d542b122115b153",
"created_by":"blt7b815b05d2fe5dd8",
"updated_by":"blt7b815b05d2fe5dd8",
"created_at":"2021-08-19T12:36:22.886Z",
"updated_at":"2021-08-19T12:36:22.886Z",
"deleted_at":false,
"_id":"611e504617da5917890a6568"
}
}
]
}Get audit log item
https://api.contentstack.io/v3/audit-logs/{log_item_uid}The Get audit log item request is used to retrieve a specific item from the audit log of a stack.
To configure the permissions for your application via OAuth, please include the cm.audit-logs:read scope.
Note You can retrieve audit log information only for 30 days prior to the current day (for an organization).
{
"log":{
"_id":"blt3502b7d1528607d300d0",
"uid":"blt3502b7d1528607d300d0",
"stack":"blt8d542b122115b153",
"created_at":"2021-08-19T12:37:44.429Z",
"created_by":"blt7b815b05d2fe5dd8",
"module":"environment",
"event_type":"create",
"request_id":"86352",
"metadata":{
"title":"production",
"uid":"blt2c60160a046ce26d"
},
"remote_addr":"202.179.94.0",
"request":{
"r":"0.5090218519397551",
"environment":{
"deploy_content":false,
"servers":[
],
"urls":[
{
"url":"",
"locale":"en-us"
}
],
"name":"production",
"color":"#01977c"
}
},
"response":{
"notice":"Environment created successfully.",
"environment":{
"deploy_content":false,
"servers":[
],
"urls":[
{
"url":"",
"locale":"en-us"
}
],
"name":"production",
"uid":"blt2c60160a046ce26d",
"created_by":"blt7b815b05d2fe5dd8",
"updated_by":"blt7b815b05d2fe5dd8",
"created_at":"2021-08-19T12:37:44.414Z",
"updated_at":"2021-08-19T12:37:44.414Z",
"ACL":{
},
"_version":1,
"isEnvironment":true
}
}
}
}