How Can We Help?
Web Service: How to Exclude/Limit to Content of a Specific TypeWeb Service: How to Exclude/Limit to Content of a Specific Type
What
When you query a content type via the Web Service you will be default get all available types.
Introduced in 5.21, it is now possible to exclude or limit to selected sub types.
How
POST example - exclude by content type:
- This query will return all Research outputs except those Research Outputs of the type Contribution to Conference › Abstract
<?xml version="1.0"?> <researchOutputsQuery> <excludeByTypeUri>true</excludeByTypeUri> <typeUris> <typeUri>/dk/atira/pure/researchoutput/researchoutputtypes/contributiontoconference/abstract</typeUri> </typeUris> </researchOutputsQuery>
POST example - exclude multiple content types:
- Contribution to conference › Abstract + Contribution to journal › Article:
<?xml version="1.0"?> <researchOutputsQuery> <excludeByTypeUri>true</excludeByTypeUri> <typeUris> <typeUri>/dk/atira/pure/researchoutput/researchoutputtypes/contributiontoconference/abstract</typeUri> <typeUri>/dk/atira/pure/researchoutput/researchoutputtypes/contributiontojournal/article</typeUri> </typeUris> </researchOutputsQuery>
Note: it is not possible to do a wildcard typeUri query (e.g. /dk/atira/pure/researchoutput/researchoutputtypes/contributiontoconference/*).
- You will have to add all type URIs like above.
POST example - Include/limit content of a specific content type
- This query will only return Research Outputs of this type Contribution to Conference › Other:
<?xml version="1.0"?> <researchOutputsQuery> <typeUris> <typeUri>/dk/atira/pure/researchoutput/researchoutputtypes/contributiontoconference/other</typeUri> </typeUris> </researchOutputsQuery>
In doubt of the type URI strings?
- It is possible to fetch the full tree of classification types in the classification-scheme endpoint with a call like this [your pure url]/ws/api/521/classification-schemes/[insert id of the classification scheme]?apiKey=[insert api key]
More information
Updated at July 27, 2024