Reference Manual (API Version 1.9)
Filter and sort examples
As documented in the Data rows service, multiple filter and sort parameters may be used to refine the data results from a table. This section combines these parameters for specific use cases. After each example, you may click the “Interactive demo” link to edit and customize the query yourself.
For more information about the content domains and rating scales available in the O*NET Database, see the O*NET Data Dictionary.
Example 1: Most important knowledge areas for architects
- knowledge data table
- filter=onetsoc_code.eq.17-1011.00 — to limit results to the occupation “Architects, Except Landscape and Naval”
- filter=scale_id.eq.IM — to examine Importance ratings specifically
- filter=data_value.gte.3 — to return Content Model descriptors scoring 50% or higher on the 1-to-5 Importance scale
- sort=data_value.descending — to return the highest-rated descriptors first
- sort=element_name — in case of tied ratings, return descriptors in alphabetical order
JSON
XML
{
"info" : "https://services.onetcenter.org/v1.9/ws/database/info/knowledge",
"start" : 1,
"end" : 18,
"total" : 18,
"table_id" : "knowledge",
"filter" : [
"onetsoc_code.eq.17-1011.00",
"scale_id.eq.IM",
"data_value.gte.3"
],
"sort" : [
"data_value.descending",
"element_name.ascending"
],
"row" : [
{
"onetsoc_code" : "17-1011.00",
"title" : "Architects, Except Landscape and Naval",
"element_id" : "2.C.3.c",
"element_name" : "Design",
"scale_id" : "IM",
"scale_name" : "Importance",
"data_value" : 4.9,
"n" : 20,
"standard_error" : null,
"lower_ci_bound" : null,
"upper_ci_bound" : null,
"recommend_suppress" : null,
"not_relevant" : null,
"date_updated" : "2021-08-01",
"domain_source" : "Occupational Expert"
},
{
"onetsoc_code" : "17-1011.00",
"title" : "Architects, Except Landscape and Naval",
"element_id" : "2.C.3.d",
"element_name" : "Building and Construction",
"scale_id" : "IM",
"scale_name" : "Importance",
"data_value" : 4.81,
"n" : 21,
"standard_error" : null,
"lower_ci_bound" : null,
"upper_ci_bound" : null,
"recommend_suppress" : null,
"not_relevant" : null,
"date_updated" : "2021-08-01",
"domain_source" : "Occupational Expert"
},
...
]
}
"info" : "https://services.onetcenter.org/v1.9/ws/database/info/knowledge",
"start" : 1,
"end" : 18,
"total" : 18,
"table_id" : "knowledge",
"filter" : [
"onetsoc_code.eq.17-1011.00",
"scale_id.eq.IM",
"data_value.gte.3"
],
"sort" : [
"data_value.descending",
"element_name.ascending"
],
"row" : [
{
"onetsoc_code" : "17-1011.00",
"title" : "Architects, Except Landscape and Naval",
"element_id" : "2.C.3.c",
"element_name" : "Design",
"scale_id" : "IM",
"scale_name" : "Importance",
"data_value" : 4.9,
"n" : 20,
"standard_error" : null,
"lower_ci_bound" : null,
"upper_ci_bound" : null,
"recommend_suppress" : null,
"not_relevant" : null,
"date_updated" : "2021-08-01",
"domain_source" : "Occupational Expert"
},
{
"onetsoc_code" : "17-1011.00",
"title" : "Architects, Except Landscape and Naval",
"element_id" : "2.C.3.d",
"element_name" : "Building and Construction",
"scale_id" : "IM",
"scale_name" : "Importance",
"data_value" : 4.81,
"n" : 21,
"standard_error" : null,
"lower_ci_bound" : null,
"upper_ci_bound" : null,
"recommend_suppress" : null,
"not_relevant" : null,
"date_updated" : "2021-08-01",
"domain_source" : "Occupational Expert"
},
...
]
}
JSON
XML
<rows info="https://services.onetcenter.org/v1.9/ws/database/info/knowledge" start="1" end="18" total="18">
<table_id>knowledge</table_id>
<filter>onetsoc_code.eq.17-1011.00</filter>
<filter>scale_id.eq.IM</filter>
<filter>data_value.gte.3</filter>
<sort>data_value.descending</sort>
<sort>element_name.ascending</sort>
<row>
<onetsoc_code>17-1011.00</onetsoc_code>
<title>Architects, Except Landscape and Naval</title>
<element_id>2.C.3.c</element_id>
<element_name>Design</element_name>
<scale_id>IM</scale_id>
<scale_name>Importance</scale_name>
<data_value>4.9</data_value>
<n>20</n>
<standard_error></standard_error>
<lower_ci_bound></lower_ci_bound>
<upper_ci_bound></upper_ci_bound>
<recommend_suppress></recommend_suppress>
<not_relevant></not_relevant>
<date_updated>2021-08-01</date_updated>
<domain_source>Occupational Expert</domain_source>
</row>
<row>
<onetsoc_code>17-1011.00</onetsoc_code>
<title>Architects, Except Landscape and Naval</title>
<element_id>2.C.3.d</element_id>
<element_name>Building and Construction</element_name>
<scale_id>IM</scale_id>
<scale_name>Importance</scale_name>
<data_value>4.81</data_value>
<n>21</n>
<standard_error></standard_error>
<lower_ci_bound></lower_ci_bound>
<upper_ci_bound></upper_ci_bound>
<recommend_suppress></recommend_suppress>
<not_relevant></not_relevant>
<date_updated>2021-08-01</date_updated>
<domain_source>Occupational Expert</domain_source>
</row>
...
</rows>
<table_id>knowledge</table_id>
<filter>onetsoc_code.eq.17-1011.00</filter>
<filter>scale_id.eq.IM</filter>
<filter>data_value.gte.3</filter>
<sort>data_value.descending</sort>
<sort>element_name.ascending</sort>
<row>
<onetsoc_code>17-1011.00</onetsoc_code>
<title>Architects, Except Landscape and Naval</title>
<element_id>2.C.3.c</element_id>
<element_name>Design</element_name>
<scale_id>IM</scale_id>
<scale_name>Importance</scale_name>
<data_value>4.9</data_value>
<n>20</n>
<standard_error></standard_error>
<lower_ci_bound></lower_ci_bound>
<upper_ci_bound></upper_ci_bound>
<recommend_suppress></recommend_suppress>
<not_relevant></not_relevant>
<date_updated>2021-08-01</date_updated>
<domain_source>Occupational Expert</domain_source>
</row>
<row>
<onetsoc_code>17-1011.00</onetsoc_code>
<title>Architects, Except Landscape and Naval</title>
<element_id>2.C.3.d</element_id>
<element_name>Building and Construction</element_name>
<scale_id>IM</scale_id>
<scale_name>Importance</scale_name>
<data_value>4.81</data_value>
<n>21</n>
<standard_error></standard_error>
<lower_ci_bound></lower_ci_bound>
<upper_ci_bound></upper_ci_bound>
<recommend_suppress></recommend_suppress>
<not_relevant></not_relevant>
<date_updated>2021-08-01</date_updated>
<domain_source>Occupational Expert</domain_source>
</row>
...
</rows>
Example 2: Occupations requiring the most physical stamina
- abilities data table
- filter=element_id.eq.1.A.3.b.1 — to limit results to the “Stamina” Content Model descriptor
- filter=scale_id.eq.LV — to examine Level ratings specifically
- sort=data_value.descending — to return the highest-rated occupations first
- start=1&end=5 — to return the top five occupations
JSON
XML
{
"info" : "https://services.onetcenter.org/v1.9/ws/database/info/abilities",
"start" : 1,
"end" : 5,
"total" : 879,
"link" : [
{
"href" : "https://services.onetcenter.org/v1.9/ws/database/rows/abilities?filter=element_id.eq.1.A.3.b.1&filter=scale_id.eq.LV&sort=data_value.descending&start=6&end=10",
"rel" : "next"
}
],
"table_id" : "abilities",
"filter" : [
"element_id.eq.1.A.3.b.1",
"scale_id.eq.LV"
],
"sort" : [
"data_value.descending"
],
"row" : [
{
"onetsoc_code" : "27-2031.00",
"title" : "Dancers",
"element_id" : "1.A.3.b.1",
"element_name" : "Stamina",
"scale_id" : "LV",
"scale_name" : "Level",
"data_value" : 4.62,
"n" : 8,
"standard_error" : 0.183,
"lower_ci_bound" : 4.2664,
"upper_ci_bound" : 4.9836,
"recommend_suppress" : "N",
"not_relevant" : "N",
"date_updated" : "2019-08-01",
"domain_source" : "Analyst"
},
{
"onetsoc_code" : "27-2021.00",
"title" : "Athletes and Sports Competitors",
"element_id" : "1.A.3.b.1",
"element_name" : "Stamina",
"scale_id" : "LV",
"scale_name" : "Level",
"data_value" : 4,
"n" : 8,
"standard_error" : 0.189,
"lower_ci_bound" : 3.6296,
"upper_ci_bound" : 4.3704,
"recommend_suppress" : "N",
"not_relevant" : "N",
"date_updated" : "2016-07-01",
"domain_source" : "Analyst"
},
...
]
}
"info" : "https://services.onetcenter.org/v1.9/ws/database/info/abilities",
"start" : 1,
"end" : 5,
"total" : 879,
"link" : [
{
"href" : "https://services.onetcenter.org/v1.9/ws/database/rows/abilities?filter=element_id.eq.1.A.3.b.1&filter=scale_id.eq.LV&sort=data_value.descending&start=6&end=10",
"rel" : "next"
}
],
"table_id" : "abilities",
"filter" : [
"element_id.eq.1.A.3.b.1",
"scale_id.eq.LV"
],
"sort" : [
"data_value.descending"
],
"row" : [
{
"onetsoc_code" : "27-2031.00",
"title" : "Dancers",
"element_id" : "1.A.3.b.1",
"element_name" : "Stamina",
"scale_id" : "LV",
"scale_name" : "Level",
"data_value" : 4.62,
"n" : 8,
"standard_error" : 0.183,
"lower_ci_bound" : 4.2664,
"upper_ci_bound" : 4.9836,
"recommend_suppress" : "N",
"not_relevant" : "N",
"date_updated" : "2019-08-01",
"domain_source" : "Analyst"
},
{
"onetsoc_code" : "27-2021.00",
"title" : "Athletes and Sports Competitors",
"element_id" : "1.A.3.b.1",
"element_name" : "Stamina",
"scale_id" : "LV",
"scale_name" : "Level",
"data_value" : 4,
"n" : 8,
"standard_error" : 0.189,
"lower_ci_bound" : 3.6296,
"upper_ci_bound" : 4.3704,
"recommend_suppress" : "N",
"not_relevant" : "N",
"date_updated" : "2016-07-01",
"domain_source" : "Analyst"
},
...
]
}
JSON
XML
<rows info="https://services.onetcenter.org/v1.9/ws/database/info/abilities" start="1" end="5" total="879">
<link href="https://services.onetcenter.org/v1.9/ws/database/rows/abilities?filter=element_id.eq.1.A.3.b.1&filter=scale_id.eq.LV&sort=data_value.descending&start=6&end=10" rel="next" />
<table_id>abilities</table_id>
<filter>element_id.eq.1.A.3.b.1</filter>
<filter>scale_id.eq.LV</filter>
<sort>data_value.descending</sort>
<row>
<onetsoc_code>27-2031.00</onetsoc_code>
<title>Dancers</title>
<element_id>1.A.3.b.1</element_id>
<element_name>Stamina</element_name>
<scale_id>LV</scale_id>
<scale_name>Level</scale_name>
<data_value>4.62</data_value>
<n>8</n>
<standard_error>0.183</standard_error>
<lower_ci_bound>4.2664</lower_ci_bound>
<upper_ci_bound>4.9836</upper_ci_bound>
<recommend_suppress>N</recommend_suppress>
<not_relevant>N</not_relevant>
<date_updated>2019-08-01</date_updated>
<domain_source>Analyst</domain_source>
</row>
<row>
<onetsoc_code>27-2021.00</onetsoc_code>
<title>Athletes and Sports Competitors</title>
<element_id>1.A.3.b.1</element_id>
<element_name>Stamina</element_name>
<scale_id>LV</scale_id>
<scale_name>Level</scale_name>
<data_value>4</data_value>
<n>8</n>
<standard_error>0.189</standard_error>
<lower_ci_bound>3.6296</lower_ci_bound>
<upper_ci_bound>4.3704</upper_ci_bound>
<recommend_suppress>N</recommend_suppress>
<not_relevant>N</not_relevant>
<date_updated>2016-07-01</date_updated>
<domain_source>Analyst</domain_source>
</row>
...
</rows>
<link href="https://services.onetcenter.org/v1.9/ws/database/rows/abilities?filter=element_id.eq.1.A.3.b.1&filter=scale_id.eq.LV&sort=data_value.descending&start=6&end=10" rel="next" />
<table_id>abilities</table_id>
<filter>element_id.eq.1.A.3.b.1</filter>
<filter>scale_id.eq.LV</filter>
<sort>data_value.descending</sort>
<row>
<onetsoc_code>27-2031.00</onetsoc_code>
<title>Dancers</title>
<element_id>1.A.3.b.1</element_id>
<element_name>Stamina</element_name>
<scale_id>LV</scale_id>
<scale_name>Level</scale_name>
<data_value>4.62</data_value>
<n>8</n>
<standard_error>0.183</standard_error>
<lower_ci_bound>4.2664</lower_ci_bound>
<upper_ci_bound>4.9836</upper_ci_bound>
<recommend_suppress>N</recommend_suppress>
<not_relevant>N</not_relevant>
<date_updated>2019-08-01</date_updated>
<domain_source>Analyst</domain_source>
</row>
<row>
<onetsoc_code>27-2021.00</onetsoc_code>
<title>Athletes and Sports Competitors</title>
<element_id>1.A.3.b.1</element_id>
<element_name>Stamina</element_name>
<scale_id>LV</scale_id>
<scale_name>Level</scale_name>
<data_value>4</data_value>
<n>8</n>
<standard_error>0.189</standard_error>
<lower_ci_bound>3.6296</lower_ci_bound>
<upper_ci_bound>4.3704</upper_ci_bound>
<recommend_suppress>N</recommend_suppress>
<not_relevant>N</not_relevant>
<date_updated>2016-07-01</date_updated>
<domain_source>Analyst</domain_source>
</row>
...
</rows>
In this section
- Database Services
- List of data tables
- Table column information
- Data rows
- Filter and sort examples