{"items":[{"type":"link","label":"Selection API","link":"/ch/selection-api","routeSlug":"/ch/selection-api","content":{"contentType":"overview","meta":{"name":"Selection API"},"children":[{"nodeType":"container","panels":[{"title":"Download OpenAPI description","titleTranslationKey":"download.description.title","children":[{"kind":"download","label":"index.json","url":"/_bundle/ch/selection-api/index.json?download"},{"kind":"download","label":"index.yaml","url":"/_bundle/ch/selection-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://{server}","variables":{"server":{"default":"your-server"}}}],"mode":"default"}]}],"children":[{"nodeType":"overview-section-wrapper","children":[{"nodeType":"header","level":1,"label":"Selection API (v1.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 Selection API to manage entity selections across selection pools."},"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":"The maximum selection limit is 5000 entities. This limit is configurable through "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"CONTENT.SelectionPoolDefinition.MaxSelection"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]}]}]}],"sectionId":"/ch/selection-api"}],"sectionId":"/ch/selection-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 Content Hub server. You can get this from your Content Hub Administrator. Enter this URL in the "},"children":[]},{"$$mdtype":"Node","type":"tag","tag":"html","inline":true,"attributes":{"name":"b","attrs":{}},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"{{server}}"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" variable by hovering your mouse over the variable in 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":" pane and then clicking "},"children":[]},{"$$mdtype":"Node","type":"tag","tag":"html","inline":true,"attributes":{"name":"b","attrs":{}},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Edit"},"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":"An access token and the client ID. Both are sent with every request. You  can create a token through the "},"children":[]},{"$$mdtype":"Node","type":"link","inline":true,"attributes":{"href":"https://doc.sitecore.com/ch/en/users/content-hub/create-an-oauth-client.html"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Content Hub interface"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"  or by "},"children":[]},{"$$mdtype":"Node","type":"link","inline":true,"attributes":{"href":"https://doc.sitecore.com/ch/en/developers/cloud-dev/oauth-tokens.html#grant-flows"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"requesting one using the API itself"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]}]}]}],"sectionId":"/ch/selection-api/section/authentication"}]}]}},{"type":"link","label":"Authentication","link":"/ch/selection-api/section/authentication","routeSlug":"/ch/selection-api/section/authentication","content":null},{"type":"group","label":"Selection","link":"/ch/selection-api/selection","routeSlug":"/ch/selection-api/selection","items":[{"label":"Retrieve a selection by pool and definition","deprecated":false,"httpVerb":"get","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/ch/selection-api/selection/getselection","routeSlug":"/ch/selection-api/selection/getselection","metadata":{"seo":{"title":"Retrieve a selection by pool and definition","description":"Retrieves selection items for a given selection pool."}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"getSelection","name":"Retrieve a selection by pool and definition","isWebhook":false,"pointer":"/paths/~1api~1selection~1{selectionPool}~1{definitionName}/get","hasSamples":false},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Retrieve a selection by pool and definition","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 selection items for a given selection pool."},"children":[]}]}]},{"$$mdtype":"Node","type":"tag","tag":"admonition","attributes":{"type":"info","name":"Note"},"children":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"At least one of the following must be provided. If both are provided, the route parameter takes precedence:"},"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":"code","inline":true,"attributes":{"content":"definitionName"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" (route parameter) - single definition name."},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"definitionNames"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" (query parameter) - comma-separated list of definition names; for example, "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"GET /api/selection/AssetSelectionPool?definitionNames=M.Asset,M.Content"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]}]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"OAuth2.0","scopes":[],"type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"/oauth/authorize","tokenUrl":"/oauth/token","scopes":{}}}}]}]},{"nodeType":"item-content","variant":"path","label":"Path","labelTranslationKey":"path","parameters":[{"name":"selectionPool","in":"path","schemaId":"schema_933","description":"Selection pool identifier","required":true},{"name":"definitionName","in":"path","schemaId":"schema_933","description":"Single definition name","required":true}],"pointer":"/paths/~1api~1selection~1{selectionPool}~1{definitionName}/get/parameters"},{"nodeType":"item-content","variant":"query","label":"Query","labelTranslationKey":"query","parameters":[{"name":"definitionNames","in":"query","schemaId":"schema_934","description":"Comma-separated list of definition names"},{"name":"subPoolId","in":"query","schemaId":"schema_935","description":"Optional sub-pool identifier for scoped selections"},{"name":"ignorePermissions","in":"query","schemaId":"schema_936","description":"Skip permission calculation for faster response"}],"pointer":"/paths/~1api~1selection~1{selectionPool}~1{definitionName}/get/parameters"},{"nodeType":"item-content","variant":"headers","label":"Headers","labelTranslationKey":"header","parameters":[{"name":"If-Modified-Since","in":"header","schemaId":"schema_937","description":"Conditional request support (not currently implemented)"}],"pointer":"/paths/~1api~1selection~1{selectionPool}~1{definitionName}/get/parameters"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"GET","path":"/api/selection/{selectionPool}/{definitionName}","servers":[{"url":"https://{server}","variables":{"server":{"default":"your-server"}}}],"parameters":{"path":[{"name":"selectionPool","in":"path","required":true,"schemaId":"schema_933"},{"name":"definitionName","in":"path","required":true,"schemaId":"schema_933"}],"query":[{"name":"definitionNames","in":"query","required":false,"example":"M.Asset,M.Content","schemaId":"schema_934"},{"name":"subPoolId","in":"query","required":false,"schemaId":"schema_935"},{"name":"ignorePermissions","in":"query","required":false,"schemaId":"schema_936"}],"querystring":[],"header":[{"name":"If-Modified-Since","in":"header","required":false,"schemaId":"schema_937"}],"cookie":[]},"security":[{"schemes":[{"id":"OAuth2.0","type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"/oauth/authorize","tokenUrl":"/oauth/token","scopes":{}}}}],"scopes":[]}],"responseCodes":["200","400","404"],"pointer":"/api/selection/{selectionPool}/{definitionName}","href":"selection/getselection","openApiOperationId":"getSelection","summary":"Retrieve a selection by pool and definition"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"https://{server}","variables":{"server":{"default":"your-server"}}}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Selection retrieved successfully","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/SelectionResponse","exampleIds":["paths/~1api~1selection~1{selectionPool}~1{definitionName}/get/responses/200/content/application~1json/examples/singleDefinition","paths/~1api~1selection~1{selectionPool}~1{definitionName}/get/responses/200/content/application~1json/examples/multipleDefinitions"]}},"schemaId":"components/schemas/SelectionResponse","exampleIds":["paths/~1api~1selection~1{selectionPool}~1{definitionName}/get/responses/200/content/application~1json/examples/singleDefinition","paths/~1api~1selection~1{selectionPool}~1{definitionName}/get/responses/200/content/application~1json/examples/multipleDefinitions"]},{"code":"400","description":"No definition name provided (either route or query parameter)"},{"code":"404","description":"Selection pool identifier not found"}],"pointer":"/paths/~1api~1selection~1{selectionPool}~1{definitionName}/get/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"200","schemaId":"components/schemas/SelectionResponse","exampleIds":["paths/~1api~1selection~1{selectionPool}~1{definitionName}/get/responses/200/content/application~1json/examples/singleDefinition","paths/~1api~1selection~1{selectionPool}~1{definitionName}/get/responses/200/content/application~1json/examples/multipleDefinitions"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/SelectionResponse","exampleIds":["paths/~1api~1selection~1{selectionPool}~1{definitionName}/get/responses/200/content/application~1json/examples/singleDefinition","paths/~1api~1selection~1{selectionPool}~1{definitionName}/get/responses/200/content/application~1json/examples/multipleDefinitions"]}}},{"code":"400"},{"code":"404"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/selection/getselection"}],"panels":[]}]},"httpPath":"/api/selection/{selectionPool}/{definitionName}"},{"label":"Clear a selection for a definition","deprecated":false,"httpVerb":"delete","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/ch/selection-api/selection/clearselection","routeSlug":"/ch/selection-api/selection/clearselection","metadata":{"seo":{"title":"Clear a selection for a definition","description":"Removes all the entities for a specific definition from the selection. It does not delete the selection pool itself and does not affect other definitions in the same pool or other sub-pools."}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"clearSelection","name":"Clear a selection for a definition","isWebhook":false,"pointer":"/paths/~1api~1selection~1{selectionPool}~1{definitionName}/delete","hasSamples":false},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Clear a selection for a definition","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":"Removes all the entities for a specific definition from the selection. It does not delete the selection pool itself and does not affect other definitions in the same pool or other sub-pools."},{"nodeType":"security","requirements":[{"schemes":[{"name":"OAuth2.0","scopes":[],"type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"/oauth/authorize","tokenUrl":"/oauth/token","scopes":{}}}}]}]},{"nodeType":"item-content","variant":"path","label":"Path","labelTranslationKey":"path","parameters":[{"name":"selectionPool","in":"path","schemaId":"schema_933","required":true},{"name":"definitionName","in":"path","schemaId":"schema_933","required":true}],"pointer":"/paths/~1api~1selection~1{selectionPool}~1{definitionName}/delete/parameters"},{"nodeType":"item-content","variant":"query","label":"Query","labelTranslationKey":"query","parameters":[{"name":"subPoolId","in":"query","schemaId":"schema_935"}],"pointer":"/paths/~1api~1selection~1{selectionPool}~1{definitionName}/delete/parameters"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"DELETE","path":"/api/selection/{selectionPool}/{definitionName}","servers":[{"url":"https://{server}","variables":{"server":{"default":"your-server"}}}],"parameters":{"path":[{"name":"selectionPool","in":"path","required":true,"schemaId":"schema_933"},{"name":"definitionName","in":"path","required":true,"schemaId":"schema_933"}],"query":[{"name":"subPoolId","in":"query","required":false,"schemaId":"schema_935"}],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"OAuth2.0","type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"/oauth/authorize","tokenUrl":"/oauth/token","scopes":{}}}}],"scopes":[]}],"responseCodes":["200","404"],"pointer":"/api/selection/{selectionPool}/{definitionName}","href":"selection/clearselection","openApiOperationId":"clearSelection","summary":"Clear a selection for a definition"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"https://{server}","variables":{"server":{"default":"your-server"}}}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Selection cleared successfully"},{"code":"404","description":"Selection pool not found"}],"pointer":"/paths/~1api~1selection~1{selectionPool}~1{definitionName}/delete/responses"}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/selection/clearselection"}],"panels":[]}]},"httpPath":"/api/selection/{selectionPool}/{definitionName}"},{"label":"Create a selection","deprecated":false,"httpVerb":"post","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/ch/selection-api/selection/createselection","routeSlug":"/ch/selection-api/selection/createselection","metadata":{"seo":{"title":"Create a selection","description":"Creates a selection using one of the following modes:"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"createSelection","name":"Create a selection","isWebhook":false,"pointer":"/paths/~1api~1selection/post","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Create a selection","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 selection using one of the following modes:"},"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":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Mode 1"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" Direct Entity IDs - use this mode when you know the specific entity IDs to add."},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Mode 2"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" Query-Based Selection - use this mode to select entities based on search criteria. The system executes the query and adds matching entities."},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Query types are case-insensitive (for example, "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"BASIC"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"basic"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"Basic"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"). You can create queries that include various "},"children":[]},{"$$mdtype":"Node","type":"link","inline":true,"attributes":{"href":"https://doc.sitecore.com/ch/en/developers/cloud-dev/parameters.html"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"parameters"},"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":"tag","tag":"admonition","inline":true,"attributes":{"type":"info","name":"Note"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"If "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"values"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" is provided and non-empty, it takes precedence and "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"query"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" is ignored."},"children":[]}]}]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"OAuth2.0","scopes":[],"type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"/oauth/authorize","tokenUrl":"/oauth/token","scopes":{}}}}]}]},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","required":true,"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"components/schemas/SelectionCreateRequest","exampleIds":["paths/~1api~1selection/post/requestBody/content/application~1json/examples/directValues","paths/~1api~1selection/post/requestBody/content/application~1json/examples/queryBased"]}},"schemaId":"components/schemas/SelectionCreateRequest","exampleIds":["paths/~1api~1selection/post/requestBody/content/application~1json/examples/directValues","paths/~1api~1selection/post/requestBody/content/application~1json/examples/queryBased"],"pointer":"/paths/~1api~1selection/post/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"POST","path":"/api/selection","servers":[{"url":"https://{server}","variables":{"server":{"default":"your-server"}}}],"parameters":{"path":[],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"OAuth2.0","type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"/oauth/authorize","tokenUrl":"/oauth/token","scopes":{}}}}],"scopes":[]}],"requestBody":{"application/json":{"schemaId":"components/schemas/SelectionCreateRequest","exampleIds":["paths/~1api~1selection/post/requestBody/content/application~1json/examples/directValues","paths/~1api~1selection/post/requestBody/content/application~1json/examples/queryBased"]}},"responseCodes":["201","400","403","404"],"pointer":"/api/selection","href":"selection/createselection","openApiOperationId":"createSelection","summary":"Create a selection"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"https://{server}","variables":{"server":{"default":"your-server"}}}],"schemaId":"components/schemas/SelectionCreateRequest","exampleIds":["paths/~1api~1selection/post/requestBody/content/application~1json/examples/directValues","paths/~1api~1selection/post/requestBody/content/application~1json/examples/queryBased"],"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"components/schemas/SelectionCreateRequest","exampleIds":["paths/~1api~1selection/post/requestBody/content/application~1json/examples/directValues","paths/~1api~1selection/post/requestBody/content/application~1json/examples/queryBased"]}},"examples":[{},{}]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"201","description":"Selection created","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/SelectionResult"}},"schemaId":"components/schemas/SelectionResult","headers":{"Location":{"description":"URI to retrieve the selection","schema":{"type":"string"}}},"headerSchemaId":"schema_938"},{"code":"400","description":"Invalid request"},{"code":"403","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Selection capacity exceeded. Default limit is 5000 entities per selection. Validation considers (current items + items to add - items to remove)."},"children":[]}]}]}],"mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ErrorResponse"}},"schemaId":"components/schemas/ErrorResponse"},{"code":"404","description":"Selection pool not found"}],"pointer":"/paths/~1api~1selection/post/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"201","schemaId":"components/schemas/SelectionResult","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/SelectionResult"}}},{"code":"400"},{"code":"403","schemaId":"components/schemas/ErrorResponse","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ErrorResponse"}}},{"code":"404"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/selection/createselection"}],"panels":[]}]},"httpPath":"/api/selection"},{"label":"Update a selection","deprecated":false,"httpVerb":"patch","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/ch/selection-api/selection/updateselection","routeSlug":"/ch/selection-api/selection/updateselection","metadata":{"seo":{"title":"Update a selection","description":"Add or remove entities from a selection.  This request can contain multiple commands and is used both to add and to remove entities from a selection using the PATCH object. "}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"updateSelection","name":"Update a selection","isWebhook":false,"pointer":"/paths/~1api~1selection/patch","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Update a selection","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":"Add or remove entities from a selection. "},"children":[]},{"$$mdtype":"Node","type":"tag","tag":"admonition","inline":true,"attributes":{"type":"info","name":"Note"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" This request can contain multiple commands and is used both to add and to remove entities from a selection using the PATCH object. "},"children":[]}]}]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"OAuth2.0","scopes":[],"type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"/oauth/authorize","tokenUrl":"/oauth/token","scopes":{}}}}]}]},{"nodeType":"item-content","variant":"query","label":"Query","labelTranslationKey":"query","parameters":[{"name":"loadPermissions","in":"query","schemaId":"schema_936","description":"Return updated permissions in response"}],"pointer":"/paths/~1api~1selection/patch/parameters"},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","required":true,"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"components/schemas/SelectionPatchRequest"}},"schemaId":"components/schemas/SelectionPatchRequest","pointer":"/paths/~1api~1selection/patch/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"PATCH","path":"/api/selection","servers":[{"url":"https://{server}","variables":{"server":{"default":"your-server"}}}],"parameters":{"path":[],"query":[{"name":"loadPermissions","in":"query","required":false,"schemaId":"schema_936"}],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"OAuth2.0","type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"/oauth/authorize","tokenUrl":"/oauth/token","scopes":{}}}}],"scopes":[]}],"requestBody":{"application/json":{"schemaId":"components/schemas/SelectionPatchRequest"}},"responseCodes":["200","204","400","403","404"],"pointer":"/api/selection","href":"selection/updateselection","openApiOperationId":"updateSelection","summary":"Update a selection"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"https://{server}","variables":{"server":{"default":"your-server"}}}],"schemaId":"components/schemas/SelectionPatchRequest","mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"components/schemas/SelectionPatchRequest"}},"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Selection updated with permissions","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/SelectionResult"}},"schemaId":"components/schemas/SelectionResult"},{"code":"204","description":"Selection updated successfully"},{"code":"400","description":"Invalid request body"},{"code":"403","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Selection capacity exceeded. Default limit is 5000 entities per selection. Validation considers (current items + items to add - items to remove)."},"children":[]}]}]}],"mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ErrorResponse"}},"schemaId":"components/schemas/ErrorResponse"},{"code":"404","description":"Selection pool not found"}],"pointer":"/paths/~1api~1selection/patch/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"200","schemaId":"components/schemas/SelectionResult","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/SelectionResult"}}},{"code":"204"},{"code":"400"},{"code":"403","schemaId":"components/schemas/ErrorResponse","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ErrorResponse"}}},{"code":"404"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/selection/updateselection"}],"panels":[]}]},"httpPath":"/api/selection"}],"content":{"contentType":"group","meta":{"name":"Selection"},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Selection","showPageActions":true},{"nodeType":"markdoc","content":"The Selection API lets you list, add, and remove entities from a selection."}],"panels":[{"children":[{"kind":"group-items","title":"Operations","titleTranslationKey":"operations","items":[{"title":"/api/selection/{selectionPool}/{definitionName}","summary":"Retrieve a selection by pool and definition","prefix":{"name":"get","color":"get"},"badges":[],"link":"/selection/getselection","deprecated":false},{"title":"/api/selection/{selectionPool}/{definitionName}","summary":"Clear a selection for a definition","prefix":{"name":"delete","color":"delete"},"badges":[],"link":"/selection/clearselection","deprecated":false},{"title":"/api/selection","summary":"Create a selection","prefix":{"name":"post","color":"post"},"badges":[],"link":"/selection/createselection","deprecated":false},{"title":"/api/selection","summary":"Update a selection","prefix":{"name":"patch","color":"patch"},"badges":[],"link":"/selection/updateselection","deprecated":false}]}]}]}]}}],"store":{"schemaStore":{"components/schemas/SelectionResponse":{"id":"components/schemas/SelectionResponse","kind":"json-schema","title":"SelectionResponse","data":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/SelectionResult"}}},"components/schemas/SelectionResult":{"id":"components/schemas/SelectionResult","kind":"json-schema","title":"SelectionResult","data":{"type":"object","properties":{"items":{"type":"array","items":{"type":"integer"}},"permissions":{"type":"array","items":{"type":"string"}},"link":{"$ref":"#/components/schemas/Link"}}}},"components/schemas/Link":{"id":"components/schemas/Link","kind":"json-schema","title":"Link","data":{"type":"object","properties":{"href":{"type":"string"},"type":{"type":"string"}}}},"components/schemas/SelectionCreateRequest":{"id":"components/schemas/SelectionCreateRequest","kind":"json-schema","title":"SelectionCreateRequest","data":{"type":"object","properties":{"values":{"type":"array","items":{"type":"integer"}},"type":{"type":"string","description":"Query type (e.g. \"basic\")"},"query":{"type":"string"},"selectionPool":{"type":"string"},"definitionName":{"type":"string"},"subPoolId":{"type":"integer","format":"int64"},"ignorePermissions":{"type":"boolean","default":false}},"required":["selectionPool"]}},"components/schemas/SelectionPatchRequest":{"id":"components/schemas/SelectionPatchRequest","kind":"json-schema","title":"SelectionPatchRequest","data":{"type":"object","required":["selectionPool","definitionName","patches"],"properties":{"selectionPool":{"type":"string"},"definitionName":{"type":"string"},"subPoolId":{"type":"integer","format":"int64"},"patches":{"type":"array","items":{"$ref":"#/components/schemas/PatchOperation"}}}}},"components/schemas/PatchOperation":{"id":"components/schemas/PatchOperation","kind":"json-schema","title":"PatchOperation","data":{"type":"object","required":["operation","value"],"properties":{"operation":{"type":"string","enum":["Add","Remove"]},"value":{"type":"array","items":{"type":"integer"}}}}},"components/schemas/ErrorResponse":{"id":"components/schemas/ErrorResponse","kind":"json-schema","title":"ErrorResponse","data":{"type":"object","properties":{"message":{"type":"string"}}}},"schema_933":{"kind":"json-schema","data":{"type":"string"},"id":"schema_933"},"schema_934":{"kind":"json-schema","data":{"type":"string","example":"M.Asset,M.Content"},"id":"schema_934"},"schema_935":{"kind":"json-schema","data":{"type":"integer","format":"int64"},"id":"schema_935"},"schema_936":{"kind":"json-schema","data":{"type":"boolean","default":false},"id":"schema_936"},"schema_937":{"kind":"json-schema","data":{"type":"string","format":"date-time"},"id":"schema_937"},"schema_938":{"kind":"json-schema","data":{"type":"object","properties":{"Location":{"type":"string","description":"URI to retrieve the selection"}}},"id":"schema_938"}},"exampleStore":{"paths/~1api~1selection~1{selectionPool}~1{definitionName}/get/responses/200/content/application~1json/examples/singleDefinition":{"value":{"M.Asset":{"items":[1234,5678,9012],"permissions":["entity.read","entity.update"],"link":{"href":"/api/entities/456","type":"application/json"}}},"key":"singleDefinition","summary":"Single definition","id":"paths/~1api~1selection~1{selectionPool}~1{definitionName}/get/responses/200/content/application~1json/examples/singleDefinition"},"paths/~1api~1selection~1{selectionPool}~1{definitionName}/get/responses/200/content/application~1json/examples/multipleDefinitions":{"value":{"M.Asset":{"items":[1234,5678],"permissions":["entity.read","entity.update"],"link":{"href":"/api/entities/456","type":"application/json"}},"M.Content":{"items":[3456],"permissions":["entity.read"],"link":{"href":"/api/entities/456","type":"application/json"}}},"key":"multipleDefinitions","summary":"Multiple definitions","id":"paths/~1api~1selection~1{selectionPool}~1{definitionName}/get/responses/200/content/application~1json/examples/multipleDefinitions"},"paths/~1api~1selection/post/requestBody/content/application~1json/examples/directValues":{"value":{"values":[1234,5678,9012],"selectionPool":"AssetSelectionPool","definitionName":"M.Asset","subPoolId":123,"ignorePermissions":false},"key":"directValues","summary":"Direct entity IDs","id":"paths/~1api~1selection/post/requestBody/content/application~1json/examples/directValues"},"paths/~1api~1selection/post/requestBody/content/application~1json/examples/queryBased":{"value":{"type":"basic","query":"Parent('AssetMediaToAsset').id == 1029 AND Decimal('FileSize') gt 10","selectionPool":"SelectionPool.Create","definitionName":"M.Asset"},"key":"queryBased","summary":"Query-based selection","id":"paths/~1api~1selection/post/requestBody/content/application~1json/examples/queryBased"}},"securitySchemeStore":{"OAuth2.0":{"id":"OAuth2.0","type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"/oauth/authorize","tokenUrl":"/oauth/token","scopes":{}}}}},"servers":[{"url":"https://{server}","variables":{"server":{"default":"your-server"}}}],"specType":"openapi"},"options":{"hideInfoMetadata":true,"sanitize":true,"sortRequiredPropsFirst":true,"corsProxyUrl":"https://cors.redoc.ly","mockServer":{"off":true,"position":"off"},"disableRouter":true,"downloadUrls":[{"url":"/_bundle/ch/selection-api/index.json?download"},{"url":"/_bundle/ch/selection-api/index.yaml?download"}],"excludeFromSearch":false,"replayFeatures":{"graphql":false},"specType":"openapi","markdocOptions":{"tags":{},"nodes":{},"components":{}},"metadata":{"title":"Selection API","description":"Use the Selection API to manage entity selections across selection pools.\n{% admonition type=\"info\" name=\"Note\" %}The maximum selection limit is 5000 entities. This limit is configurable through `CONTENT.SelectionPoolDefinition.MaxSelection`.{% /admonition %}\n## Authentication\nTo use this API, you need:\n- The URL of your Content Hub server. You can get this from your Content Hub Administrator. Enter this URL in the <b>{{server}}</b> variable by hovering your mouse over the variable in the <b>Try it</b> pane and then clicking <b>Edit</b>.\n- An access token and the client ID. Both are sent with every request. You  can create a token through the [Content Hub interface](https://doc.sitecore.com/ch/en/users/content-hub/create-an-oauth-client.html)  or by [requesting one using the API itself](https://doc.sitecore.com/ch/en/developers/cloud-dev/oauth-tokens.html#grant-flows).","product":"Content Hub"}},"baseSlug":"/ch/selection-api","routesMapping":{}}