{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-guides/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Audit API V3","description":"Sprinklr offers robust, convenient, and simple RESTful Web service APIs to integrate data from Sprinklr to any external system.","keywords":["Sprinklr API","Sprinklr Developer Portal","OAuth 2.0","RESTful API","Social Media API","Customer Experience API","Unified-CXM","Social Listening API"]},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"audit-api-v3","__idx":0},"children":["Audit API V3"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Audit API"]}," retrieves the change history for Sprinklr assets. Developers can use the API to identify what changed, when the change occurred, and the user associated with the change. The corresponding change history is available in the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Activity"]}," tab in Sprinklr."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Audit API V3 provides the following operations:"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Operation"},"children":["Operation"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Method"},"children":["Method"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Path"},"children":["Path"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Purpose"},"children":["Purpose"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Search the audit trail"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/api/v3/audit/search"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Retrieve audit records for one or more assets"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Fetch the next page"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GET"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/api/v3/audit?id={cursorId}"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Retrieve the next page of audit records"]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Start with POST ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/api/v3/audit/search"]},". If the response includes a cursor, pass it to GET ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/api/v3/audit"]}," to retrieve the next page."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"asset-classes","__idx":1},"children":["Asset classes"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["An ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["asset class"]}," is the kind of object being audited — features present on Sprinklr's platform, such as Account, Outbound Message, Case, or Profile."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Every request pairs an asset class with one or more asset IDs belonging to that class. The API then returns the change history for those assets."]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Asset class"},"children":["Asset class"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["UNIVERSAL_CASE"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Cases"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["MESSAGE_WORKFLOW"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Message workflow records"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PROFILE_WORKFLOW"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Profile workflow records"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["MEDIA_ASSET"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Media assets"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["OUTBOUND_MESSAGE"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Outbound messages"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["USER"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Users"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SPR_TASK"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Tasks"]}]}]}]}]},{"$$mdtype":"Tag","name":"blockquote","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Asset class and asset IDs must correspond."]}," The IDs you send must belong to the class you name. Start with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["UNIVERSAL_CASE"]}," when validating your integration — it is the value used in the worked examples below."]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"base-url","__idx":2},"children":["Base URL"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"https://api3.sprinklr.com/{env}/api/v3\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The Audit API endpoints are:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"https://api3.sprinklr.com/{env}/api/v3/audit/search\nhttps://api3.sprinklr.com/{env}/api/v3/audit?id={cursorId}\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Replace ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["{env}"]}," with your assigned Sprinklr environment. For the production environment at app.sprinklr.com, omit the {env} segment from the URL. For information about supported environments and how to identify your environment, see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://dev.sprinklr.com/apis"},"children":["APIs | Sprinklr Developer Portal"]},"."]},{"$$mdtype":"Tag","name":"blockquote","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Environment-scoped credentials."]}," API keys and access tokens are scoped to a single environment. A key generated for ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["prod0"]}," returns ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["401 Unauthorized"]}," against ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["prod19"]}," even when the request is otherwise perfectly formed. When you get an unexpected ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["401"]},", verify the environment before debugging the payload."]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"authentication","__idx":3},"children":["Authentication"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Audit API V3 uses OAuth 2.0 bearer authentication and an API key. Include both the access token and API key with every request."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["See ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://dev.sprinklr.com/api-overview"},"children":["API Overview"]}," for portal registration, API key and secret generation, and the Authorize flow."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"required-headers","__idx":4},"children":["Required headers"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Header"},"children":["Header"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Value"},"children":["Value"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Purpose"},"children":["Purpose"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Required on"},"children":["Required on"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Authorization"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Bearer {{accessToken}}"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Authenticates the user with the server"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["All requests"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Key"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["{{apiKey}}"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Authenticates the application with the server"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["All requests"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Content-Type"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["application/json"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Declares the request body media type"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /audit/search"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Accept"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["application/json"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Declares the acceptable response type"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["All requests"]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Both ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Authorization"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Key"]}," are required on every call. Sending only one returns ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["401"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Content-Type"]}," is only meaningful on the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST"]},", since the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GET"]}," has no body."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"credential-lifetimes","__idx":5},"children":["Credential lifetimes"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Credential"},"children":["Credential"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Lifetime"},"children":["Lifetime"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Authorization code"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["10 minutes"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["API key"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No expiry"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Access token"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["30 days by default"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"blockquote","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["One token pair per API key."]}," Generating a new access token for an API key invalidates the previously issued token and refresh token for that key. If two services share one key and both refresh, they will knock each other offline. Give each service its own key."]}]},{"$$mdtype":"Tag","name":"blockquote","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Credential hygiene."]}," Never commit an access token or API key to source control, never paste one into a ticket or chat, and never log the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Authorization"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Key"]}," header values. Every credential on this page is a placeholder."]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"search-the-audit-trail","__idx":6},"children":["Search the audit trail"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"POST https://api3.sprinklr.com/{env}/api/v3/audit/search\n"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"request-body-parameters","__idx":7},"children":["Request body parameters"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Parameter"},"children":["Parameter"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Type"},"children":["Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Required"},"children":["Required"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["assetIds"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Array of strings"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Yes"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["List of asset IDs whose audit trail you want"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["assetClass"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["String"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Yes"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The asset class the IDs belong to"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["limit"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Integer"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Number of results in the response. Default ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["50"]},", maximum ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["200"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["order"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["String"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Sorting order — ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ASC"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["DESC"]},". Defaults to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["DESC"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["from"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Integer"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Time after which audits are required, in epoch milliseconds"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["upto"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Integer"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Time before which audits are required, in epoch milliseconds"]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Send asset IDs as an array of strings:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"\"assetIds\": [ \"10520954\" ]\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Batch multiple IDs into a single call rather than looping one asset at a time."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use from and upto to limit the search to a specific time range. Both values use epoch milliseconds, consistent with the auditDate value in the response."]},{"$$mdtype":"Tag","name":"blockquote","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Do not confuse ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["assetIds"]}," with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["assetId"]},"."]}," The ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["request"]}," field is ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["assetIds"]}," (plural, array). The ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["response"]}," field on each record is ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["assetId"]}," (singular, string). They are different fields."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"example-request","__idx":8},"children":["Example request"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"curl -X POST \\\n  'https://api3.sprinklr.com/{env}/api/v3/audit/search' \\\n  -H 'Authorization: Bearer {{accessToken}}' \\\n  -H 'Key: {{apiKey}}' \\\n  -H 'Content-Type: application/json' \\\n  -H 'Accept: application/json' \\\n  -d '{\n    \"assetIds\": [\n      \"10520954\"\n    ],\n    \"assetClass\": \"UNIVERSAL_CASE\",\n    \"order\": \"DESC\",\n    \"limit\": 2\n  }'\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"example-response","__idx":9},"children":["Example response"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"data\": {\n    \"results\": [\n      {\n        \"assetClass\": \"UNIVERSAL_CASE\",\n        \"assetId\": \"10520954\",\n        \"auditDate\": 1650461298712,\n        \"userId\": 0,\n        \"changes\": [\n          {\n            \"fieldName\": \"Messages\",\n            \"oldValues\": [],\n            \"newValues\": [\n              \"New value 1\"\n            ]\n          }\n        ]\n      },\n      {\n        \"assetClass\": \"UNIVERSAL_CASE\",\n        \"assetId\": \"10520954\",\n        \"auditDate\": 1650461298594,\n        \"userId\": 0,\n        \"changes\": [\n          {\n            \"fieldName\": \"Message Sentiment\",\n            \"oldValues\": [],\n            \"newValues\": [\n              \"New value 2\"\n            ]\n          }\n        ]\n      }\n    ],\n    \"cursor\": \"638e12816d414169dc5ad755\"\n  },\n  \"errors\": []\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["In this example, the response contains a cursor because additional audit records are available. ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["limit"]}," was ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["2"]}," and a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cursor"]}," came back, so more data is available."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Note the ordering: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["1650461298712"]}," precedes ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["1650461298594"]},", which is ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["descending"]}," by ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["auditDate"]}," — consistent with the requested ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["\"order\": \"DESC\""]},"."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"fetch-the-next-page-by-cursor","__idx":10},"children":["Fetch the next page by cursor"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"GET /api/v3/audit?id={cursorId}\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Retrieves the next page of audit records. Use the cursor returned by the previous Audit API response."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"query-parameters","__idx":11},"children":["Query parameters"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Parameter"},"children":["Parameter"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"In"},"children":["In"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Type"},"children":["Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["id"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["query"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["String"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Cursor ID from a previous audit search response"]}]}]}]}]},{"$$mdtype":"Tag","name":"blockquote","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["The parameter is named ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["id"]},", not ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cursorId"]},"."]}," Always send it — a request with no cursor has no defined result."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"example-request-1","__idx":12},"children":["Example request"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"curl -X GET \\\n  'https://api3.sprinklr.com/{env}/api/v3/audit?id=638e12816d414169dc5ad755' \\\n  -H 'Authorization: Bearer {{accessToken}}' \\\n  -H 'Key: {{apiKey}}' \\\n  -H 'Accept: application/json'\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"example-response-1","__idx":13},"children":["Example response"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"data\": {\n    \"results\": [\n      {\n        \"assetClass\": \"UNIVERSAL_CASE\",\n        \"assetId\": \"10520954\",\n        \"auditDate\": 1650452106126,\n        \"userId\": 0,\n        \"changes\": [\n          {\n            \"fieldName\": \"Messages\",\n            \"oldValues\": [],\n            \"newValues\": [\n              \"Test1\"\n            ]\n          }\n        ]\n      }\n    ],\n    \"cursor\": \"627e334a25033713a3cb8887\"\n  },\n  \"errors\": []\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The response shape is identical to the search response, including its own ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cursor"]}," for the page after this one."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If the response includes another cursor, use it to request the following page. Continue until the response no longer provides a cursor."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"response-fields","__idx":14},"children":["Response fields"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"data\": {\n    \"results\": [ ... ],\n    \"cursor\": \"...\"\n  },\n  \"errors\": []\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Field"},"children":["Field"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Type"},"children":["Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["data.results"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Array"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Array listing the details of the response"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["data.results[].assetClass"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["String"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Asset class for which the request was made"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["data.results[].assetId"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["String"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The asset ID from the request"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["data.results[].auditDate"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Epoch milliseconds"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The date on which the change was recorded"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["data.results[].userId"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Integer"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The ID of the user who made the changes"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["data.results[].changes"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Array"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Lists the change details"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["data.results[].changes[].fieldName"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["String"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The name of the field that was modified"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["data.results[].changes[].oldValues"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Array of strings"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The old value of the field"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["data.results[].changes[].newValues"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Array of strings"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The new or changed value of the field"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["data.cursor"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["String"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Returned when the response has more data than the requested ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["limit"]},". Use it to fetch the next set of data"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["errors"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Array"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Array of error objects. Empty on success"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"intepret-auditdate","__idx":15},"children":["Intepret ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["auditDate"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["auditDate"]}," field contains an epoch timestamp in milliseconds."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For example,"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Raw value"},"children":["Raw value"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"UTC"},"children":["UTC"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["1650461298712"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["2022-04-20T13:28:18.712Z"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["1650461298594"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["2022-04-20T13:28:18.594Z"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["1650452106126"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["2022-04-20T10:55:06.126Z"]}]}]}]}]},{"$$mdtype":"Tag","name":"blockquote","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Parsing ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["auditDate"]}," as seconds yields a date in 1970."]}," This is the most common integration error against this API."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Multiple audit records can have timestamps only a few milliseconds apart. Do not assume that auditDate uniquely identifies an audit record."," ","Consecutive records can be ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["milliseconds apart"]}," — the two values above differ by 118 ms. A single user action can produce several audit records, so do not assume one record per user interaction, and ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["do not use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["auditDate"]}," as a unique key"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"intepret-changes","__idx":16},"children":["Intepret ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["changes"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["changes"]}," is an array — one entry per field modified in that audit event. Each entry has ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["fieldName"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["oldValues"]},", and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["newValues"]},". Both value fields are ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["arrays"]},", because a field can hold multiple values."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Each entry includes"," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["fieldName"]},": Name of the modified field"," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["oldValues"]},": Values before the change"," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["newValues"]},": Values after the change"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Both ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["oldValues"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["newValues"]}," are arrays because a field can contain multiple values."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"pagination","__idx":17},"children":["Pagination"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Audit API V3 uses cursor-based pagination."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use the following sequence:"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Send ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /api/v3/audit/search"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Process the audit records in the response."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Check whether the response includes a cursor."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["If a cursor is present, send ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GET /api/v3/audit?id={cursorId}"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Repeat until the response no longer includes a cursor."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Example"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"POST /api/v3/audit/search   { \"assetIds\": [\"10520954\"], \"assetClass\": \"UNIVERSAL_CASE\", \"limit\": 200 }\n  → results and cursor \"638e12816d414169dc5ad755\"\n\nGET  /api/v3/audit?id=638e12816d414169dc5ad755\n  → results and cursor \"627e334a25033713a3cb8887\"\n\nGET  /api/v3/audit?id=627e334a25033713a3cb8887\n  → results without another cursor, cursor absent/null/empty  → stop\n"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"error-responses","__idx":18},"children":["Error Responses"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Audit API operations can return the following HTTP status codes:"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"HTTP code"},"children":["HTTP code"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Scenario"},"children":["Scenario"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["200 OK"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Success. Audit records returned"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["400 Bad Request"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Malformed body, missing ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["assetIds"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["assetClass"]},", invalid ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["assetClass"]},", or a malformed cursor"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["401 Unauthorized"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Invalid or missing ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Authorization"]}," token or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Key"]}," header"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["403 Forbidden"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Caller lacks permission to read the audit trail for that asset"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["404 Not Found"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The asset or the cursor does not exist"]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["When the response contains an errors array, each error can include the following fields:"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Field"},"children":["Field"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Type"},"children":["Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["id"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["String"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Error identifier"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["code"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Integer"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Numeric error code"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["message"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["String"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Error message key, for example ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["account.not.found"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Error responses return ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["data"]}," as ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["null"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Example"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"{\n  \"data\": null,\n  \"errors\": [\n    {\n      \"id\": \"error-id\",\n      \"code\": 400,\n      \"message\": \"account.not.found\"\n    }\n  ]\n}\n"},"children":[]},{"$$mdtype":"Tag","name":"blockquote","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Inspect both the HTTP status and the errors array when handling unsuccessful requests."]}]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"troubleshooting","__idx":19},"children":["Troubleshooting"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Symptom"},"children":["Symptom"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Likely cause"},"children":["Likely cause"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Fix"},"children":["Fix"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["401"]}," with all headers present"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Credentials belong to a different environment"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Confirm the key and token were generated for the environment in the base URL"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["401"]}," after previously working"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Access token expired (30-day default), or a second token was generated for the same API key"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Refresh the token; give each service its own key"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["401"]}," and only one auth header sent"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Both ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Authorization"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Key"]}," are required"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Send both"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["400"]}," citing ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["assetIds"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Sent ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["assetId"]}," (singular) instead of ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["assetIds"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["assetIds"]},", and send it as an array"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Client-side type error on ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["assetIds"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Sent integers where strings are expected"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Quote the IDs: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["[\"10520954\"]"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["400"]}," on ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["assetClass"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The asset class does not match the IDs sent"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Confirm the IDs belong to the class you named"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["404"]}," on the cursor call"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Cursor expired, already consumed, or copied from a different search"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Re-run the search from the beginning; do not persist cursors"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Pagination never terminates"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Your loop checks for only one terminal form"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Treat absent, ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["null"]},", and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["\"\""]}," as terminal; add a max-iteration guard"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Dates decode to 1970"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["auditDate"]}," is epoch ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["milliseconds"]},", parsed as seconds"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Parse as milliseconds"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Duplicate-looking records"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Multiple audit records can share one user action, milliseconds apart"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Do not use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["auditDate"]}," as a unique key"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["More records than expected"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["limit"]}," defaults to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["50"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Set ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["limit"]}," explicitly on every call"]}]}]}]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"migrating-from-v2","__idx":20},"children":["Migrating from V2"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"endpoint-mapping","__idx":21},"children":["Endpoint mapping"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"V2"},"children":["V2"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"V3"},"children":["V3"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /api/v2/audit/fetch"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /api/v3/audit/search"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GET /api/v2/audit?id={cursorId}"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GET /api/v3/audit?id={cursorId}"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"diff","header":{"controls":{"copy":{}}},"source":"- POST https://api3.sprinklr.com/{env}/api/v2/audit/fetch\n+ POST https://api3.sprinklr.com/{env}/api/v3/audit/search\n\n- GET  https://api3.sprinklr.com/{env}/api/v2/audit?id={cursorId}\n+ GET  https://api3.sprinklr.com/{env}/api/v3/audit?id={cursorId}\n","lang":"diff"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"field-mapping","__idx":22},"children":["Field mapping"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"V2"},"children":["V2"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"V3"},"children":["V3"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Change"},"children":["Change"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["assetIds"]}," (body)"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["assetIds"]}," (body)"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["None"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["assetClass"]}," (body)"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["assetClass"]}," (body)"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["None"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["order"]}," (body)"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["order"]}," (body)"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["None"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["limit"]}," (body)"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["limit"]}," (body)"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["None"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["—"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["from"]}," (body)"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["New in V3"]}," — lower time bound"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["—"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["upto"]}," (body)"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["New in V3"]}," — upper time bound"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["id"]}," (query, cursor)"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["id"]}," (query, cursor)"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["None"]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["The request and response contracts are otherwise unchanged."]}," Apart from the path and the two new optional time-window fields, a working V2 integration becomes a working V3 integration by changing ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["v2"]}," to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["v3"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["fetch"]}," to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["search"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"common-use-cases","__idx":23},"children":["Common Use Cases"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"find-who-changed-a-case-and-when","__idx":24},"children":["Find who changed a case and when"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["A case was resolved incorrectly and you need the change history."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"assetIds\": [\"10520954\"],\n  \"assetClass\": \"UNIVERSAL_CASE\",\n  \"order\": \"DESC\",\n  \"limit\": 50\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["DESC"]}," puts the most recent change first, which is usually what you want when investigating a recent incident."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"export-a-full-history-for-a-compliance-archive","__idx":25},"children":["Export a full history for a compliance archive"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Send up to the maximum ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["limit"]}," of ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["200"]},", then follow ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cursor"]}," until the result set is exhausted. Use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ASC"]}," so the archive reads chronologically:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"assetIds\": [\"10520954\", \"10520955\", \"10520956\"],\n  \"assetClass\": \"UNIVERSAL_CASE\",\n  \"order\": \"ASC\",\n  \"limit\": 200\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["assetIds"]}," accepts multiple IDs in one call — batch them rather than looping one asset at a time."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"run-an-incremental-nightly-sync","__idx":26},"children":["Run an incremental nightly sync"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You mirror the audit trail into a data warehouse and only want what is new. Store the previous run's high-water mark and pass it as ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["from"]},":"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"assetIds\": [\"10520954\"],\n  \"assetClass\": \"UNIVERSAL_CASE\",\n  \"from\": 1650452106126,\n  \"upto\": 1650461298712,\n  \"order\": \"ASC\",\n  \"limit\": 200\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This is materially cheaper than pulling the full history and filtering client-side. Prefer a slightly overlapping window with de-duplication so that records written exactly on a boundary are never missed."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"detect-changes-to-a-specific-field","__idx":27},"children":["Detect changes to a specific field"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["There is ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["no server-side field filter"]},". Fetch the audit trail for the asset and filter ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["changes[].fieldName"]}," client-side. Narrow the volume first with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["from"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["upto"]}," rather than filtering a full history."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"reconstruct-an-assets-state-at-a-point-in-time","__idx":28},"children":["Reconstruct an asset's state at a point in time"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Fetch with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ASC"]}," order and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["upto"]}," set to your target timestamp, then replay ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["changes[].newValues"]}," forward. Because ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["oldValues"]}," is also returned, you can equally walk backward from the current state."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"page-through-a-large-result-set","__idx":29},"children":["Page through a large result set"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"POST /api/v3/audit/search   { \"assetIds\": [\"10520954\"], \"assetClass\": \"UNIVERSAL_CASE\", \"limit\": 200 }\n  → results[…200], cursor \"638e12816d414169dc5ad755\"\n\nGET  /api/v3/audit?id=638e12816d414169dc5ad755\n  → results[…200], cursor \"627e334a25033713a3cb8887\"\n\nGET  /api/v3/audit?id=627e334a25033713a3cb8887\n  → results[…], cursor absent/null/empty  → stop\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Send the cursor you last received, not one from a previous run. Guard the loop with a maximum iteration count."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"feed-a-governance-dashboard","__idx":30},"children":["Feed a governance dashboard"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The same information is available in the platform under the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Activity"]}," tab. Use this API when you need that data ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["outside"]}," Sprinklr — in a SIEM, a compliance warehouse, or an internal audit tool. If your users are already working in Sprinklr, the Activity tab needs no integration at all."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"best-practices","__idx":31},"children":["Best practices"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Request fields"]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The request field is ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["assetIds"]}," — plural, and an array."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Quote asset IDs as strings."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Batch multiple IDs into one call rather than looping."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Always set ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["limit"]}," explicitly. Maximum is ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["200"]},"; default is ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["50"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["order"]}," accepts ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ASC"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["DESC"]}," and defaults to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["DESC"]},"."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Asset classes"]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Asset class and asset IDs must correspond — the IDs must belong to the class you name."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Time windows"]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["from"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["upto"]}," are epoch milliseconds, matching ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["auditDate"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Use an overlapping window with de-duplication for incremental ingestion."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Cursors"]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Treat the cursor as opaque. Do not parse, construct, or increment it."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Cursors are single-use and query-scoped. Never mix a cursor from one search into another."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Do not persist cursors across runs; restart the search instead."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Handle absent, ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["null"]},", and empty-string cursors as terminal, and add a max-iteration guard."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Timestamps"]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["auditDate"]}," is epoch ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["milliseconds"]},". Parsing as seconds yields 1970."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Records can be milliseconds apart. ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["auditDate"]}," is not a unique key."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Rate limiting"]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Cursor loops are the most likely trigger for rate limiting. Add backoff and avoid tight paging loops."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Permissions"]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Audit data is governance data. A ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["403"]}," is a permission gap, not a malformed request."]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"related","__idx":32},"children":["Related"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://legacy-dev.sprinklr.com/audit-api"},"children":["Audit API (V2)"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://legacy-dev.sprinklr.com/fetch-audit-details-by-cursor"},"children":["Fetch Audit Details by Cursor (V2)"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://legacy-dev.sprinklr.com/api-overview"},"children":["API Overview"]}]}]}]},"headings":[{"value":"Audit API V3","id":"audit-api-v3","depth":1},{"value":"Asset classes","id":"asset-classes","depth":3},{"value":"Base URL","id":"base-url","depth":2},{"value":"Authentication","id":"authentication","depth":2},{"value":"Required headers","id":"required-headers","depth":3},{"value":"Credential lifetimes","id":"credential-lifetimes","depth":3},{"value":"Search the audit trail","id":"search-the-audit-trail","depth":2},{"value":"Request body parameters","id":"request-body-parameters","depth":3},{"value":"Example request","id":"example-request","depth":3},{"value":"Example response","id":"example-response","depth":3},{"value":"Fetch the next page by cursor","id":"fetch-the-next-page-by-cursor","depth":2},{"value":"Query parameters","id":"query-parameters","depth":3},{"value":"Example request","id":"example-request-1","depth":3},{"value":"Example response","id":"example-response-1","depth":3},{"value":"Response fields","id":"response-fields","depth":2},{"value":"Intepret auditDate","id":"intepret-auditdate","depth":3},{"value":"Intepret changes","id":"intepret-changes","depth":3},{"value":"Pagination","id":"pagination","depth":3},{"value":"Error Responses","id":"error-responses","depth":3},{"value":"Troubleshooting","id":"troubleshooting","depth":3},{"value":"Migrating from V2","id":"migrating-from-v2","depth":2},{"value":"Endpoint mapping","id":"endpoint-mapping","depth":3},{"value":"Field mapping","id":"field-mapping","depth":3},{"value":"Common Use Cases","id":"common-use-cases","depth":2},{"value":"Find who changed a case and when","id":"find-who-changed-a-case-and-when","depth":3},{"value":"Export a full history for a compliance archive","id":"export-a-full-history-for-a-compliance-archive","depth":3},{"value":"Run an incremental nightly sync","id":"run-an-incremental-nightly-sync","depth":3},{"value":"Detect changes to a specific field","id":"detect-changes-to-a-specific-field","depth":3},{"value":"Reconstruct an asset's state at a point in time","id":"reconstruct-an-assets-state-at-a-point-in-time","depth":3},{"value":"Page through a large result set","id":"page-through-a-large-result-set","depth":3},{"value":"Feed a governance dashboard","id":"feed-a-governance-dashboard","depth":3},{"value":"Best practices","id":"best-practices","depth":2},{"value":"Related","id":"related","depth":2}],"frontmatter":{"seo":{"title":"Audit API V3"}},"lastModified":"2026-11-06T09:03:07.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/guides/developer-guides-v3/audit-api-v3","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}