The “allterms” command
- Last Updated: May 13, 2026
- 4 minute read
- Semaphore
- Documentation
The “allterms” command will return all the terms within the model. Usually this command will be combined with one or more filter parameters so that only a subsection of the model is returned.
Note: This command should not be used to obtain a complete copy of a given model as its use can consume huge amounts of server resources and there is a physical limit on the number of concepts that can be returned for a single API call. Preferable methods for model copying include using successive calls to the hierarchy command or using KMM model export functionality.
This functionality, like the other SES functionalities, is designed to support user interactions. The purpose of all terms is to populate simple lists in interactive system. For instance a small model with 30 entries in a tree with 4 top level nodes and 3 levels. In this case “allterms” will return the model in one JSON payload and the calling application can render the tree control with all values cached. The same could be true for a larger model if a restrictive filter is applied. For all scenarios where the returned payload will be larger than a few kilobytes standard UI and UX design best practices recommend progressive disclosure; in the tree control example mentioned above that would be lazy loading, level by level using the hierarchy command.
| Request | XML output | JSON output |
|---|---|---|
| REST request: | http://localhost:8983/ses/SpaceMissions/allterms |
http://localhost:8983/ses/SpaceMissions/allterms.json |
| CGI request: | http://localhost:8983/ses/?TBDB=SpaceMissions&service=allterms |
http://localhost:8983/ses/?TBDB=SpaceMissions&service=allterms&template=service.json |
Additional Parameter Options
- callback
- childLimit
- class
- facet
- filter
- language
- maxresultcount
- mindocs
- relatedConceptLimit
- sortField
- timezone
Response
XML
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<SEMAPHORE>
<PARAMETERS>
<PARAMETER NAME="relatedconceptlimit">10000</PARAMETER>
<PARAMETER NAME="q">content_type:concept content_type:concept_scheme</PARAMETER>
<PARAMETER NAME="pathelementlimit">10000</PARAMETER>
<PARAMETER NAME="fl">json_en id</PARAMETER>
<PARAMETER NAME="language">en</PARAMETER>
<PARAMETER NAME="language">en</PARAMETER>
<PARAMETER NAME="language">en</PARAMETER>
<PARAMETER NAME="sort">name_en_pl asc</PARAMETER>
<PARAMETER NAME="rows">100000</PARAMETER>
<PARAMETER NAME="version">1</PARAMETER>
<PARAMETER NAME="wt">sesConceptsXML</PARAMETER>
<PARAMETER NAME="structure">XML</PARAMETER>
<PARAMETER NAME="command">term</PARAMETER>
<PARAMETER NAME="rid">127.0.0.1-38</PARAMETER>
</PARAMETERS>
<TERMS count="554">
<TERM URI="http://models.smartlogic.com/SpaceMissions#Abdul_Ahad_Mohmand">
<NAME>Abdul Ahad Mohmand</NAME>
<ID>f6deadef-0452-40b7-b2cf-c5834fb9aea5</ID>
<DISPLAY_NAME>Abdul Ahad Mohmand</DISPLAY_NAME>
<FREQUENCY>0</FREQUENCY>
<CLASSES>
<CLASS>Astronaut</CLASS>
</CLASSES>
<FACETS>
<FACET ID="bfc33274-197f-4873-a1f4-f421c8ab64aa" NAME="People"/>
</FACETS>
<HIERARCHY QTY="1" TYPE="Broader Term">
<FIELD FREQ="0" ID="321c7af1-f8ff-45c2-ac53-60dfcd624b77" NAME="Interkosmos">
<CLASS NAME="Organization"/>
</FIELD>
</HIERARCHY>
<ASSOCIATED QTY="2" TYPE="crewed">
<FIELD FREQ="0" ID="7a876cf7-20c2-41e2-8d2a-c951b59e4562" NAME="Soyuz TM-5">
<CLASS NAME="Mission"/>
</FIELD>
<FIELD FREQ="0" ID="83caab0a-9c2d-460e-a305-c32843c62dd9" NAME="Soyuz TM-6">
<CLASS NAME="Mission"/>
</FIELD>
</ASSOCIATED>
<PATH TYPE="Narrower Term">
<FIELD FREQ="0" ID="bfc33274-197f-4873-a1f4-f421c8ab64aa" NAME="People">
<CLASS NAME="Concept Scheme"/>
</FIELD>
<FIELD FREQ="0" ID="321c7af1-f8ff-45c2-ac53-60dfcd624b77" NAME="Interkosmos">
<CLASS NAME="Organization"/>
</FIELD>
<FIELD FREQ="0" ID="f6deadef-0452-40b7-b2cf-c5834fb9aea5" NAME="Abdul Ahad Mohmand">
<CLASS NAME="Astronaut"/>
</FIELD>
</PATH>
<METADATA>
<FIELD NAME="Illustration"><img src="https://images.smartlogic.com/SpaceMissions/AbdulMohmand.jpg" width="200" /></FIELD>
<FIELD NAME="definition">Abdul Ahad Momand (Pashto: عبد الاحد مومند, born January 1, 1959) is a former Afghan Air Force aviator who became the first Afghan and 4th Muslim to journey to outer space. He became one of Soyuz TM-6 crew members and spent nine days aboard the Mir space station in 1988 as an Intercosmos Research Cosmonaut. He became the fourth Muslim to visit outer space, after Sultan bin Salman Al Saud, Muhammed Faris, and Musa Manarov. Pashto is considered the fourth spoken language in space after he made a telephone call to Afghanistan. Momand is also believed to be the first Muslim who took the Qur'an to the space.</FIELD>
<FIELD NAME="URI">http://models.smartlogic.com/SpaceMissions#Abdul_Ahad_Mohmand</FIELD>
<FIELD NAME="Wikidata URI">http://www.wikidata.org/entity/Q77349</FIELD>
<FIELD NAME="DBPedia URI">http://dbpedia.org/resource/Abdul_Ahad_Mohmand</FIELD>
</METADATA>
</TERM>
.
.
.
</TERMS>
</SEMAPHORE>
JSON
{
"parameters" : {
"relatedconceptlimit" : "10000",
"q" : "content_type:concept content_type:concept_scheme",
"pathelementlimit" : "10000",
"fl" : "json_en id",
"language" : "\"en\", \"en\", \"en\"",
"sort" : "name_en_pl asc",
"rows" : "100000",
"version" : "1",
"wt" : "sesConceptsJSON",
"structure" : "JSON",
"command" : "term",
"rid" : "127.0.0.1-39"
},
"terms" : [ {
"term" : {
"name" : "Abdul Ahad Mohmand",
"displayName" : "Abdul Ahad Mohmand",
"id" : "f6deadef-0452-40b7-b2cf-c5834fb9aea5",
"uri" : "http://models.smartlogic.com/SpaceMissions#Abdul_Ahad_Mohmand",
"classes" : [ "Astronaut" ],
"facets" : [ {
"name" : "People",
"freq" : 0,
"id" : "bfc33274-197f-4873-a1f4-f421c8ab64aa"
} ],
"freq" : "0",
"documents" : "0",
"metadata" : {
"Illustration" : [ "<img src=\"https://images.smartlogic.com/SpaceMissions/AbdulMohmand.jpg\" width=\"200\" />" ],
"definition" : [ "Abdul Ahad Momand (Pashto: عبد الاحد مومند, born January 1, 1959) is a former Afghan Air Force aviator who became the first Afghan and 4th Muslim to journey to outer space. He became one of Soyuz TM-6 crew members and spent nine days aboard the Mir space station in 1988 as an Intercosmos Research Cosmonaut. He became the fourth Muslim to visit outer space, after Sultan bin Salman Al Saud, Muhammed Faris, and Musa Manarov. Pashto is considered the fourth spoken language in space after he made a telephone call to Afghanistan. Momand is also believed to be the first Muslim who took the Qur'an to the space." ],
"URI" : "http://models.smartlogic.com/SpaceMissions#Abdul_Ahad_Mohmand",
"Wikidata URI" : [ "http://www.wikidata.org/entity/Q77349" ],
"DBPedia URI" : [ "http://dbpedia.org/resource/Abdul_Ahad_Mohmand" ]
},
"equivalence" : [ ],
"hierarchy" : [ {
"qty" : "1",
"name" : "Broader Term",
"fields" : [ {
"field" : {
"classes" : [ "Organization" ],
"name" : "Interkosmos",
"freq" : 0,
"id" : "321c7af1-f8ff-45c2-ac53-60dfcd624b77"
}
} ]
} ],
"associated" : [ {
"qty" : "2",
"name" : "crewed",
"fields" : [ {
"field" : {
"classes" : [ "Mission" ],
"name" : "Soyuz TM-5",
"freq" : 0,
"id" : "7a876cf7-20c2-41e2-8d2a-c951b59e4562"
}
}, {
"field" : {
"classes" : [ "Mission" ],
"name" : "Soyuz TM-6",
"freq" : 0,
"id" : "83caab0a-9c2d-460e-a305-c32843c62dd9"
}
} ]
} ],
"paths" : [ {
"path" : [ {
"field" : {
"classes" : [ "Concept Scheme" ],
"name" : "People",
"freq" : 0,
"id" : "bfc33274-197f-4873-a1f4-f421c8ab64aa"
}
}, {
"field" : {
"classes" : [ "Organization" ],
"name" : "Interkosmos",
"freq" : 0,
"id" : "321c7af1-f8ff-45c2-ac53-60dfcd624b77"
}
}, {
"field" : {
"classes" : [ "Astronaut" ],
"name" : "Abdul Ahad Mohmand",
"freq" : 0,
"id" : "f6deadef-0452-40b7-b2cf-c5834fb9aea5"
}
} ],
"name" : "Narrower Term"
} ]
}
},
.
.
.
"total" : "554"
}