{"items":[{"type":"link","label":"Token API","link":"/sai/token-api","routeSlug":"/sai/token-api","content":{"contentType":"overview","meta":{"name":"Token API"},"children":[{"nodeType":"container","panels":[{"title":"Download OpenAPI description","titleTranslationKey":"download.description.title","children":[{"kind":"download","label":"index.json","url":"/_bundle/sai/token-api/index.json?download"},{"kind":"download","label":"index.yaml","url":"/_bundle/sai/token-api/index.yaml?download"}]},{"title":"Overview","titleTranslationKey":"info.title","children":[{"kind":"externallink","title":"License","titleTranslationKey":"info.license","label":"closed source","url":"https://www.sitecore.com"}]},{"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://cs-tokenapi.sitecorecloud.io"}],"mode":"default"}]}],"children":[{"nodeType":"overview-section-wrapper","children":[{"nodeType":"header","level":1,"label":"Token API (v2.0)","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 XM Cloud Content Token API to manage query tokens for the GraphQL Query API. By setting an expiration date and applying restrictions, such as making the token valid only for a particular IP address or publish state, you can control how content is queried. "},"children":[]},{"$$mdtype":"Node","type":"tag","tag":"html","inline":true,"attributes":{"name":"br","attrs":{}},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" "},"children":[]},{"$$mdtype":"Node","type":"tag","tag":"html","inline":true,"attributes":{"name":"br","attrs":{}},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" The "},"children":[]},{"$$mdtype":"Node","type":"tag","tag":"html","inline":true,"attributes":{"name":"b","attrs":{}},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Try it"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" functionality available from the API documentation lets you explore API endpoints and make calls directly from the documentation."},"children":[]}]}]}]}],"sectionId":"/sai/token-api"}],"sectionId":"/sai/token-api"},{"nodeType":"overview-section-wrapper","children":[{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"heading","attributes":{"level":2,"id":"section/authentication"},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Authentication"},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"To use this API, you need:"},"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":"The URL of your XM Cloud Content server."},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"A JWT bearer token requested using the "},"children":[]},{"$$mdtype":"Node","type":"link","inline":true,"attributes":{"href":"https://doc.sitecore.com/xmc/en/developers/xm-cloud/request-a-jwt-for-experience-edge.html"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"OAuth Client Credentials flow"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":". This is sent with every request."},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"tag","tag":"admonition","inline":true,"attributes":{"type":"info","name":"Note"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The token must include a scope. Which scope to use depends on the endpoint being called. For mutation operations, such as "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"create"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"update"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", and "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"delete"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", include the "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"cs:all:admin"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" scope. To read existing tokens, include the "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"cs.all:editor"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" scope. "},"children":[]}]}]}]}]}],"sectionId":"/sai/token-api/section/authentication"}]}]}},{"type":"link","label":"Authentication","link":"/sai/token-api/section/authentication","routeSlug":"/sai/token-api/section/authentication","content":null},{"type":"group","label":"Token","link":"/sai/token-api/token","routeSlug":"/sai/token-api/token","items":[{"label":"Create a token","deprecated":false,"httpVerb":"post","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/sai/token-api/token/createtoken","routeSlug":"/sai/token-api/token/createtoken","metadata":{"seo":{"title":"Create a token","description":"Creates a query token. The scope and permissions of the token are specified through the request TokenParameters object that includes a required label and expiration date and time (such as \"expiration\": \"2025-01-15T15:30:00Z\"), an optional description, along with other restrictions, such as:"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"CreateToken","name":"Create a token","isWebhook":false,"pointer":"/paths/~1api~1token~1v2/post","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Create a token","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":"Creates a query token. The scope and permissions of the token are specified through the request "},"children":[]},{"$$mdtype":"Node","type":"tag","tag":"html","inline":true,"attributes":{"name":"i","attrs":{}},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"TokenParameters"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" object that includes a required label and expiration date and time (such as "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"\"expiration\": \"2025-01-15T15:30:00Z\""},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"), an optional description, along with other restrictions, such as:"},"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":"tag","tag":"html","inline":true,"attributes":{"name":"b","attrs":{}},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Publish State"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"  - the publish state the token is restricted to (either "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"Preview, Published, or both"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"), for example, "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"\"publishState\": [\"Published\"]"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":". This property can be empty, but cannot be "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"Unknown"},"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":"tag","tag":"html","inline":true,"attributes":{"name":"b","attrs":{}},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Branches"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" - the name of the branches that token access is restricted to, for example, "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"\"branches\": \"main, dev, release/*\"]"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":". For a prefix match, use "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/*"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":". This property can be empty."},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"tag","tag":"html","inline":true,"attributes":{"name":"b","attrs":{}},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Source IPs"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" - the source IP addresses that token access is restricted to, for example, "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"\"sourceIPs\": [\"192.168.20.101\"]"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":". This property can be empty."},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"tag","tag":"html","inline":true,"attributes":{"name":"b","attrs":{}},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Origins"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" - the origins that the token access is restricted to. This is a "},"children":[]},{"$$mdtype":"Node","type":"tag","tag":"html","inline":true,"attributes":{"name":"i","attrs":{}},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"CORS"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" feature and takes effect only when a request includes the "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"Origin"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" header. This property can be empty."},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"tag","tag":"html","inline":true,"attributes":{"name":"b","attrs":{}},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Introspection"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" - whether GraphQL introspection is allowed when using this token. It is recommended that introspection only be enabled for development environments."},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"tag","tag":"admonition","inline":true,"attributes":{"type":"info","name":"Note"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" We recommend an expiration date of one"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"year at the most. You cannot change the expiration date after you create a token"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"without generating a  new token."},"children":[]}]}]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"Bearer","scopes":[],"type":"http","scheme":"Bearer","bearerFormat":"JWT","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"A JSON Web Token (JWT) is sent with every call. To obtain one, you need an "},"children":[]},{"$$mdtype":"Node","type":"link","inline":true,"attributes":{"href":"https://doc.sitecore.com/xmc/en/developers/xm-cloud/generate-an-edge-token.html"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"bearer token and the client ID"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":". You can create a token "},"children":[]},{"$$mdtype":"Node","type":"link","inline":true,"attributes":{"href":"https://doc.sitecore.com/xmc/en/developers/xm-cloud/request-a-jwt-for-experience-edge.html"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"using the Deploy REST API or by requesting one to the API itself"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]}]}]}]},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"components/schemas/TokenParameters"}},"schemaId":"components/schemas/TokenParameters","pointer":"/paths/~1api~1token~1v2/post/requestBody","description":"The token creation parameters details."}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"POST","path":"/api/token/v2","servers":[{"url":"https://cs-tokenapi.sitecorecloud.io"}],"parameters":{"path":[],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"Bearer","type":"http","scheme":"Bearer","bearerFormat":"JWT"}],"scopes":[]}],"requestBody":{"application/json":{"schemaId":"components/schemas/TokenParameters"}},"responseCodes":["201","400","401","403"],"pointer":"/api/token/v2","href":"token/createtoken","openApiOperationId":"CreateToken","summary":"Create a token"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"https://cs-tokenapi.sitecorecloud.io"}],"schemaId":"components/schemas/TokenParameters","mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"components/schemas/TokenParameters"}},"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"201","description":"The token was successfully created. Token details are returned with the token value.","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/CreatedToken"}},"schemaId":"components/schemas/CreatedToken"},{"code":"400","description":"Invalid input in the request body","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/HttpValidationProblemDetails"}},"schemaId":"components/schemas/HttpValidationProblemDetails"},{"code":"401","description":"Invalid bearer token","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ProblemDetails"}},"schemaId":"components/schemas/ProblemDetails"},{"code":"403","description":"Request does not contain required scopes","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ProblemDetails"}},"schemaId":"components/schemas/ProblemDetails"}],"pointer":"/paths/~1api~1token~1v2/post/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"201","schemaId":"components/schemas/CreatedToken","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/CreatedToken"}}},{"code":"400","schemaId":"components/schemas/HttpValidationProblemDetails","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/HttpValidationProblemDetails"}}},{"code":"401","schemaId":"components/schemas/ProblemDetails","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ProblemDetails"}}},{"code":"403","schemaId":"components/schemas/ProblemDetails","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ProblemDetails"}}}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/token/createtoken"}],"panels":[]}]},"httpPath":"/api/token/v2"},{"label":"Retrieve a list of tokens","deprecated":false,"httpVerb":"get","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/sai/token-api/token/gettokens","routeSlug":"/sai/token-api/token/gettokens","metadata":{"seo":{"title":"Retrieve a list of tokens","description":"Lists tokens for a specific tenant."}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"GetTokens","name":"Retrieve a list of tokens","isWebhook":false,"pointer":"/paths/~1api~1token~1v2/get","hasSamples":false},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Retrieve a list of tokens","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":"Lists tokens for a specific tenant."},{"nodeType":"security","requirements":[{"schemes":[{"name":"Bearer","scopes":[],"type":"http","scheme":"Bearer","bearerFormat":"JWT","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"A JSON Web Token (JWT) is sent with every call. To obtain one, you need an "},"children":[]},{"$$mdtype":"Node","type":"link","inline":true,"attributes":{"href":"https://doc.sitecore.com/xmc/en/developers/xm-cloud/generate-an-edge-token.html"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"bearer token and the client ID"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":". You can create a token "},"children":[]},{"$$mdtype":"Node","type":"link","inline":true,"attributes":{"href":"https://doc.sitecore.com/xmc/en/developers/xm-cloud/request-a-jwt-for-experience-edge.html"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"using the Deploy REST API or by requesting one to the API itself"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]}]}]}]},{"nodeType":"item-content","variant":"query","label":"Query","labelTranslationKey":"query","parameters":[{"name":"next","in":"query","schemaId":"schema_1406","description":"The Continuation token"},{"name":"minimumPageSize","in":"query","schemaId":"schema_1407","description":"The page size of the tokens to retrieve."}],"pointer":"/paths/~1api~1token~1v2/get/parameters"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"GET","path":"/api/token/v2","servers":[{"url":"https://cs-tokenapi.sitecorecloud.io"}],"parameters":{"path":[],"query":[{"name":"next","in":"query","schemaId":"schema_1406"},{"name":"minimumPageSize","in":"query","schemaId":"schema_1407"}],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"Bearer","type":"http","scheme":"Bearer","bearerFormat":"JWT"}],"scopes":[]}],"responseCodes":["200","400","401","403"],"pointer":"/api/token/v2","href":"token/gettokens","openApiOperationId":"GetTokens","summary":"Retrieve a list of tokens"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"https://cs-tokenapi.sitecorecloud.io"}],"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/RetrievedTokenCursorPage"}},"schemaId":"components/schemas/RetrievedTokenCursorPage"},{"code":"400","description":"Invalid input, such as a paging parameter that is outside allowed values","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/HttpValidationProblemDetails"}},"schemaId":"components/schemas/HttpValidationProblemDetails"},{"code":"401","description":"Invalid bearer token","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ProblemDetails"}},"schemaId":"components/schemas/ProblemDetails"},{"code":"403","description":"Request does not contain required scopes","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ProblemDetails"}},"schemaId":"components/schemas/ProblemDetails"}],"pointer":"/paths/~1api~1token~1v2/get/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"200","schemaId":"components/schemas/RetrievedTokenCursorPage","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/RetrievedTokenCursorPage"}}},{"code":"400","schemaId":"components/schemas/HttpValidationProblemDetails","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/HttpValidationProblemDetails"}}},{"code":"401","schemaId":"components/schemas/ProblemDetails","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ProblemDetails"}}},{"code":"403","schemaId":"components/schemas/ProblemDetails","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ProblemDetails"}}}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/token/gettokens"}],"panels":[]}]},"httpPath":"/api/token/v2"},{"label":"Retrieve a token using its ID","deprecated":false,"httpVerb":"get","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/sai/token-api/token/gettokenbyid","routeSlug":"/sai/token-api/token/gettokenbyid","metadata":{"seo":{"title":"Retrieve a token using its ID","description":"Retrieves a specific token using its ID."}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"GetTokenById","name":"Retrieve a token using its ID","isWebhook":false,"pointer":"/paths/~1api~1token~1v2~1{id}/get","hasSamples":false},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Retrieve a token using its ID","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":"Retrieves a specific token using its ID."},{"nodeType":"security","requirements":[{"schemes":[{"name":"Bearer","scopes":[],"type":"http","scheme":"Bearer","bearerFormat":"JWT","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"A JSON Web Token (JWT) is sent with every call. To obtain one, you need an "},"children":[]},{"$$mdtype":"Node","type":"link","inline":true,"attributes":{"href":"https://doc.sitecore.com/xmc/en/developers/xm-cloud/generate-an-edge-token.html"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"bearer token and the client ID"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":". You can create a token "},"children":[]},{"$$mdtype":"Node","type":"link","inline":true,"attributes":{"href":"https://doc.sitecore.com/xmc/en/developers/xm-cloud/request-a-jwt-for-experience-edge.html"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"using the Deploy REST API or by requesting one to the API itself"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]}]}]}]},{"nodeType":"item-content","variant":"path","label":"Path","labelTranslationKey":"path","parameters":[{"name":"id","in":"path","schemaId":"schema_1406","description":"The ID of the token to retrieve.","required":true}],"pointer":"/paths/~1api~1token~1v2~1{id}/get/parameters"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"GET","path":"/api/token/v2/{id}","servers":[{"url":"https://cs-tokenapi.sitecorecloud.io"}],"parameters":{"path":[{"name":"id","in":"path","required":true,"schemaId":"schema_1406"}],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"Bearer","type":"http","scheme":"Bearer","bearerFormat":"JWT"}],"scopes":[]}],"responseCodes":["200","400","401","403","404"],"pointer":"/api/token/v2/{id}","href":"token/gettokenbyid","openApiOperationId":"GetTokenById","summary":"Retrieve a token using its ID"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"https://cs-tokenapi.sitecorecloud.io"}],"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. The token is returned without the token value.","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/RetrievedToken"}},"schemaId":"components/schemas/RetrievedToken"},{"code":"400","description":"Invalid input, such as a missing ID in the URL","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/HttpValidationProblemDetails"}},"schemaId":"components/schemas/HttpValidationProblemDetails"},{"code":"401","description":"Invalid bearer token","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ProblemDetails"}},"schemaId":"components/schemas/ProblemDetails"},{"code":"403","description":"Request does not contain required scopes","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ProblemDetails"}},"schemaId":"components/schemas/ProblemDetails"},{"code":"404","description":"Token not found","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ProblemDetails"}},"schemaId":"components/schemas/ProblemDetails"}],"pointer":"/paths/~1api~1token~1v2~1{id}/get/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"200","schemaId":"components/schemas/RetrievedToken","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/RetrievedToken"}}},{"code":"400","schemaId":"components/schemas/HttpValidationProblemDetails","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/HttpValidationProblemDetails"}}},{"code":"401","schemaId":"components/schemas/ProblemDetails","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ProblemDetails"}}},{"code":"403","schemaId":"components/schemas/ProblemDetails","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ProblemDetails"}}},{"code":"404","schemaId":"components/schemas/ProblemDetails","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ProblemDetails"}}}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/token/gettokenbyid"}],"panels":[]}]},"httpPath":"/api/token/v2/{id}"},{"label":"Delete a specific token using its ID","deprecated":false,"httpVerb":"delete","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/sai/token-api/token/deletetokenbyid","routeSlug":"/sai/token-api/token/deletetokenbyid","metadata":{"seo":{"title":"Delete a specific token using its ID","description":"Deletes a specific token using its ID."}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"DeleteTokenById","name":"Delete a specific token using its ID","isWebhook":false,"pointer":"/paths/~1api~1token~1v2~1{id}/delete","hasSamples":false},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Delete a specific token using its ID","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":"Deletes a specific token using its ID."},{"nodeType":"security","requirements":[{"schemes":[{"name":"Bearer","scopes":[],"type":"http","scheme":"Bearer","bearerFormat":"JWT","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"A JSON Web Token (JWT) is sent with every call. To obtain one, you need an "},"children":[]},{"$$mdtype":"Node","type":"link","inline":true,"attributes":{"href":"https://doc.sitecore.com/xmc/en/developers/xm-cloud/generate-an-edge-token.html"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"bearer token and the client ID"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":". You can create a token "},"children":[]},{"$$mdtype":"Node","type":"link","inline":true,"attributes":{"href":"https://doc.sitecore.com/xmc/en/developers/xm-cloud/request-a-jwt-for-experience-edge.html"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"using the Deploy REST API or by requesting one to the API itself"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]}]}]}]},{"nodeType":"item-content","variant":"path","label":"Path","labelTranslationKey":"path","parameters":[{"name":"id","in":"path","schemaId":"schema_1406","description":"The ID of the token to delete.","required":true}],"pointer":"/paths/~1api~1token~1v2~1{id}/delete/parameters"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"DELETE","path":"/api/token/v2/{id}","servers":[{"url":"https://cs-tokenapi.sitecorecloud.io"}],"parameters":{"path":[{"name":"id","in":"path","required":true,"schemaId":"schema_1406"}],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"Bearer","type":"http","scheme":"Bearer","bearerFormat":"JWT"}],"scopes":[]}],"responseCodes":["204","400","401","403","404"],"pointer":"/api/token/v2/{id}","href":"token/deletetokenbyid","openApiOperationId":"DeleteTokenById","summary":"Delete a specific token using its ID"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"https://cs-tokenapi.sitecorecloud.io"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"204","description":"No Content. The token was successfully deleted."},{"code":"400","description":"Invalid input, such as a missing ID in the URL","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/HttpValidationProblemDetails"}},"schemaId":"components/schemas/HttpValidationProblemDetails"},{"code":"401","description":"Invalid bearer token","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ProblemDetails"}},"schemaId":"components/schemas/ProblemDetails"},{"code":"403","description":"Request does not contain required scopes","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ProblemDetails"}},"schemaId":"components/schemas/ProblemDetails"},{"code":"404","description":"Token not found","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ProblemDetails"}},"schemaId":"components/schemas/ProblemDetails"}],"pointer":"/paths/~1api~1token~1v2~1{id}/delete/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"204"},{"code":"400","schemaId":"components/schemas/HttpValidationProblemDetails","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/HttpValidationProblemDetails"}}},{"code":"401","schemaId":"components/schemas/ProblemDetails","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ProblemDetails"}}},{"code":"403","schemaId":"components/schemas/ProblemDetails","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ProblemDetails"}}},{"code":"404","schemaId":"components/schemas/ProblemDetails","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ProblemDetails"}}}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/token/deletetokenbyid"}],"panels":[]}]},"httpPath":"/api/token/v2/{id}"},{"label":"Update a token using its ID","deprecated":false,"httpVerb":"patch","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/sai/token-api/token/updatetokenbyid","routeSlug":"/sai/token-api/token/updatetokenbyid","metadata":{"seo":{"title":"Update a token using its ID","description":"Updates a specific token using its ID. When you update a token, you can omit properties that do not need to be updated. To remove a restriction, you can use null or an empty array.Changing the expiration date generates a new query token."}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"UpdateTokenById","name":"Update a token using its ID","isWebhook":false,"pointer":"/paths/~1api~1token~1v2~1{id}/patch","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Update a token using its ID","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":"Updates a specific token using its ID. When you update a token, you can omit properties that do not need to be updated. To remove a restriction, you can use "},"children":[]},{"$$mdtype":"Node","type":"tag","tag":"html","inline":true,"attributes":{"name":"i","attrs":{}},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"null"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" or an empty array."},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"tag","tag":"admonition","inline":true,"attributes":{"type":"info","name":"Note"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Changing the expiration date generates a new query token."},"children":[]}]}]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"Bearer","scopes":[],"type":"http","scheme":"Bearer","bearerFormat":"JWT","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"A JSON Web Token (JWT) is sent with every call. To obtain one, you need an "},"children":[]},{"$$mdtype":"Node","type":"link","inline":true,"attributes":{"href":"https://doc.sitecore.com/xmc/en/developers/xm-cloud/generate-an-edge-token.html"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"bearer token and the client ID"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":". You can create a token "},"children":[]},{"$$mdtype":"Node","type":"link","inline":true,"attributes":{"href":"https://doc.sitecore.com/xmc/en/developers/xm-cloud/request-a-jwt-for-experience-edge.html"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"using the Deploy REST API or by requesting one to the API itself"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]}]}]}]},{"nodeType":"item-content","variant":"path","label":"Path","labelTranslationKey":"path","parameters":[{"name":"id","in":"path","schemaId":"schema_1406","required":true}],"pointer":"/paths/~1api~1token~1v2~1{id}/patch/parameters"},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"components/schemas/TokenUpdateParameters"}},"schemaId":"components/schemas/TokenUpdateParameters","pointer":"/paths/~1api~1token~1v2~1{id}/patch/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"PATCH","path":"/api/token/v2/{id}","servers":[{"url":"https://cs-tokenapi.sitecorecloud.io"}],"parameters":{"path":[{"name":"id","in":"path","required":true,"schemaId":"schema_1406"}],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"Bearer","type":"http","scheme":"Bearer","bearerFormat":"JWT"}],"scopes":[]}],"requestBody":{"application/json":{"schemaId":"components/schemas/TokenUpdateParameters"}},"responseCodes":["200","400","401","403","404"],"pointer":"/api/token/v2/{id}","href":"token/updatetokenbyid","openApiOperationId":"UpdateTokenById","summary":"Update a token using its ID"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"https://cs-tokenapi.sitecorecloud.io"}],"schemaId":"components/schemas/TokenUpdateParameters","mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"components/schemas/TokenUpdateParameters"}},"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. The updated token is returned.","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/RetrievedToken"}},"schemaId":"components/schemas/RetrievedToken"},{"code":"400","description":"Invalid input in the request body","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/HttpValidationProblemDetails"}},"schemaId":"components/schemas/HttpValidationProblemDetails"},{"code":"401","description":"Invalid bearer token","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ProblemDetails"}},"schemaId":"components/schemas/ProblemDetails"},{"code":"403","description":"Request does not contain required scopes","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ProblemDetails"}},"schemaId":"components/schemas/ProblemDetails"},{"code":"404","description":"Token not found","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ProblemDetails"}},"schemaId":"components/schemas/ProblemDetails"}],"pointer":"/paths/~1api~1token~1v2~1{id}/patch/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"200","schemaId":"components/schemas/RetrievedToken","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/RetrievedToken"}}},{"code":"400","schemaId":"components/schemas/HttpValidationProblemDetails","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/HttpValidationProblemDetails"}}},{"code":"401","schemaId":"components/schemas/ProblemDetails","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ProblemDetails"}}},{"code":"403","schemaId":"components/schemas/ProblemDetails","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ProblemDetails"}}},{"code":"404","schemaId":"components/schemas/ProblemDetails","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ProblemDetails"}}}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/token/updatetokenbyid"}],"panels":[]}]},"httpPath":"/api/token/v2/{id}"},{"label":"Rotate the signing key","deprecated":false,"httpVerb":"post","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/sai/token-api/token/rotatesigningkey","routeSlug":"/sai/token-api/token/rotatesigningkey","metadata":{"seo":{"title":"Rotate the signing key","description":"The signing key is used to digitally sign tokens and ensure their authenticity and integrity. Rotate the signing key to replace the current key with a new one that has updated security credentials.  This improves security and reduces the risk of compromised keys being used for malicious purposes: even if a previous key is exposed, future tokens remain secure. This enforces token expiration by making previously issued tokens invalid if they were signed with an old key. You cannot rotate the signing key if you already have one active key and two previous keys."}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"RotateSigningKey","name":"Rotate the signing key","isWebhook":false,"pointer":"/paths/~1api~1token~1v2~1rotatekey/post","hasSamples":false},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Rotate the signing key","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":"The signing key is used to digitally sign tokens and ensure their authenticity and integrity. Rotate the signing key to replace the current key with a new one that has updated security credentials.  This improves security and reduces the risk of compromised keys being used for malicious purposes: even if a previous key is exposed, future tokens remain secure. This enforces token expiration by making previously issued tokens invalid if they were signed with an old key. "},"children":[]},{"$$mdtype":"Node","type":"tag","tag":"admonition","inline":true,"attributes":{"type":"info","name":"Note"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"You cannot rotate the signing key if you already have one active key and two previous keys."},"children":[]}]}]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"Bearer","scopes":[],"type":"http","scheme":"Bearer","bearerFormat":"JWT","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"A JSON Web Token (JWT) is sent with every call. To obtain one, you need an "},"children":[]},{"$$mdtype":"Node","type":"link","inline":true,"attributes":{"href":"https://doc.sitecore.com/xmc/en/developers/xm-cloud/generate-an-edge-token.html"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"bearer token and the client ID"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":". You can create a token "},"children":[]},{"$$mdtype":"Node","type":"link","inline":true,"attributes":{"href":"https://doc.sitecore.com/xmc/en/developers/xm-cloud/request-a-jwt-for-experience-edge.html"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"using the Deploy REST API or by requesting one to the API itself"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]}]}]}]}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"POST","path":"/api/token/v2/rotatekey","servers":[{"url":"https://cs-tokenapi.sitecorecloud.io"}],"parameters":{"path":[],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"Bearer","type":"http","scheme":"Bearer","bearerFormat":"JWT"}],"scopes":[]}],"responseCodes":["204","400","401","403","404"],"pointer":"/api/token/v2/rotatekey","href":"token/rotatesigningkey","openApiOperationId":"RotateSigningKey","summary":"Rotate the signing key"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"https://cs-tokenapi.sitecorecloud.io"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"204","description":"The signing key was changed successfully"},{"code":"400","description":"Bad Request","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/HttpValidationProblemDetails"}},"schemaId":"components/schemas/HttpValidationProblemDetails"},{"code":"401","description":"Invalid bearer token","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ProblemDetails"}},"schemaId":"components/schemas/ProblemDetails"},{"code":"403","description":"Request does not contain required scopes","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ProblemDetails"}},"schemaId":"components/schemas/ProblemDetails"},{"code":"404","description":"Tenant not found","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ProblemDetails"}},"schemaId":"components/schemas/ProblemDetails"}],"pointer":"/paths/~1api~1token~1v2~1rotatekey/post/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"204"},{"code":"400","schemaId":"components/schemas/HttpValidationProblemDetails","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/HttpValidationProblemDetails"}}},{"code":"401","schemaId":"components/schemas/ProblemDetails","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ProblemDetails"}}},{"code":"403","schemaId":"components/schemas/ProblemDetails","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ProblemDetails"}}},{"code":"404","schemaId":"components/schemas/ProblemDetails","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ProblemDetails"}}}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/token/rotatesigningkey"}],"panels":[]}]},"httpPath":"/api/token/v2/rotatekey"}],"content":{"contentType":"group","meta":{"name":"Token"},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Token","showPageActions":true},{"nodeType":"markdoc","content":"The Token API is responsible for generating and managing query tokens, which are used to authenticate access to the GraphQL Query API. These tokens can be configured to restrict access to specific branches, source IP addresses, and publishing states."}],"panels":[{"children":[{"kind":"group-items","title":"Operations","titleTranslationKey":"operations","items":[{"title":"/api/token/v2","summary":"Create a token","prefix":{"name":"post","color":"post"},"badges":[],"link":"/token/createtoken","deprecated":false},{"title":"/api/token/v2","summary":"Retrieve a list of tokens","prefix":{"name":"get","color":"get"},"badges":[],"link":"/token/gettokens","deprecated":false},{"title":"/api/token/v2/{id}","summary":"Retrieve a token using its ID","prefix":{"name":"get","color":"get"},"badges":[],"link":"/token/gettokenbyid","deprecated":false},{"title":"/api/token/v2/{id}","summary":"Delete a specific token using its ID","prefix":{"name":"delete","color":"delete"},"badges":[],"link":"/token/deletetokenbyid","deprecated":false},{"title":"/api/token/v2/{id}","summary":"Update a token using its ID","prefix":{"name":"patch","color":"patch"},"badges":[],"link":"/token/updatetokenbyid","deprecated":false},{"title":"/api/token/v2/rotatekey","summary":"Rotate the signing key","prefix":{"name":"post","color":"post"},"badges":[],"link":"/token/rotatesigningkey","deprecated":false}]}]}]}]}}],"store":{"schemaStore":{"components/schemas/BaseTokenSystemProperties":{"id":"components/schemas/BaseTokenSystemProperties","kind":"json-schema","title":"BaseTokenSystemProperties","data":{"type":"object","properties":{"createdAt":{"type":"string","description":"The date and time when the token was created.","format":"date-time"},"createdBy":{"$ref":"#/components/schemas/UserLink"}},"additionalProperties":false,"description":"Contains system metadata and tracking information for a token. This includes creation details that are automatically populated by the system."}},"components/schemas/CreatedToken":{"id":"components/schemas/CreatedToken","kind":"json-schema","title":"CreatedToken","data":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the token."},"label":{"type":"string","description":"The label of the token."},"description":{"type":"string","description":"The description of the token."},"managePersistedQueries":{"type":"boolean","description":"Whether the token can manage persisted queries.","nullable":true},"token":{"type":"string","description":"The token string."},"expiration":{"type":"string","description":"The expiration date and time of the token.","format":"date-time"},"restrictions":{"$ref":"#/components/schemas/TokenRestriction"},"system":{"$ref":"#/components/schemas/BaseTokenSystemProperties"}},"additionalProperties":false,"description":"Represents a created token with its properties."}},"components/schemas/HttpValidationProblemDetails":{"id":"components/schemas/HttpValidationProblemDetails","kind":"json-schema","title":"HttpValidationProblemDetails","data":{"type":"object","properties":{"type":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"integer","format":"int32","nullable":true},"detail":{"type":"string","nullable":true},"instance":{"type":"string","nullable":true},"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}},"additionalProperties":{}}},"components/schemas/ProblemDetails":{"id":"components/schemas/ProblemDetails","kind":"json-schema","title":"ProblemDetails","data":{"type":"object","properties":{"type":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"integer","format":"int32","nullable":true},"detail":{"type":"string","nullable":true},"instance":{"type":"string","nullable":true}},"additionalProperties":{}}},"components/schemas/PublishState":{"id":"components/schemas/PublishState","kind":"json-schema","title":"PublishState","data":{"enum":["Published","Preview","published","preview"],"type":"string","description":"Represents the state of the publishing process."}},"components/schemas/RetrievedToken":{"id":"components/schemas/RetrievedToken","kind":"json-schema","title":"RetrievedToken","data":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the token."},"label":{"type":"string","description":"The label of the token."},"description":{"type":"string","description":"The description of the token."},"managePersistedQueries":{"type":"boolean","description":"Gets or sets whether the token can manage persisted queries."},"expiration":{"type":"string","description":"The expiration date and time of the token.","format":"date-time"},"restrictions":{"$ref":"#/components/schemas/TokenRestriction"},"lastUse":{"type":"string","description":"The date and time when the token was last used.","format":"date-time","nullable":true},"system":{"$ref":"#/components/schemas/TokenSystemProperties"}},"additionalProperties":false,"description":"Represents a retrieved token with its properties."}},"components/schemas/RetrievedTokenCursorPage":{"id":"components/schemas/RetrievedTokenCursorPage","kind":"json-schema","title":"RetrievedTokenCursorPage","data":{"type":"object","properties":{"count":{"type":"integer","description":"Gets or sets the total items in the database.","format":"int32","nullable":true},"minimumPageSize":{"type":"integer","description":"Gets or sets the minimum page size.","format":"int32"},"next":{"type":"string","description":"Gets or sets the Continuation token","nullable":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/RetrievedToken"},"description":"Gets or sets the data."}},"additionalProperties":false}},"components/schemas/TokenParameters":{"id":"components/schemas/TokenParameters","kind":"json-schema","title":"TokenParameters","data":{"type":"object","properties":{"label":{"type":"string","description":"The label of the token."},"description":{"type":"string","description":"The description of the token.","nullable":true},"managePersistedQueries":{"type":"boolean","description":"Whether the token can manage persisted queries.","nullable":true},"expiration":{"type":"string","description":"The expiration date and time of the token.","format":"date-time"},"restrictions":{"$ref":"#/components/schemas/TokenRestriction"}},"additionalProperties":false,"description":"Represents a request to create a token with its properties."}},"components/schemas/TokenRestriction":{"id":"components/schemas/TokenRestriction","kind":"json-schema","title":"TokenRestriction","data":{"type":"object","properties":{"publishState":{"type":"array","items":{"$ref":"#/components/schemas/PublishState"},"description":"Gets or sets the publish states associated with the token."},"branches":{"type":"array","items":{"type":"string"},"description":"Gets or sets the branches associated with the token. This can be an exact match with the branch ID or a prefix match."},"sourceIPs":{"type":"array","items":{"type":"string"},"description":"Gets or sets the source IP addresses associated with the token."},"origins":{"type":"array","items":{"type":"string"},"description":"Gets or sets the origins associated with the token."},"introspection":{"type":"boolean","description":"Gets or sets a value indicating whether introspection is allowed."}},"additionalProperties":false,"description":"Represents the restrictions associated with a token.","example":{"publishState":["Published"],"branches":["main"],"origins":["https://myapp.com"],"sourceIPs":["127.0.0.1"],"introspection":true}}},"components/schemas/TokenSystemProperties":{"id":"components/schemas/TokenSystemProperties","kind":"json-schema","title":"TokenSystemProperties","data":{"type":"object","properties":{"createdAt":{"type":"string","description":"The date and time when the token was created.","format":"date-time"},"createdBy":{"$ref":"#/components/schemas/UserLink"},"updatedAt":{"type":"string","description":"The date and time when the token was last updated.","format":"date-time","nullable":true},"updatedBy":{"$ref":"#/components/schemas/UserLink"}},"additionalProperties":false,"description":"Represents system metadata for a token."}},"components/schemas/TokenUpdateParameters":{"id":"components/schemas/TokenUpdateParameters","kind":"json-schema","title":"TokenUpdateParameters","data":{"type":"object","properties":{"label":{"type":"string","description":"The label of the token.","nullable":true},"description":{"type":"string","description":"The description of the token.","nullable":true},"managePersistedQueries":{"type":"boolean","description":"Whether the token can manage persisted queries.","nullable":true},"expiration":{"type":"string","description":"The expiration date and time of the token.","format":"date-time","nullable":true},"restrictions":{"$ref":"#/components/schemas/TokenRestriction"}},"additionalProperties":false,"description":"Represents a request to update a token with its properties."}},"components/schemas/UserLink":{"id":"components/schemas/UserLink","kind":"json-schema","title":"UserLink","data":{"type":"object","properties":{"type":{"type":"string","readOnly":true},"relatedType":{"type":"string","readOnly":true},"id":{"type":"string"},"uri":{"type":"string"}},"additionalProperties":false}},"schema_1406":{"kind":"json-schema","data":{"type":"string"},"id":"schema_1406"},"schema_1407":{"kind":"json-schema","data":{"type":"integer","format":"int32"},"id":"schema_1407"}},"exampleStore":{},"securitySchemeStore":{"Bearer":{"id":"Bearer","type":"http","scheme":"Bearer","bearerFormat":"JWT","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"A JSON Web Token (JWT) is sent with every call. To obtain one, you need an "},"children":[]},{"$$mdtype":"Node","type":"link","inline":true,"attributes":{"href":"https://doc.sitecore.com/xmc/en/developers/xm-cloud/generate-an-edge-token.html"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"bearer token and the client ID"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":". You can create a token "},"children":[]},{"$$mdtype":"Node","type":"link","inline":true,"attributes":{"href":"https://doc.sitecore.com/xmc/en/developers/xm-cloud/request-a-jwt-for-experience-edge.html"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"using the Deploy REST API or by requesting one to the API itself"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]}]}},"servers":[{"url":"https://cs-tokenapi.sitecorecloud.io"}],"specType":"openapi"},"options":{"hideInfoMetadata":true,"sanitize":true,"sortRequiredPropsFirst":true,"corsProxyUrl":"https://cors.redoc.ly","mockServer":{"off":true,"position":"off"},"disableRouter":true,"downloadUrls":[{"url":"/_bundle/sai/token-api/index.json?download"},{"url":"/_bundle/sai/token-api/index.yaml?download"}],"excludeFromSearch":false,"replayFeatures":{"graphql":false},"specType":"openapi","markdocOptions":{"tags":{},"nodes":{},"components":{}},"metadata":{"title":"Token API","description":"Use the XM Cloud Content Token API to manage query tokens for the GraphQL Query API. By setting an expiration date and applying restrictions, such as making the token valid only for a particular IP address or publish state, you can control how content is queried. <br> <br> The <b>Try it</b> functionality available from the API documentation lets you explore API endpoints and make calls directly from the documentation.\n## Authentication\nTo use this API, you need:\n\n - The URL of your XM Cloud Content server.\n - A JWT bearer token requested using the [OAuth Client Credentials flow](https://doc.sitecore.com/xmc/en/developers/xm-cloud/request-a-jwt-for-experience-edge.html). This is sent with every request.\n\n{% admonition type=\"info\" name=\"Note\" %}The token must include a scope. Which scope to use depends on the endpoint being called. For mutation operations, such as `create`, `update`, and `delete`, include the `cs:all:admin` scope. To read existing tokens, include the `cs.all:editor` scope. {% /admonition %}\n","product":"SitecoreAI Content"}},"baseSlug":"/sai/token-api","routesMapping":{}}