
<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.share-vde.org/w/index.php?action=history&amp;feed=atom&amp;title=ShareDoc%3ASubject_API</id>
	<title>ShareDoc:Subject API - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.share-vde.org/w/index.php?action=history&amp;feed=atom&amp;title=ShareDoc%3ASubject_API"/>
	<link rel="alternate" type="text/html" href="https://wiki.share-vde.org/w/index.php?title=ShareDoc:Subject_API&amp;action=history"/>
	<updated>2026-05-25T17:19:03Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.6</generator>
	<entry>
		<id>https://wiki.share-vde.org/w/index.php?title=ShareDoc:Subject_API&amp;diff=2501&amp;oldid=prev</id>
		<title>Serena Cericola at 08:53, 28 May 2024</title>
		<link rel="alternate" type="text/html" href="https://wiki.share-vde.org/w/index.php?title=ShareDoc:Subject_API&amp;diff=2501&amp;oldid=prev"/>
		<updated>2024-05-28T08:53:00Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 08:53, 28 May 2024&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;{{DISPLAYTITLE:Share-VDE GraphQL API: Subjects}}&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Introduction==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Introduction==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key bluespice:diff::1.12:old-2147:rev-2501 --&gt;
&lt;/table&gt;</summary>
		<author><name>Serena Cericola</name></author>
	</entry>
	<entry>
		<id>https://wiki.share-vde.org/w/index.php?title=ShareDoc:Subject_API&amp;diff=2147&amp;oldid=prev</id>
		<title>Serena Cericola at 13:31, 19 February 2024</title>
		<link rel="alternate" type="text/html" href="https://wiki.share-vde.org/w/index.php?title=ShareDoc:Subject_API&amp;diff=2147&amp;oldid=prev"/>
		<updated>2024-02-19T13:31:03Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 13:31, 19 February 2024&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l3&quot;&gt;Line 3:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 3:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This section describes the new ShareVDE Subject API, introduced in December 2021. Subjects are a complicated matter from a functional and API perspective: for that reason, we decided to create a specific section to better focus on them.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This section describes the new ShareVDE Subject API, introduced in December 2021. Subjects are a complicated matter from a functional and API perspective: for that reason, we decided to create a specific section to better focus on them.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The last part illustrates the REST endpoints and the GraphQL queries used for interacting with subjects. Note that the examples are often truncated because they are available in our [[&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;ShareVDEmembers&lt;/del&gt;:&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;TechnicalDocumentation/&lt;/del&gt;The PostMan Collection|PostMan API Collection.]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The last part illustrates the REST endpoints and the GraphQL queries used for interacting with subjects. Note that the examples are often truncated because they are available in our [[&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;ShareDoc&lt;/ins&gt;:The PostMan Collection|PostMan API Collection.]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Subjects are clusters==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Subjects are clusters==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Serena Cericola</name></author>
	</entry>
	<entry>
		<id>https://wiki.share-vde.org/w/index.php?title=ShareDoc:Subject_API&amp;diff=2056&amp;oldid=prev</id>
		<title>Andrea Gazzarini: Created page with &quot; ==Introduction== This section describes the new ShareVDE Subject API, introduced in December 2021. Subjects are a complicated matter from a functional and API perspective: for that reason, we decided to create a specific section to better focus on them.  The last part illustrates the REST endpoints and the GraphQL queries used for interacting with subjects. Note that the examples are often truncated because they are available in our ShareVDEmembers:TechnicalDocumentat...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.share-vde.org/w/index.php?title=ShareDoc:Subject_API&amp;diff=2056&amp;oldid=prev"/>
		<updated>2024-02-08T09:10:41Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot; ==Introduction== This section describes the new ShareVDE Subject API, introduced in December 2021. Subjects are a complicated matter from a functional and API perspective: for that reason, we decided to create a specific section to better focus on them.  The last part illustrates the REST endpoints and the GraphQL queries used for interacting with subjects. Note that the examples are often truncated because they are available in our ShareVDEmembers:TechnicalDocumentat...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;
==Introduction==&lt;br /&gt;
This section describes the new ShareVDE Subject API, introduced in December 2021. Subjects are a complicated matter from a functional and API perspective: for that reason, we decided to create a specific section to better focus on them.&lt;br /&gt;
&lt;br /&gt;
The last part illustrates the REST endpoints and the GraphQL queries used for interacting with subjects. Note that the examples are often truncated because they are available in our [[ShareVDEmembers:TechnicalDocumentation/The PostMan Collection|PostMan API Collection.]]&lt;br /&gt;
&lt;br /&gt;
==Subjects are clusters==&lt;br /&gt;
ShareVDE entities are clusters. That means a single entity could potentially receive multiple contributions from the institutions that form what we call a ShareVDE tenant.&lt;br /&gt;
&lt;br /&gt;
Subjects follow that rule, but at the same time, their structure is a bit more articulated because they introduce some intermediate entities we will describe earlier.&lt;br /&gt;
&lt;br /&gt;
==Domain Model==&lt;br /&gt;
The following picture illustrates the Subject Domain Model.&lt;br /&gt;
[[File:Subject Domain Model.png|alt=|none|thumb|724x724px]]&lt;br /&gt;
See also the following slide, which focuses on the different layers in the Subject domain: &lt;br /&gt;
[[File:Subject Domain Layers.png|none|thumb|720x720px]]&lt;br /&gt;
&lt;br /&gt;
===Work===&lt;br /&gt;
A Work is, at time of writing, the only ShareVDE entity that can have zero, one or multiple subjects. That means the association between works and subjects is defined in the domain model but the information about subjects, for example for searching purposes, can be made available also at opus and publication level.  &lt;br /&gt;
&lt;br /&gt;
===Subject===&lt;br /&gt;
A Subject is a ShareVDE entity which determines and describes the intellectual or artistic content and the genre/form characteristics of a given resource. A ShareVDE Subject doesn&amp;#039;t have a specific type itself: it&amp;#039;s the relationship between it and the owning Work that qualifies it in several ways (e.g. name, title, topical). &lt;br /&gt;
&lt;br /&gt;
==== Subject Variants ====&lt;br /&gt;
A subject can have one or more variants: each variant is a Subject entity connected through the main form through the &amp;quot;variant&amp;quot; qualifier.&lt;br /&gt;
&lt;br /&gt;
===Heading Slice===&lt;br /&gt;
A subject instance consists of one or multiple ordered heading slices.The ordered set of slices forms the so called &amp;quot;subject heading&amp;quot;,  which is the text usually displayed in OPACs. &lt;br /&gt;
&lt;br /&gt;
For example the following except from a MARC record:&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
630 $aBible $lEnglish $xVersion&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;forms the subject heading as follows: &amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
Bible -- English -- Version&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;In the example above each token between, starting with or ending with &amp;quot;--&amp;quot;  is what we call &amp;#039;&amp;#039;&amp;#039;HeadingSlice&amp;#039;&amp;#039;&amp;#039;. Following that rule, the example produces three slices:&lt;br /&gt;
&lt;br /&gt;
#Bible&lt;br /&gt;
#English&lt;br /&gt;
#Version&lt;br /&gt;
&lt;br /&gt;
An HeadingSlice is not just a simple text: it is itself an Entity which associates the text (e.g. Bible) with a ShareVDE entity called Concept. &lt;br /&gt;
&lt;br /&gt;
===Concept===&lt;br /&gt;
An abstract representation of a ShareVDE entity (i.e. cluster) which can be connected to a heading slice. Concretely, it corresponds to a  subset of ShareVDE clusters (e.g. Opus, Agent, Date, Event, Topic). &lt;br /&gt;
&lt;br /&gt;
This because the ShareVDE domain model includes entities that cannot be a concept (e.g. Work, Publication, Instances, Agent Type).&lt;br /&gt;
&lt;br /&gt;
In case a given slice doesn&amp;#039;t map to a known concept type, a &amp;#039;&amp;#039;&amp;#039;GenericConcept&amp;#039;&amp;#039;&amp;#039; cluster is created. It is a valid ShareVDE cluster, with few information like URI and heading (the owning slice text).&lt;br /&gt;
&lt;br /&gt;
In the heading example above, we will have three heading slices:&lt;br /&gt;
&lt;br /&gt;
#Bible =&amp;gt; https://svde.org/opuses/82938 (an Opus)&lt;br /&gt;
#English =&amp;gt; https://svde.org/languages/eng  (a Language)&lt;br /&gt;
#Version =&amp;gt; https://svde.org/concepts/83974384 (a Generic Concept)&lt;br /&gt;
&lt;br /&gt;
==REST API==&lt;br /&gt;
Subjects can be retrieved in different ways. The usual scenario is when the requestor wants to retrieve the subjects connected to a given Work / Publication. In that  case here&amp;#039;s the request:&amp;lt;syntaxhighlight lang=&amp;quot;http&amp;quot;&amp;gt;&lt;br /&gt;
https://svde.org/work/{workId}/subjects&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;and the corresponding response, where you can see three subjects: &lt;br /&gt;
&lt;br /&gt;
#A subject (&amp;lt;u&amp;gt;&amp;#039;&amp;#039;&amp;lt;nowiki&amp;gt;https://svde.org/subjects/702&amp;lt;/nowiki&amp;gt;&amp;#039;&amp;#039;&amp;lt;/u&amp;gt;) which consists of the following slices &lt;br /&gt;
##Library orientation for school children&lt;br /&gt;
##*&amp;lt;u&amp;gt;&amp;#039;&amp;#039;&amp;lt;nowiki&amp;gt;https://svde.org/concepts/1639399888501&amp;lt;/nowiki&amp;gt;&amp;#039;&amp;#039;&amp;lt;/u&amp;gt;&lt;br /&gt;
##United States.&lt;br /&gt;
##*&amp;lt;u&amp;gt;&amp;#039;&amp;#039;&amp;lt;nowiki&amp;gt;https://svde.org/places/6252001&amp;lt;/nowiki&amp;gt;&amp;#039;&amp;#039;&amp;lt;/u&amp;gt;&lt;br /&gt;
#A subject (&amp;#039;&amp;#039;&amp;lt;nowiki&amp;gt;https://svde.org/subjects/703&amp;lt;/nowiki&amp;gt;&amp;#039;&amp;#039;) which consists of the following slices&lt;br /&gt;
##School libraries&lt;br /&gt;
##*&amp;lt;nowiki&amp;gt;https://svde.org/concepts/1639399888505&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
##Activity programs&lt;br /&gt;
##*&amp;#039;&amp;#039;&amp;lt;nowiki&amp;gt;https://svde.org/concepts/1639399888508&amp;lt;/nowiki&amp;gt;&amp;#039;&amp;#039;&lt;br /&gt;
##United States.&lt;br /&gt;
##*&amp;#039;&amp;#039;&amp;lt;nowiki&amp;gt;https://svde.org/places/6252001&amp;lt;/nowiki&amp;gt;&amp;#039;&amp;#039;&lt;br /&gt;
#A subject (&amp;#039;&amp;#039;&amp;lt;nowiki&amp;gt;https://svde.org/subjects/704&amp;lt;/nowiki&amp;gt;&amp;#039;&amp;#039;) which consists of the following slices&lt;br /&gt;
##Media programs (Education)&lt;br /&gt;
##*&amp;lt;nowiki&amp;gt;https://svde.org/concepts/1639399888512&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;json&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;_embedded&amp;quot;: {&lt;br /&gt;
        &amp;quot;resourceList&amp;quot;: [&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;heading&amp;quot;: [&lt;br /&gt;
                    {&lt;br /&gt;
                        &amp;quot;text&amp;quot;: &amp;quot;Library orientation for school children&amp;quot;,&lt;br /&gt;
                        &amp;quot;_links&amp;quot;: {&lt;br /&gt;
                            &amp;quot;concept&amp;quot;: {&lt;br /&gt;
                                &amp;quot;href&amp;quot;: &amp;quot;https://svde.org/concepts/1639399888501&amp;quot;&lt;br /&gt;
                            }&lt;br /&gt;
                        }&lt;br /&gt;
                    },&lt;br /&gt;
                    {&lt;br /&gt;
                        &amp;quot;text&amp;quot;: &amp;quot;United States.&amp;quot;,&lt;br /&gt;
                        &amp;quot;_links&amp;quot;: {&lt;br /&gt;
                            &amp;quot;concept&amp;quot;: {&lt;br /&gt;
                                &amp;quot;href&amp;quot;: &amp;quot;https://svde.org/places/6252001&amp;quot;&lt;br /&gt;
                            }&lt;br /&gt;
                        }&lt;br /&gt;
                    }&lt;br /&gt;
                ],&lt;br /&gt;
                &amp;quot;_links&amp;quot;: {&lt;br /&gt;
                    &amp;quot;self&amp;quot;: {&lt;br /&gt;
                        &amp;quot;href&amp;quot;: &amp;quot;https://svde.org/subjects/702&amp;quot;&lt;br /&gt;
                    },&lt;br /&gt;
                    &amp;quot;provenances&amp;quot;: {&lt;br /&gt;
                        &amp;quot;href&amp;quot;: &amp;quot;https://svde.org/subjects/702/provenances&amp;quot;&lt;br /&gt;
                    },&lt;br /&gt;
                    &amp;quot;subjectType&amp;quot;: {&lt;br /&gt;
                        &amp;quot;href&amp;quot;: &amp;quot;https://svde.org/subjectTypes/top&amp;quot;&lt;br /&gt;
                    }&lt;br /&gt;
                }&lt;br /&gt;
            },&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;heading&amp;quot;: [&lt;br /&gt;
                    {&lt;br /&gt;
                        &amp;quot;text&amp;quot;: &amp;quot;School libraries&amp;quot;,&lt;br /&gt;
                        &amp;quot;_links&amp;quot;: {&lt;br /&gt;
                            &amp;quot;concept&amp;quot;: {&lt;br /&gt;
                                &amp;quot;href&amp;quot;: &amp;quot;https://svde.org/concepts/1639399888505&amp;quot;&lt;br /&gt;
                            }&lt;br /&gt;
                        }&lt;br /&gt;
                    },&lt;br /&gt;
                    {&lt;br /&gt;
                        &amp;quot;text&amp;quot;: &amp;quot;Activity programs&amp;quot;,&lt;br /&gt;
                        &amp;quot;_links&amp;quot;: {&lt;br /&gt;
                            &amp;quot;concept&amp;quot;: {&lt;br /&gt;
                                &amp;quot;href&amp;quot;: &amp;quot;https://svde.org/concepts/1639399888508&amp;quot;&lt;br /&gt;
                            }&lt;br /&gt;
                        }&lt;br /&gt;
                    },&lt;br /&gt;
                    {&lt;br /&gt;
                        &amp;quot;text&amp;quot;: &amp;quot;United States.&amp;quot;,&lt;br /&gt;
                        &amp;quot;_links&amp;quot;: {&lt;br /&gt;
                            &amp;quot;concept&amp;quot;: {&lt;br /&gt;
                                &amp;quot;href&amp;quot;: &amp;quot;https://svde.org/places/6252001&amp;quot;&lt;br /&gt;
                            }&lt;br /&gt;
                        }&lt;br /&gt;
                    }&lt;br /&gt;
                ],&lt;br /&gt;
                &amp;quot;_links&amp;quot;: {&lt;br /&gt;
                    &amp;quot;self&amp;quot;: {&lt;br /&gt;
                        &amp;quot;href&amp;quot;: &amp;quot;https://svde.org/subjects/703&amp;quot;&lt;br /&gt;
                    },&lt;br /&gt;
                    &amp;quot;provenances&amp;quot;: {&lt;br /&gt;
                        &amp;quot;href&amp;quot;: &amp;quot;https://svde.org/subjects/703/provenances&amp;quot;&lt;br /&gt;
                    },&lt;br /&gt;
                    &amp;quot;subjectType&amp;quot;: {&lt;br /&gt;
                        &amp;quot;href&amp;quot;: &amp;quot;https://svde.org/subjectTypes/top&amp;quot;&lt;br /&gt;
                    }&lt;br /&gt;
                }&lt;br /&gt;
            },&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;heading&amp;quot;: [&lt;br /&gt;
                    {&lt;br /&gt;
                        &amp;quot;text&amp;quot;: &amp;quot;Media programs (Education)&amp;quot;,&lt;br /&gt;
                        &amp;quot;_links&amp;quot;: {&lt;br /&gt;
                            &amp;quot;concept&amp;quot;: {&lt;br /&gt;
                                &amp;quot;href&amp;quot;: &amp;quot;https://svde.org/concepts/1639399888512&amp;quot;&lt;br /&gt;
                            }&lt;br /&gt;
                        }&lt;br /&gt;
                    }&lt;br /&gt;
                ],&lt;br /&gt;
                &amp;quot;_links&amp;quot;: {&lt;br /&gt;
                    &amp;quot;self&amp;quot;: {&lt;br /&gt;
                        &amp;quot;href&amp;quot;: &amp;quot;https://svde.org/subjects/704&amp;quot;&lt;br /&gt;
                    },&lt;br /&gt;
                    &amp;quot;provenances&amp;quot;: {&lt;br /&gt;
                        &amp;quot;href&amp;quot;: &amp;quot;https://svde.org/subjects/704/provenances&amp;quot;&lt;br /&gt;
                    },&lt;br /&gt;
                    &amp;quot;subjectType&amp;quot;: {&lt;br /&gt;
                        &amp;quot;href&amp;quot;: &amp;quot;https://svde.org/subjectTypes/top&amp;quot;&lt;br /&gt;
                    }&lt;br /&gt;
                }&lt;br /&gt;
            }&lt;br /&gt;
        ]&lt;br /&gt;
    },&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Note that being attached to a given Work, each subject provides also its qualification. In the example above the three subjects are all topical subjects (subjectType is &amp;lt;u&amp;gt;&amp;#039;&amp;#039;https://svde.org/subjectTypes/top&amp;#039;&amp;#039;)&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The second endpoint allows to retrieve a specific subject, still belonging to a parent work:&amp;lt;syntaxhighlight lang=&amp;quot;http&amp;quot;&amp;gt;&lt;br /&gt;
https://svde.org/work/{workId}/subjects/702&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;The response contains one element of the response above, which is the subject we requested. &lt;br /&gt;
&lt;br /&gt;
It&amp;#039;s possible to request a subject regardless its relationship with a work. In that case, the request is&amp;lt;syntaxhighlight lang=&amp;quot;http&amp;quot;&amp;gt;&lt;br /&gt;
https://svde.org/subjects/702&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;As you can imagine, the response is similar to the endpoint above with the difference that in this context we don&amp;#039;t have any specific qualification (there&amp;#039;s no Work ownership which qualifies the subject). As a consequence of that, the &amp;quot;subjectType&amp;quot; link reference is not in the response. &lt;br /&gt;
&lt;br /&gt;
The last REST endpoint is used for typeahead search. The ShareVDE advanced search UI provides such features for allowing the end user to select a given subject that will be used as a publication search criteria. &lt;br /&gt;
&lt;br /&gt;
The endpoint in this case:&amp;lt;syntaxhighlight lang=&amp;quot;http&amp;quot;&amp;gt;&lt;br /&gt;
https://svde.org/subjects?q=histo&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;It provides a parameter which consists of the search term entered by the user. The response is a bit different from the examples above because each subject contains the whole subject heading rebuilt from the matching slices, together with highlighting snippets for making evidence about the match (see the &amp;lt;nowiki&amp;gt;&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;/nowiki&amp;gt; html tags in the returned headings):&amp;lt;syntaxhighlight lang=&amp;quot;json&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;_embedded&amp;quot;: {&lt;br /&gt;
        &amp;quot;resourceList&amp;quot;: [&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;uri&amp;quot;: &amp;quot;https://svde.org/subjects/702&amp;quot;,&lt;br /&gt;
                &amp;quot;preferredHeading&amp;quot;: &amp;quot;Library orientation for school children -- United &amp;lt;b&amp;gt;State&amp;lt;/b&amp;gt;s&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;uri&amp;quot;: &amp;quot;https://svde.org/subjects/703&amp;quot;,&lt;br /&gt;
                &amp;quot;preferredHeading&amp;quot;: &amp;quot;School libraries -- Activity programs -- United &amp;lt;b&amp;gt;State&amp;lt;/b&amp;gt;s&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            ...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
==GraphQL API==&lt;br /&gt;
For each endpoint described in the previous section, there&amp;#039;s a corresponding GraphQL query available. Specifically, we can retrieve the subjects of a given work: &amp;lt;syntaxhighlight lang=&amp;quot;json&amp;quot;&amp;gt;&lt;br /&gt;
query Subjects($uri: String!) {&lt;br /&gt;
    work(uri: $uri) {&lt;br /&gt;
        subjects {&lt;br /&gt;
            resources {&lt;br /&gt;
                uri&lt;br /&gt;
                heading {&lt;br /&gt;
                    text&lt;br /&gt;
                    concept {&lt;br /&gt;
                        ... on GenericConcept {&lt;br /&gt;
                            uri&lt;br /&gt;
                        }&lt;br /&gt;
                        ... on Topic {&lt;br /&gt;
                            uri&lt;br /&gt;
                        }           &lt;br /&gt;
                        ... on Date {&lt;br /&gt;
                            uri&lt;br /&gt;
                        }                                       &lt;br /&gt;
                        ... on Event {&lt;br /&gt;
                            uri&lt;br /&gt;
                        }                        &lt;br /&gt;
                        ... on Place {&lt;br /&gt;
                            uri&lt;br /&gt;
                        }&lt;br /&gt;
                        ... on Genre {&lt;br /&gt;
                            uri&lt;br /&gt;
                        }&lt;br /&gt;
                        ... on Form {&lt;br /&gt;
                            uri&lt;br /&gt;
                        }                        &lt;br /&gt;
                        ... on Opus {&lt;br /&gt;
                            uri&lt;br /&gt;
                        }&lt;br /&gt;
                        ... on Person {&lt;br /&gt;
                            uri&lt;br /&gt;
                        }&lt;br /&gt;
                        ... on Organisation {&lt;br /&gt;
                            uri&lt;br /&gt;
                        }&lt;br /&gt;
                        ... on Family {&lt;br /&gt;
                            uri&lt;br /&gt;
                        }&lt;br /&gt;
                        ... on Meeting {&lt;br /&gt;
                            uri&lt;br /&gt;
                        }&lt;br /&gt;
                    }&lt;br /&gt;
                }&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Note the usage of the &amp;quot;... on&amp;quot; construct: this is because a Concept is an abstract class and it doesn&amp;#039;t provide any specific attribute. We need to ask what needs to be done case by case. &lt;br /&gt;
&lt;br /&gt;
The second query retrieves the information about a given subject. Note the heading is split across several slices in the response: &amp;lt;syntaxhighlight lang=&amp;quot;json&amp;quot;&amp;gt;&lt;br /&gt;
query Subject($uri: String!) {&lt;br /&gt;
    subject(uri: $uri) {&lt;br /&gt;
        uri&lt;br /&gt;
        heading {&lt;br /&gt;
            text&lt;br /&gt;
            concept {&lt;br /&gt;
    ...            &lt;br /&gt;
...    &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;json&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;data&amp;quot;: {&lt;br /&gt;
        &amp;quot;subject&amp;quot;: {&lt;br /&gt;
            &amp;quot;uri&amp;quot;: &amp;quot;https://svde.org/subjects/703&amp;quot;,&lt;br /&gt;
            &amp;quot;heading&amp;quot;: [&lt;br /&gt;
                {&lt;br /&gt;
                    &amp;quot;text&amp;quot;: &amp;quot;School libraries&amp;quot;,&lt;br /&gt;
                    &amp;quot;concept&amp;quot;: {&lt;br /&gt;
                        &amp;quot;uri&amp;quot;: &amp;quot;https://svde.org/concepts/1639399888505&amp;quot;&lt;br /&gt;
                    }&lt;br /&gt;
                },&lt;br /&gt;
                {&lt;br /&gt;
                    &amp;quot;text&amp;quot;: &amp;quot;Activity programs&amp;quot;,&lt;br /&gt;
                    &amp;quot;concept&amp;quot;: {&lt;br /&gt;
                        &amp;quot;uri&amp;quot;: &amp;quot;https://svde.org/concepts/1639399888508&amp;quot;&lt;br /&gt;
                    }&lt;br /&gt;
                },&lt;br /&gt;
                {&lt;br /&gt;
                    &amp;quot;text&amp;quot;: &amp;quot;United States.&amp;quot;,&lt;br /&gt;
                    &amp;quot;concept&amp;quot;: {&lt;br /&gt;
                        &amp;quot;uri&amp;quot;: &amp;quot;https://svde.org/places/6252001&amp;quot;&lt;br /&gt;
                    }&lt;br /&gt;
                }&lt;br /&gt;
            ]&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;The last query provides a fulltext/typeahead search capability on top of subjects. Note that, due to the GraphQL data structures overhead, it is strongly recommended to use the REST version for serving typeahead services.&amp;lt;syntaxhighlight lang=&amp;quot;json&amp;quot;&amp;gt;&lt;br /&gt;
query Subjects($q: String!) {&lt;br /&gt;
    subjects(tql:{q: $q}) {&lt;br /&gt;
        resources {&lt;br /&gt;
            uri&lt;br /&gt;
            heading {&lt;br /&gt;
                text        &lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;the response, differently from the REST endpoint, doesn&amp;#039;t rebuild the subject heading. Instead it provides the highlighting snippets directly within the slices: &amp;lt;syntaxhighlight lang=&amp;quot;json&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;data&amp;quot;: {&lt;br /&gt;
        &amp;quot;subjects&amp;quot;: {&lt;br /&gt;
            &amp;quot;resources&amp;quot;: [&lt;br /&gt;
                {&lt;br /&gt;
                    &amp;quot;uri&amp;quot;: &amp;quot;https://svde.org/subjects/702&amp;quot;,&lt;br /&gt;
                    &amp;quot;heading&amp;quot;: [&lt;br /&gt;
                        {&lt;br /&gt;
                            &amp;quot;text&amp;quot;: &amp;quot;Library orientation for school children&amp;quot;&lt;br /&gt;
                        },&lt;br /&gt;
                        {&lt;br /&gt;
                            &amp;quot;text&amp;quot;: &amp;quot;United &amp;lt;b&amp;gt;State&amp;lt;/b&amp;gt;s&amp;quot;&lt;br /&gt;
                        }&lt;br /&gt;
                    ]&lt;br /&gt;
                },&lt;br /&gt;
                {&lt;br /&gt;
                    &amp;quot;uri&amp;quot;: &amp;quot;https://svde.org/subjects/703&amp;quot;,&lt;br /&gt;
                    &amp;quot;heading&amp;quot;: [&lt;br /&gt;
                        {&lt;br /&gt;
                            &amp;quot;text&amp;quot;: &amp;quot;School libraries&amp;quot;&lt;br /&gt;
                        },&lt;br /&gt;
                        {&lt;br /&gt;
                            &amp;quot;text&amp;quot;: &amp;quot;Activity programs&amp;quot;&lt;br /&gt;
                        },&lt;br /&gt;
                        {&lt;br /&gt;
                            &amp;quot;text&amp;quot;: &amp;quot;United &amp;lt;b&amp;gt;State&amp;lt;/b&amp;gt;s&amp;quot;&lt;br /&gt;
                        }&lt;br /&gt;
                    ]&lt;br /&gt;
                },&lt;br /&gt;
                {&lt;br /&gt;
                    &amp;quot;uri&amp;quot;: &amp;quot;https://svde.org/subjects/707&amp;quot;,&lt;br /&gt;
                    &amp;quot;heading&amp;quot;: [&lt;br /&gt;
                        {&lt;br /&gt;
                            &amp;quot;text&amp;quot;: &amp;quot;College students&amp;quot;&lt;br /&gt;
                        },&lt;br /&gt;
                        {&lt;br /&gt;
                            &amp;quot;text&amp;quot;: &amp;quot;United &amp;lt;b&amp;gt;State&amp;lt;/b&amp;gt;s&amp;quot;&lt;br /&gt;
                        },&lt;br /&gt;
                        {&lt;br /&gt;
                            &amp;quot;text&amp;quot;: &amp;quot;Finance, Personal.&amp;quot;&lt;br /&gt;
                        }&lt;br /&gt;
                    ]&lt;br /&gt;
                },&lt;br /&gt;
                {&lt;br /&gt;
                    &amp;quot;uri&amp;quot;: &amp;quot;https://svde.org/subjects/708&amp;quot;,&lt;br /&gt;
                    &amp;quot;heading&amp;quot;: [&lt;br /&gt;
                        {&lt;br /&gt;
                            &amp;quot;text&amp;quot;: &amp;quot;Youth&amp;quot;&lt;br /&gt;
                        },&lt;br /&gt;
                        {&lt;br /&gt;
                            &amp;quot;text&amp;quot;: &amp;quot;United &amp;lt;b&amp;gt;State&amp;lt;/b&amp;gt;s&amp;quot;&lt;br /&gt;
                        },&lt;br /&gt;
                        {&lt;br /&gt;
                            &amp;quot;text&amp;quot;: &amp;quot;Finance, Personal.&amp;quot;&lt;br /&gt;
                        }&lt;br /&gt;
                    ]&lt;br /&gt;
                },&lt;br /&gt;
                {&lt;br /&gt;
                    &amp;quot;uri&amp;quot;: &amp;quot;https://svde.org/subjects/709&amp;quot;,&lt;br /&gt;
                    &amp;quot;heading&amp;quot;: [&lt;br /&gt;
                        {&lt;br /&gt;
                            &amp;quot;text&amp;quot;: &amp;quot;Young adults&amp;quot;&lt;br /&gt;
                        },&lt;br /&gt;
                        {&lt;br /&gt;
                            &amp;quot;text&amp;quot;: &amp;quot;United &amp;lt;b&amp;gt;State&amp;lt;/b&amp;gt;s&amp;quot;&lt;br /&gt;
                        },&lt;br /&gt;
                        {&lt;br /&gt;
                            &amp;quot;text&amp;quot;: &amp;quot;Finance, Personal.&amp;quot;&lt;br /&gt;
                        }&lt;br /&gt;
                    ]&lt;br /&gt;
                },&lt;br /&gt;
                {&lt;br /&gt;
                    &amp;quot;uri&amp;quot;: &amp;quot;https://svde.org/subjects/723&amp;quot;,&lt;br /&gt;
                    &amp;quot;heading&amp;quot;: [&lt;br /&gt;
                        {&lt;br /&gt;
                            &amp;quot;text&amp;quot;: &amp;quot;Dissertations, Academic&amp;quot;&lt;br /&gt;
                        },&lt;br /&gt;
                        {&lt;br /&gt;
                            &amp;quot;text&amp;quot;: &amp;quot;United &amp;lt;b&amp;gt;State&amp;lt;/b&amp;gt;s&amp;quot;&lt;br /&gt;
                        },&lt;br /&gt;
                        {&lt;br /&gt;
                            &amp;quot;text&amp;quot;: &amp;quot;Bibliography&amp;quot;&lt;br /&gt;
                        }&lt;br /&gt;
                    ]&lt;br /&gt;
                },&lt;br /&gt;
                {&lt;br /&gt;
                    &amp;quot;uri&amp;quot;: &amp;quot;https://svde.org/subjects/724&amp;quot;,&lt;br /&gt;
                    &amp;quot;heading&amp;quot;: [&lt;br /&gt;
                        {&lt;br /&gt;
                            &amp;quot;text&amp;quot;: &amp;quot;Dissertations, Academic&amp;quot;&lt;br /&gt;
                        },&lt;br /&gt;
                        {&lt;br /&gt;
                            &amp;quot;text&amp;quot;: &amp;quot;United &amp;lt;b&amp;gt;State&amp;lt;/b&amp;gt;s&amp;quot;&lt;br /&gt;
                        }&lt;br /&gt;
                    ]&lt;br /&gt;
                }&lt;br /&gt;
            ]&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;The following query is instead a subject which provides a variant.&amp;lt;syntaxhighlight lang=&amp;quot;json&amp;quot;&amp;gt;&lt;br /&gt;
query {&lt;br /&gt;
  subject(uri: &amp;quot;https://svde.org/subjects/721&amp;quot;){&lt;br /&gt;
    notes&lt;br /&gt;
    heading {&lt;br /&gt;
          concept {&lt;br /&gt;
            __typename&lt;br /&gt;
            ... on Genre {&lt;br /&gt;
              uri&lt;br /&gt;
              label&lt;br /&gt;
            }&lt;br /&gt;
&lt;br /&gt;
            ... on GenericConcept {&lt;br /&gt;
              uri&lt;br /&gt;
              label&lt;br /&gt;
              altLabels&lt;br /&gt;
            }&lt;br /&gt;
          }&lt;br /&gt;
        }&lt;br /&gt;
    variants {&lt;br /&gt;
      resources {&lt;br /&gt;
        uri&lt;br /&gt;
        heading {&lt;br /&gt;
          concept {&lt;br /&gt;
            __typename&lt;br /&gt;
            ... on GenericConcept {&lt;br /&gt;
              uri&lt;br /&gt;
              label&lt;br /&gt;
              altLabels&lt;br /&gt;
              &lt;br /&gt;
            }&lt;br /&gt;
          }&lt;br /&gt;
        }&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;and here&amp;#039;s the response:&amp;lt;syntaxhighlight lang=&amp;quot;json&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;data&amp;quot;: {&lt;br /&gt;
    &amp;quot;subject&amp;quot;: {&lt;br /&gt;
      &amp;quot;notes&amp;quot;: [],&lt;br /&gt;
      &amp;quot;heading&amp;quot;: [&lt;br /&gt;
        {&lt;br /&gt;
          &amp;quot;concept&amp;quot;: {&lt;br /&gt;
            &amp;quot;__typename&amp;quot;: &amp;quot;Genre&amp;quot;,&lt;br /&gt;
            &amp;quot;uri&amp;quot;: &amp;quot;https://svde.org/genres/gf2014026333&amp;quot;,&lt;br /&gt;
            &amp;quot;label&amp;quot;: &amp;quot;Fantasy fiction&amp;quot;&lt;br /&gt;
          }&lt;br /&gt;
        },&lt;br /&gt;
        {&lt;br /&gt;
          &amp;quot;concept&amp;quot;: {&lt;br /&gt;
            &amp;quot;__typename&amp;quot;: &amp;quot;GenericConcept&amp;quot;,&lt;br /&gt;
            &amp;quot;uri&amp;quot;: &amp;quot;https://svde.org/concepts/1695141910611&amp;quot;,&lt;br /&gt;
            &amp;quot;label&amp;quot;: &amp;quot;Congresses.&amp;quot;,&lt;br /&gt;
            &amp;quot;altLabels&amp;quot;: []&lt;br /&gt;
          }&lt;br /&gt;
        }&lt;br /&gt;
      ],&lt;br /&gt;
      &amp;quot;variants&amp;quot;: {&lt;br /&gt;
        &amp;quot;resources&amp;quot;: [&lt;br /&gt;
          {&lt;br /&gt;
            &amp;quot;uri&amp;quot;: &amp;quot;https://svde.org/subjects/701&amp;quot;,&lt;br /&gt;
            &amp;quot;heading&amp;quot;: [&lt;br /&gt;
              {&lt;br /&gt;
                &amp;quot;concept&amp;quot;: {&lt;br /&gt;
                  &amp;quot;__typename&amp;quot;: &amp;quot;GenericConcept&amp;quot;,&lt;br /&gt;
                  &amp;quot;uri&amp;quot;: &amp;quot;https://svde.org/concepts/1695141910541&amp;quot;,&lt;br /&gt;
                  &amp;quot;label&amp;quot;: &amp;quot;Fantasy&amp;quot;,&lt;br /&gt;
                  &amp;quot;altLabels&amp;quot;: []&lt;br /&gt;
                }&lt;br /&gt;
              }&lt;br /&gt;
            ]&lt;br /&gt;
          }&lt;br /&gt;
        ]&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;br /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Andrea Gazzarini</name></author>
	</entry>
</feed>