{"items":[{"type":"link","label":"Audience export API","link":"/cdp/audience-export-rest-api","routeSlug":"/cdp/audience-export-rest-api","content":{"contentType":"overview","meta":{"name":"Audience export API"},"children":[{"nodeType":"container","panels":[{"title":"Download OpenAPI description","titleTranslationKey":"download.description.title","children":[{"kind":"download","label":"index.json","url":"/_bundle/cdp/audience-export-rest-api/index.json?download"},{"kind":"download","label":"index.yaml","url":"/_bundle/cdp/audience-export-rest-api/index.yaml?download"}]},{"title":"Overview","titleTranslationKey":"info.title","children":[{"kind":"externallink","title":"License","titleTranslationKey":"info.license","label":"Apache 2.0","url":"https://www.apache.org/licenses/LICENSE-2.0"}]},{"title":"Languages","titleTranslationKey":"languages.title","children":[{"kind":"languages","options":[{"key":"curl","title":"curl","lang":"curl"},{"key":"javascript","title":"JavaScript","lang":"JavaScript"},{"key":"node","title":"Node.js","lang":"Node.js"},{"key":"python","title":"Python","lang":"Python"},{"key":"java","title":"Java","lang":"Java"},{"key":"csharp","title":"C#","lang":"C#"},{"key":"php","title":"PHP","lang":"PHP"},{"key":"go","title":"Go","lang":"Go"},{"key":"ruby","title":"Ruby","lang":"Ruby"},{"key":"r","title":"R","lang":"R"},{"key":"payload","title":"Payload","lang":"Payload"}]}]},{"title":"Servers","titleTranslationKey":"servers.title","children":[{"kind":"servers","servers":[{"url":"https://api-engage-ap.sitecorecloud.io","description":"Production server AP"},{"url":"https://api-engage-eu.sitecorecloud.io","description":"Production server EU"},{"url":"https://api-engage-jpe.sitecorecloud.io","description":"Production server JP"},{"url":"https://api-engage-us.sitecorecloud.io","description":"Production server US"}],"mode":"default"}]}],"children":[{"nodeType":"overview-section-wrapper","children":[{"nodeType":"header","level":1,"label":"Audience export API (v2)","showPageActions":true},{"nodeType":"overview-section-wrapper","children":[{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Use the Audience export REST API to access the output of an "},"children":[]},{"$$mdtype":"Node","type":"link","inline":true,"attributes":{"href":"https://doc.sitecore.com/cdp/en/users/sitecore-cdp/audience-export.html"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"audience export"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" job."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"After an export job finishes running, its "},"children":[]},{"$$mdtype":"Node","type":"link","inline":true,"attributes":{"href":"https://doc.sitecore.com/cdp/en/users/sitecore-cdp/the-output-of-an-export.html"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"output"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" becomes available at presigned URLs. You can download the output of the export job by opening the URLs. The output is available for 35 days after creation."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"You can access output URLs in two ways:"},"children":[]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Retrieve the output URLs for the most recently finished export job."},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"First retrieve a list of all finished export jobs of the export, then retrieve the output URLs for any finished export job of your choice."},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Note the following:"},"children":[]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"To use this REST API, you must authorize your API requests."},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"All API requests are made in your production environment."},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"For more information, see the "},"children":[]},{"$$mdtype":"Node","type":"link","inline":true,"attributes":{"href":"https://doc.sitecore.com/cdp/en/developers/api/index-en.html"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"official Sitecore CDP developer documentation"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]}]}],"sectionId":"/cdp/audience-export-rest-api"}],"sectionId":"/cdp/audience-export-rest-api"},{"nodeType":"overview-section-wrapper","children":[{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"heading","attributes":{"level":1,"id":"section/authorization"},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Authorization"},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The Audience export REST API uses the OAuth 2.0 standard with JSON web tokens to authorize REST API requests."},"children":[]}]}]}]}],"sectionId":"/cdp/audience-export-rest-api/section/authorization"},{"nodeType":"overview-section-wrapper","children":[{"nodeType":"overview-section-wrapper","children":[{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"heading","attributes":{"level":3,"id":"section/authorization/create-an-api-key"},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Create an API key"},"children":[]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":true,"marker":"."},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"In the Sitecore Cloud Portal, open Sitecore CDP."},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Click "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Developer center"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" > "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"API keys"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" > "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Create"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Name your API key and select a feature. Then, click "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Save"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":". The API key and the API secret display."},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Copy the API key and the API secret because you won't be able to view them again in Sitecore CDP. You'll use them to request an access token."},"children":[]}]}]}]}]}],"sectionId":"/cdp/audience-export-rest-api/section/authorization/create-an-api-key"}],"sectionId":"/cdp/audience-export-rest-api/section/authorization/create-an-api-key"},{"nodeType":"overview-section-wrapper","children":[{"nodeType":"overview-section-wrapper","children":[{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"heading","attributes":{"level":3,"id":"section/authorization/request-an-access-token"},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Request an access token"},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Run the following cURL command to request an access token. Replace the placeholder values with your API key and API secret."},"children":[]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"  curl -X POST 'https://auth.sitecorecloud.io/oauth/token' \\\n  --header 'Content-Type: application/x-www-form-urlencoded' \\\n  --data-urlencode 'client_id={YOUR_API_KEY}' \\\n  --data-urlencode 'client_secret={YOUR_API_SECRET}' \\\n  --data-urlencode 'grant_type=client_credentials' \\\n  --data-urlencode 'audience=https://api.sitecorecloud.io'\n","language":"curl"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"  curl -X POST 'https://auth.sitecorecloud.io/oauth/token' \\\n  --header 'Content-Type: application/x-www-form-urlencoded' \\\n  --data-urlencode 'client_id={YOUR_API_KEY}' \\\n  --data-urlencode 'client_secret={YOUR_API_SECRET}' \\\n  --data-urlencode 'grant_type=client_credentials' \\\n  --data-urlencode 'audience=https://api.sitecorecloud.io'\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"In the response, the "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"access_token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" key contains the access token:"},"children":[]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"  {\n    \"access_token\": \"{YOUR_ACCESS_TOKEN}\",\n    \"scope\": \"cdp.audience_exports:r\",\n    \"expires_in\": 86400,\n    \"token_type\": \"Bearer\"\n  }\n","language":"json"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"  {\n    \"access_token\": \"{YOUR_ACCESS_TOKEN}\",\n    \"scope\": \"cdp.audience_exports:r\",\n    \"expires_in\": 86400,\n    \"token_type\": \"Bearer\"\n  }\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Access tokens expire in 24 hours. If your requests unexpectedly return a response with status "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"401 Unauthorized"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", request a new access token by repeating this "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"POST"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" request."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"We recommend that you cache the access token for 24 hours to avoid repeating this "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"POST"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" request while the access token is still valid."},"children":[]}]}]}]}],"sectionId":"/cdp/audience-export-rest-api/section/authorization/request-an-access-token"}],"sectionId":"/cdp/audience-export-rest-api/section/authorization/request-an-access-token"},{"nodeType":"overview-section-wrapper","children":[{"nodeType":"overview-section-wrapper","children":[{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"heading","attributes":{"level":3,"id":"section/authorization/include-the-access-token-in-the-request-header"},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Include the access token in the request header"},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"You can now start making REST API requests. You must include the access token in the request header of every request. For example:"},"children":[]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl -X GET '{YOUR_BASE_URL}/v2/...' \\\n-H 'Authorization: Bearer {YOUR_ACCESS_TOKEN}' \\\n-H 'Accept: application/json'\n","language":"curl"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl -X GET '{YOUR_BASE_URL}/v2/...' \\\n-H 'Authorization: Bearer {YOUR_ACCESS_TOKEN}' \\\n-H 'Accept: application/json'\n"},"children":[]}]}]}],"sectionId":"/cdp/audience-export-rest-api/section/authorization/include-the-access-token-in-the-request-header"}],"sectionId":"/cdp/audience-export-rest-api/section/authorization/include-the-access-token-in-the-request-header"}]}]}},{"type":"group","label":"Authorization","link":"/cdp/audience-export-rest-api/section/authorization","routeSlug":"/cdp/audience-export-rest-api/section/authorization","items":[{"type":"link","label":"Create an API key","link":"/cdp/audience-export-rest-api/section/authorization/create-an-api-key","routeSlug":"/cdp/audience-export-rest-api/section/authorization/create-an-api-key","content":null},{"type":"link","label":"Request an access token","link":"/cdp/audience-export-rest-api/section/authorization/request-an-access-token","routeSlug":"/cdp/audience-export-rest-api/section/authorization/request-an-access-token","content":null},{"type":"link","label":"Include the access token in the request header","link":"/cdp/audience-export-rest-api/section/authorization/include-the-access-token-in-the-request-header","routeSlug":"/cdp/audience-export-rest-api/section/authorization/include-the-access-token-in-the-request-header","content":null}],"content":null},{"type":"group","label":"Most recent export job","link":"/cdp/audience-export-rest-api/most-recent-export-job","routeSlug":"/cdp/audience-export-rest-api/most-recent-export-job","items":[{"label":"Retrieve output URLs for the most recent export job","deprecated":false,"httpVerb":"get","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/cdp/audience-export-rest-api/most-recent-export-job/retrieveurlsofmostrecentexportjob","routeSlug":"/cdp/audience-export-rest-api/most-recent-export-job/retrieveurlsofmostrecentexportjob","metadata":{"seo":{"title":"Retrieve output URLs for the most recent export job","description":"Retrieves the presigned URLs where you can download the outputs of the most recently finished export job."}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"RetrieveURLsOfMostRecentExportJob","name":"Retrieve output URLs for the most recent export job","isWebhook":false,"pointer":"/paths/~1v2~1audienceExports~1definitions~1{audienceExportRef}~1latestExport/get","hasSamples":false},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Retrieve output URLs for the most recent export job","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Retrieves the presigned URLs where you can download the outputs of the most recently finished export job."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"In the response, in every object in the "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"exports"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" array, the "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"url"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" key contains the output URL."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The URLs expire after a limited time. In the response, the "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"expireAt"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" key contains the expiration time. If you don't download the output before the URLs expire, you have to repeat this request to renew the URLs."},"children":[]}]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"BearerToken","scopes":[],"type":"http","scheme":"bearer","bearerFormat":"JWT"}]}]},{"nodeType":"item-content","variant":"path","label":"Path","labelTranslationKey":"path","parameters":[{"name":"audienceExportRef","in":"path","schemaId":"schema_836","required":true}],"pointer":"/paths/~1v2~1audienceExports~1definitions~1{audienceExportRef}~1latestExport/get/parameters"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"GET","path":"/v2/audienceExports/definitions/{audienceExportRef}/latestExport","servers":[{"url":"https://api-engage-ap.sitecorecloud.io","description":"Production server AP"},{"url":"https://api-engage-eu.sitecorecloud.io","description":"Production server EU"},{"url":"https://api-engage-jpe.sitecorecloud.io","description":"Production server JP"},{"url":"https://api-engage-us.sitecorecloud.io","description":"Production server US"}],"parameters":{"path":[{"name":"audienceExportRef","in":"path","required":true,"example":"daily_loyalty_members","schemaId":"schema_836"}],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BearerToken","type":"http","scheme":"bearer","bearerFormat":"JWT"}],"scopes":[]}],"responseCodes":["200","401"],"pointer":"/v2/audienceExports/definitions/{audienceExportRef}/latestExport","href":"most-recent-export-job/retrieveurlsofmostrecentexportjob","openApiOperationId":"RetrieveURLsOfMostRecentExportJob","summary":"Retrieve output URLs for the most recent export job"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"https://api-engage-ap.sitecorecloud.io","description":"Production server AP"},{"url":"https://api-engage-eu.sitecorecloud.io","description":"Production server EU"},{"url":"https://api-engage-jpe.sitecorecloud.io","description":"Production server JP"},{"url":"https://api-engage-us.sitecorecloud.io","description":"Production server US"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Successful operation","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ExportFileListingName"}},"schemaId":"components/schemas/ExportFileListingName"},{"code":"401","description":"Unauthorized request","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/UnauthorizedResponse"}},"schemaId":"components/schemas/UnauthorizedResponse"}],"pointer":"/paths/~1v2~1audienceExports~1definitions~1{audienceExportRef}~1latestExport/get/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"200","schemaId":"components/schemas/ExportFileListingName","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ExportFileListingName"}}},{"code":"401","schemaId":"components/schemas/UnauthorizedResponse","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/UnauthorizedResponse"}}}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/most-recent-export-job/retrieveurlsofmostrecentexportjob"}],"panels":[]}]},"httpPath":"/v2/audienceExports/definitions/{audienceExportRef}/latestExport"}],"content":{"contentType":"group","meta":{"name":"Most recent export job"},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Most recent export job","showPageActions":true},{"nodeType":"markdoc","content":"Access output URLs for the most recently finished export job."}],"panels":[{"children":[{"kind":"group-items","title":"Operations","titleTranslationKey":"operations","items":[{"title":"/v2/audienceExports/definitions/{audienceExportRef}/latestExport","summary":"Retrieve output URLs for the most recent export job","prefix":{"name":"get","color":"get"},"badges":[],"link":"/most-recent-export-job/retrieveurlsofmostrecentexportjob","deprecated":false}]}]}]}]}},{"type":"group","label":"Any export job","link":"/cdp/audience-export-rest-api/any-export-job","routeSlug":"/cdp/audience-export-rest-api/any-export-job","items":[{"label":"Retrieve a list of all finished export jobs","deprecated":false,"httpVerb":"get","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/cdp/audience-export-rest-api/any-export-job/retrievefinishedexportjobs","routeSlug":"/cdp/audience-export-rest-api/any-export-job/retrievefinishedexportjobs","metadata":{"seo":{"title":"Retrieve a list of all finished export jobs","description":"Retrieves a list of all finished export jobs of an audience export."}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"RetrieveFinishedExportJobs","name":"Retrieve a list of all finished export jobs","isWebhook":false,"pointer":"/paths/~1v2~1audienceExports~1definitions~1{audienceExportRef}~1reports/get","hasSamples":false},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Retrieve a list of all finished export jobs","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Retrieves a list of all finished export jobs of an audience export."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"In the response, in every object in the array, the "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"executionRef"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" key contains the export job reference. You use the export job reference to retrieve the output URLs for that specific export job."},"children":[]}]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"BearerToken","scopes":[],"type":"http","scheme":"bearer","bearerFormat":"JWT"}]}]},{"nodeType":"item-content","variant":"path","label":"Path","labelTranslationKey":"path","parameters":[{"name":"audienceExportRef","in":"path","schemaId":"schema_837","required":true}],"pointer":"/paths/~1v2~1audienceExports~1definitions~1{audienceExportRef}~1reports/get/parameters"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"GET","path":"/v2/audienceExports/definitions/{audienceExportRef}/reports","servers":[{"url":"https://api-engage-ap.sitecorecloud.io","description":"Production server AP"},{"url":"https://api-engage-eu.sitecorecloud.io","description":"Production server EU"},{"url":"https://api-engage-jpe.sitecorecloud.io","description":"Production server JP"},{"url":"https://api-engage-us.sitecorecloud.io","description":"Production server US"}],"parameters":{"path":[{"name":"audienceExportRef","in":"path","required":true,"example":"daily_loyalty_members","schemaId":"schema_837"}],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BearerToken","type":"http","scheme":"bearer","bearerFormat":"JWT"}],"scopes":[]}],"responseCodes":["200","401"],"pointer":"/v2/audienceExports/definitions/{audienceExportRef}/reports","href":"any-export-job/retrievefinishedexportjobs","openApiOperationId":"RetrieveFinishedExportJobs","summary":"Retrieve a list of all finished export jobs"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"https://api-engage-ap.sitecorecloud.io","description":"Production server AP"},{"url":"https://api-engage-eu.sitecorecloud.io","description":"Production server EU"},{"url":"https://api-engage-jpe.sitecorecloud.io","description":"Production server JP"},{"url":"https://api-engage-us.sitecorecloud.io","description":"Production server US"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Successful operation","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_838"}},"schemaId":"schema_838"},{"code":"401","description":"Unauthorized request","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/UnauthorizedResponse"}},"schemaId":"components/schemas/UnauthorizedResponse"}],"pointer":"/paths/~1v2~1audienceExports~1definitions~1{audienceExportRef}~1reports/get/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"200","schemaId":"schema_838","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_838"}}},{"code":"401","schemaId":"components/schemas/UnauthorizedResponse","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/UnauthorizedResponse"}}}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/any-export-job/retrievefinishedexportjobs"}],"panels":[]}]},"httpPath":"/v2/audienceExports/definitions/{audienceExportRef}/reports"},{"label":"Retrieve output URLs for a specific export job","deprecated":false,"httpVerb":"get","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/cdp/audience-export-rest-api/any-export-job/retrieveurlsofspecificexportjob","routeSlug":"/cdp/audience-export-rest-api/any-export-job/retrieveurlsofspecificexportjob","metadata":{"seo":{"title":"Retrieve output URLs for a specific export job","description":"Retrieves the presigned URLs where you can download the outputs of the export job of your choice."}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"RetrieveURLsOfSpecificExportJob","name":"Retrieve output URLs for a specific export job","isWebhook":false,"pointer":"/paths/~1v2~1audienceExports~1executions~1{jobExecutionRef}~1export/get","hasSamples":false},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Retrieve output URLs for a specific export job","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Retrieves the presigned URLs where you can download the outputs of the export job of your choice."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"In the response, in every object in the "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"exports"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" array, the "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"url"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" key contains the output URL."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The URLs expire after a limited time. In the response, the "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"expireAt"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" key contains the expiration time. If you don't download the output before the URLs expire, you have to repeat this request to renew the URLs."},"children":[]}]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"BearerToken","scopes":[],"type":"http","scheme":"bearer","bearerFormat":"JWT"}]}]},{"nodeType":"item-content","variant":"path","label":"Path","labelTranslationKey":"path","parameters":[{"name":"jobExecutionRef","in":"path","schemaId":"schema_839","required":true}],"pointer":"/paths/~1v2~1audienceExports~1executions~1{jobExecutionRef}~1export/get/parameters"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"GET","path":"/v2/audienceExports/executions/{jobExecutionRef}/export","servers":[{"url":"https://api-engage-ap.sitecorecloud.io","description":"Production server AP"},{"url":"https://api-engage-eu.sitecorecloud.io","description":"Production server EU"},{"url":"https://api-engage-jpe.sitecorecloud.io","description":"Production server JP"},{"url":"https://api-engage-us.sitecorecloud.io","description":"Production server US"}],"parameters":{"path":[{"name":"jobExecutionRef","in":"path","required":true,"example":"fe351e84-3504-4668-8e5f-574d320b9679","schemaId":"schema_839"}],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BearerToken","type":"http","scheme":"bearer","bearerFormat":"JWT"}],"scopes":[]}],"responseCodes":["200","400","401"],"pointer":"/v2/audienceExports/executions/{jobExecutionRef}/export","href":"any-export-job/retrieveurlsofspecificexportjob","openApiOperationId":"RetrieveURLsOfSpecificExportJob","summary":"Retrieve output URLs for a specific export job"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"https://api-engage-ap.sitecorecloud.io","description":"Production server AP"},{"url":"https://api-engage-eu.sitecorecloud.io","description":"Production server EU"},{"url":"https://api-engage-jpe.sitecorecloud.io","description":"Production server JP"},{"url":"https://api-engage-us.sitecorecloud.io","description":"Production server US"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Successful operation","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ExportFileListingName"}},"schemaId":"components/schemas/ExportFileListingName"},{"code":"400","description":"Bad request","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/BadRequestResponse"}},"schemaId":"components/schemas/BadRequestResponse"},{"code":"401","description":"Unauthorized request","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/UnauthorizedResponse"}},"schemaId":"components/schemas/UnauthorizedResponse"}],"pointer":"/paths/~1v2~1audienceExports~1executions~1{jobExecutionRef}~1export/get/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"200","schemaId":"components/schemas/ExportFileListingName","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ExportFileListingName"}}},{"code":"400","schemaId":"components/schemas/BadRequestResponse","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/BadRequestResponse"}}},{"code":"401","schemaId":"components/schemas/UnauthorizedResponse","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/UnauthorizedResponse"}}}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/any-export-job/retrieveurlsofspecificexportjob"}],"panels":[]}]},"httpPath":"/v2/audienceExports/executions/{jobExecutionRef}/export"}],"content":{"contentType":"group","meta":{"name":"Any export job"},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Any export job","showPageActions":true},{"nodeType":"markdoc","content":"You can access output URLs for any finished export job by making two API requests. First retrieve a list of all finished export jobs of an audience export, then retrieve the output URLs for the finished export job of your choice."}],"panels":[{"children":[{"kind":"group-items","title":"Operations","titleTranslationKey":"operations","items":[{"title":"/v2/audienceExports/definitions/{audienceExportRef}/reports","summary":"Retrieve a list of all finished export jobs","prefix":{"name":"get","color":"get"},"badges":[],"link":"/any-export-job/retrievefinishedexportjobs","deprecated":false},{"title":"/v2/audienceExports/executions/{jobExecutionRef}/export","summary":"Retrieve output URLs for a specific export job","prefix":{"name":"get","color":"get"},"badges":[],"link":"/any-export-job/retrieveurlsofspecificexportjob","deprecated":false}]}]}]}]}}],"store":{"schemaStore":{"components/schemas/ExecutionReportName":{"id":"components/schemas/ExecutionReportName","kind":"json-schema","title":"ExecutionReportName","data":{"type":"object","properties":{"clientKey":{"type":"string","description":"Your organization's unique and public identifier.","example":"pqsPERS3lw12v5a9rrHPW1c4hET73GxQ"},"executionRef":{"type":"string","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The export job reference."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Use this as the "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"jobExecutionRef"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" path parameter when you retrieve output URLs for a specific export job."},"children":[]}]}]}],"format":"uuid","example":"fe351e84-3504-4668-8e5f-574d320b9679"},"definitionRef":{"type":"string","description":"The UUID reference of the audience export.","format":"uuid","example":"d6c5335a-4028-49c0-8d55-a534e89127c9"},"friendlyId":{"type":"string","description":"The unique ID of the audience export.\n\nOnly lowercase alphanumeric characters and underscores are allowed.","example":"daily_loyalty_members"},"executionType":{"type":"string","description":"Whether the audience export runs instantly or on a schedule.","example":"INSTANT_RUN","enum":["INSTANT_RUN","SCHEDULED"]},"status":{"type":"string","description":"The status of the export job.","example":"SUCCESS","enum":["PENDING_GUEST_CONTEXT","PENDING_SEGMENTATION","PENDING_EMR_SUBMIT","PENDING_EMR_JOB","SUCCESS","FAILED","ALERT"]},"definitionType":{"type":"string","description":"Whether the audience export is a full or a delta export.","example":"FULL_SYNC","enum":["DELTA","FULL_SYNC"]},"segmentExecutionType":{"type":"string","description":"Whether the segment in the audience export is scheduled or live.","example":"LIVE","enum":["ON_DEMAND","LIVE"]},"total":{"type":"integer","description":"The number of guests in the segment selected for the export.","format":"int32","example":101308},"filterMatchedGuests":{"type":"integer","description":"The number of guests matched by the filter. These guests are included in the export. If no filter was used, the value is 0.","format":"int32","example":97466},"filterNotMatchedGuests":{"type":"integer","description":"The number of guests not matched by the filter. These guests are excluded from the export. If no filter was used, the value is 0.","format":"int32","example":3842},"filterFailures":{"type":"integer","description":"The number of guests that filtering failed for. If no filter was used, the value is 0.","format":"int32","example":16},"successes":{"type":"integer","description":"The number of guests the export succeeded for.","format":"int32","example":97466},"failures":{"type":"integer","description":"The number of guests the export failed for.","format":"int32","example":0},"programmableErrors":{"type":"array","description":"A list of errors related to the JavaScript in the export and the attribute values in the output structure.","items":{"$ref":"#/components/schemas/Errors"}},"filterErrors":{"type":"array","description":"A list of errors related to conditions, for example, errors with the JavaScript in a condition.","items":{"$ref":"#/components/schemas/Errors"}},"errorLogs":{"type":"array","description":"A list of all errors.","example":"[TypeError: Cannot read property 'length' of undefined]","items":{"type":"string","description":"A list of all errors.","example":"[TypeError: Cannot read property 'length' of undefined]"}},"datasetDate":{"type":"string","description":"The date the export job started running.","example":"2024/10/16"},"startTime":{"type":"string","description":"The UTC time the export job started running.","format":"date-time","example":"2024-10-16T06:00:01.122Z"},"endTime":{"type":"string","description":"The UTC time the export job finished running.","format":"date-time","example":"2024-10-16T06:40:45.794Z"},"successAdd":{"type":"integer","description":"Guests added to the segment after the export job ran. This attribute is only present in delta exports.","format":"int32","example":0},"successRemove":{"type":"integer","description":"Guests removed from the segment after the export job ran. This attribute is only present in delta exports.","format":"int32","example":0}},"description":"ExecutionReportDescription"}},"components/schemas/Errors":{"id":"components/schemas/Errors","kind":"json-schema","title":"Errors","data":{"type":"object","properties":{"description":{"type":"string","description":"Error description.","example":"TypeError: Cannot read property 'length' of undefined"},"count":{"type":"integer","description":"The number of times this error occurred.","format":"int32","example":16}},"description":"A list of errors."}},"components/schemas/BadRequestResponse":{"id":"components/schemas/BadRequestResponse","kind":"json-schema","title":"BadRequestResponse","data":{"type":"object","properties":{"status":{"type":"integer","description":"The HTTP request status.","format":"int32","example":400},"code":{"type":"integer","description":"The HTTP response status code.","format":"int32","example":400},"message":{"type":"string","description":"Error description.","example":"Bad request."},"developerMessage":{"type":"string","description":"Error description for developers.","example":"Attribute path param ref not a valid UUID."},"moreInfoUrl":{"type":"string","description":"URL to get more information about the error.","example":"Contact Sitecore support here: https://support.sitecore.com"}}}},"components/schemas/UnauthorizedResponse":{"id":"components/schemas/UnauthorizedResponse","kind":"json-schema","title":"UnauthorizedResponse","data":{"type":"object","properties":{"status":{"type":"string","description":"The HTTP request status.","format":"uppercase","example":"UNAUTHORIZED"},"code":{"type":"integer","description":"The HTTP response status code.","format":"int32","example":401},"message":{"type":"string","description":"Error description.","example":"Authentication credentials are required to access the resource. All requests must be authenticated."},"moreInfoUrl":{"type":"string","description":"URL to get more information about the error.","example":"Contact Sitecore support here: https://support.sitecore.com"}}}},"components/schemas/ExportFileListingName":{"id":"components/schemas/ExportFileListingName","kind":"json-schema","title":"ExportFileListingName","data":{"type":"object","properties":{"executionRef":{"type":"string","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The export job reference."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Use this as the "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"jobExecutionRef"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" path parameter when you retrieve output URLs for a specific export job."},"children":[]}]}]}],"format":"uuid","example":"fe351e84-3504-4668-8e5f-574d320b9679"},"definitionRef":{"type":"string","description":"The UUID reference of the audience export.","format":"uuid","example":"d6c5335a-4028-49c0-8d55-a534e89127c9"},"friendlyId":{"type":"string","description":"The unique ID of the audience export.\n\nOnly lowercase alphanumeric characters and underscores are allowed.","example":"daily_loyalty_members"},"clientKey":{"type":"string","description":"Your organization's unique and public identifier.","example":"pqsPERS3lw12v5a9rrHPW1c4hET73GxQ"},"expireAt":{"type":"string","description":"The UTC date and time the output URLs expire.","format":"date-time","example":"2024-11-05T12:08:00.145Z"},"numberOfFiles":{"type":"integer","description":"The total number of files included in the output.","format":"int32","example":2},"totalSizeKB":{"type":"integer","description":"The total size of all the output files in kilobytes.","format":"int64","example":54},"exports":{"type":"array","description":"A list of all the presigned output URLs for the export job.","items":{"$ref":"#/components/schemas/exports"}}},"description":"ExportFileListing"}},"components/schemas/exports":{"id":"components/schemas/exports","kind":"json-schema","title":"exports","data":{"type":"object","properties":{"url":{"type":"string","description":"The presigned output URL for the export job.","example":"https://sitecore-cdp-..."},"sizeKB":{"type":"integer","description":"The size of the output file in kilobytes.","format":"int64","example":52},"deltaAction":{"type":"string","description":"Whether the presigned output URL of a delta export contains the added guests or the removed guests.\n\nThis attribute is only present in delta exports.","example":"add","enum":["add","remove"]}},"description":"A list of all the presigned output URLs for the export job."}},"schema_836":{"kind":"json-schema","data":{"type":"string","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The audience export reference."},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Set this value either to the friendly ID or the UUID reference of the audience export."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"To find these values in Sitecore CDP, click "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Audience export"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" > "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Audience export"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", then the export you want to work with. The friendly ID is on the "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Details"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" pane. The UUID reference is a 36-character string in the web browser's address bar, starting after "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"audience-export/"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Example friendly ID: "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"daily_loyalty_members"},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Example UUID reference: "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"d6c5335a-4028-49c0-8d55-a534e89127c9"},"children":[]}]}]}],"example":"daily_loyalty_members"},"id":"schema_836"},"schema_837":{"kind":"json-schema","data":{"type":"string","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The audience export reference."},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Set this value either to the friendly ID or the UUID reference of the audience export."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"To find these values in Sitecore CDP, click "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Audience export"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" > "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Audience export"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", then the export you want to work with. The friendly ID is on the "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Details"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" pane. The UUID reference is a 36-character string in the web browser's address bar, starting after "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"audience-export/"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Example friendly ID: "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"daily_loyalty_members"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Example UUID reference: "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"d6c5335a-4028-49c0-8d55-a534e89127c9"},"children":[]}]}]}],"example":"daily_loyalty_members"},"id":"schema_837"},"schema_838":{"kind":"json-schema","data":{"type":"array","items":{"$ref":"#/components/schemas/ExecutionReportName"}},"id":"schema_838"},"schema_839":{"kind":"json-schema","data":{"type":"string","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The export job reference."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"If you don't know the export job reference, first retrieve a list of all finished export jobs. In the response, the "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"executionRef"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" key contains the export job reference."},"children":[]}]}]}],"example":"fe351e84-3504-4668-8e5f-574d320b9679"},"id":"schema_839"}},"exampleStore":{},"securitySchemeStore":{"BearerToken":{"id":"BearerToken","type":"http","scheme":"bearer","bearerFormat":"JWT"}},"servers":[{"url":"https://api-engage-ap.sitecorecloud.io","description":"Production server AP"},{"url":"https://api-engage-eu.sitecorecloud.io","description":"Production server EU"},{"url":"https://api-engage-jpe.sitecorecloud.io","description":"Production server JP"},{"url":"https://api-engage-us.sitecorecloud.io","description":"Production server US"}],"specType":"openapi"},"options":{"hideInfoMetadata":true,"sanitize":true,"sortRequiredPropsFirst":true,"corsProxyUrl":"https://cors.redoc.ly","mockServer":{"off":true,"position":"off"},"disableRouter":true,"downloadUrls":[{"url":"/_bundle/cdp/audience-export-rest-api/index.json?download"},{"url":"/_bundle/cdp/audience-export-rest-api/index.yaml?download"}],"excludeFromSearch":false,"replayFeatures":{"graphql":false},"specType":"openapi","markdocOptions":{"tags":{},"nodes":{},"components":{}},"metadata":{"title":"Audience export API","description":"Use the Audience export REST API to access the output of an [audience export](https://doc.sitecore.com/cdp/en/users/sitecore-cdp/audience-export.html) job.\n\nAfter an export job finishes running, its [output](https://doc.sitecore.com/cdp/en/users/sitecore-cdp/the-output-of-an-export.html) becomes available at presigned URLs. You can download the output of the export job by opening the URLs. The output is available for 35 days after creation.\n \n\nYou can access output URLs in two ways:\n   - Retrieve the output URLs for the most recently finished export job.\n   - First retrieve a list of all finished export jobs of the export, then retrieve the output URLs for any finished export job of your choice.\n\nNote the following:\n   - To use this REST API, you must authorize your API requests.\n   - All API requests are made in your production environment. \n\n For more information, see the [official Sitecore CDP developer documentation](https://doc.sitecore.com/cdp/en/developers/api/index-en.html).\n\n# Authorization\nThe Audience export REST API uses the OAuth 2.0 standard with JSON web tokens to authorize REST API requests.\n### Create an API key\n  1. In the Sitecore Cloud Portal, open Sitecore CDP.\n  2. Click **Developer center** > **API keys** > **Create**.\n  3. Name your API key and select a feature. Then, click **Save**. The API key and the API secret display.\n  4. Copy the API key and the API secret because you won't be able to view them again in Sitecore CDP. You'll use them to request an access token.\n\n### Request an access token\nRun the following cURL command to request an access token. Replace the placeholder values with your API key and API secret.\n```curl\n  curl -X POST 'https://auth.sitecorecloud.io/oauth/token' \\\n  --header 'Content-Type: application/x-www-form-urlencoded' \\\n  --data-urlencode 'client_id={YOUR_API_KEY}' \\\n  --data-urlencode 'client_secret={YOUR_API_SECRET}' \\\n  --data-urlencode 'grant_type=client_credentials' \\\n  --data-urlencode 'audience=https://api.sitecorecloud.io'\n```\nIn the response, the `access_token` key contains the access token:\n```json\n  {\n    \"access_token\": \"{YOUR_ACCESS_TOKEN}\",\n    \"scope\": \"cdp.audience_exports:r\",\n    \"expires_in\": 86400,\n    \"token_type\": \"Bearer\"\n  }\n```\nAccess tokens expire in 24 hours. If your requests unexpectedly return a response with status `401 Unauthorized`, request a new access token by repeating this `POST` request.\n\nWe recommend that you cache the access token for 24 hours to avoid repeating this `POST` request while the access token is still valid.\n### Include the access token in the request header\nYou can now start making REST API requests. You must include the access token in the request header of every request. For example:\n\n  ```curl\n  curl -X GET '{YOUR_BASE_URL}/v2/...' \\\n  -H 'Authorization: Bearer {YOUR_ACCESS_TOKEN}' \\\n  -H 'Accept: application/json'\n  ```\n","product":"CDP"}},"baseSlug":"/cdp/audience-export-rest-api","routesMapping":{}}