Skip to Content

Get Occupations Reports

GET
/v1/occupationsreports/{userId}/{reporttype}/{location}/{education}/{sortColumns}/{sortDirections}/{startRecord}/{limitRecord}
Parameters
string


api token is required field
string


userId is required field
string

ex: FG (Fastest-Growing Occupations),HP,MO,LE,DE

reporttype is required field
string

ex: state (VA) or US for national data

location is required field
string

filter: default value is 0

education is required field
string

ex: FMT_PCHG,OCCTITLE
Default value is 0 for relevance

sortColumns is required field
string

ex: ASC or DESC
Default value is 0 for relevance

sortDirections is required field
integer

ex: 0

startRecord is required field
integer

ex: 10

limitRecord is required field

Example Code

using System;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Threading.Tasks;

namespace CareerOneStopAPISample
{
    class Program
    {
        static void Main(string[] args)
        {
            CreateRequest().Wait();
        }
        private static async Task CreateRequest()
        {
    
            var uri = new UriBuilder(Uri.UriSchemeHttps, "api.careeronestop.org")
            {
                Path = "/v1/occupationsreports/{userId}/{reporttype}/{location}/{education}/{sortColumns}/{sortDirections}/{startRecord}/{limitRecord}"
            };
            
            using (var http = new HttpClient())
            {
                http.DefaultRequestHeaders.Accept.Clear();
                http.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", "API Token");
                http.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
                var response = await http.GetAsync(uri.Uri).ConfigureAwait(false);
                if (response.IsSuccessStatusCode)
                {
                    var result = await response.Content.ReadAsStringAsync().ConfigureAwait(false);
                }
            }
        }
    }
}
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
import org.apache.http.HttpEntity;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.utils.URIBuilder;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.util.EntityUtils;

public class CareerOneStopAPISample {
    public static void main(String[] args) throws IOException, URISyntaxException {
	URI uri = new URIBuilder()
		.setScheme("https")
		.setHost("api.careeronestop.org")
		.setPath("/v1/occupationsreports/{userId}/{reporttype}/{location}/{education}/{sortColumns}/{sortDirections}/{startRecord}/{limitRecord}")
		.build();
	CloseableHttpResponse response = null;
	HttpGet httpGet = null;
	try {
		CloseableHttpClient httpClient = HttpClients.createDefault();
		httpGet = new HttpGet(uri);
		httpGet.setHeader("Content-Type","application/json");
		httpGet.setHeader("Authorization", "Bearer API Token");
		response = httpClient.execute(httpGet);
		HttpEntity entity = response.getEntity();
		System.out.println(EntityUtils.toString(entity));
	} finally {
		if(httpGet != null) httpGet.releaseConnection();
		if(response != null) response.close();
	}
   }
}


Response Structure
                        {
  "OccupationsList": {
    "Occupations": [
      {
        "Rank": 1,
        "ID": "string",
        "OccupationTitle": "string",
        "EstYear": "string",
        "ProjYear": "string",
        "PercentChange": "string",
        "StateAbbrev": "string",
        "StateName": "string",
        "StateFips": "string",
        "Quartitle": "string",
        "Definition": "string",
        "TypicalEducation": "string",
        "SocCode": "string",
        "EducationTitle": [
          {
            "Name": "string",
            "Value": "string"
          }
        ],
        "EstimatedEmployment": "string",
        "ProjectedEmployment": "string",
        "ProjectedAnnualJobOpening": "string",
        "JobFamily": "string",
        "OptStatus": "string",
        "NodeID": "string",
        "Level": "string",
        "Median": "string",
        "Annualizedwage": "string",
        "HourlyWage": "string"
      }
    ],
    "RecordCount": 1,
    "AreaValidationErr": "string",
    "AreaRecordCountList": [
      {
        "Item": "string",
        "Count": 2,
        "Value": "string"
      }
    ],
    "EducationTitle": {
      "UndoList": [
        {
          "Item": "string",
          "Count": 2,
          "Value": "string"
        }
      ],
      "FilterList": [
        {
          "Item": "string",
          "Count": 2,
          "Value": "string"
        }
      ]
    }
  }
}
                    
                        <OccupationsReports xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/XPAND.CareerOneStop.WebApi.ViewModels">
  <OccupationsList>
    <AreaRecordCountList>
      <ItemCount>
        <Count>2</Count>
        <Item>string</Item>
        <Value>string</Value>
      </ItemCount>
    </AreaRecordCountList>
    <AreaValidationErr>string</AreaValidationErr>
    <EducationTitle>
      <FilterList>
        <ItemCount>
          <Count>2</Count>
          <Item>string</Item>
          <Value>string</Value>
        </ItemCount>
      </FilterList>
      <UndoList>
        <ItemCount>
          <Count>2</Count>
          <Item>string</Item>
          <Value>string</Value>
        </ItemCount>
      </UndoList>
    </EducationTitle>
    <Occupations>
      <OccupationReport>
        <Annualizedwage>string</Annualizedwage>
        <Definition>string</Definition>
        <EducationTitle>
          <Dimension>
            <Name>string</Name>
            <Value>string</Value>
          </Dimension>
        </EducationTitle>
        <EstYear>string</EstYear>
        <EstimatedEmployment>string</EstimatedEmployment>
        <HourlyWage>string</HourlyWage>
        <ID>string</ID>
        <JobFamily>string</JobFamily>
        <Level>string</Level>
        <Median>string</Median>
        <NodeID>string</NodeID>
        <OccupationTitle>string</OccupationTitle>
        <OptStatus>string</OptStatus>
        <PercentChange>string</PercentChange>
        <ProjYear>string</ProjYear>
        <ProjectedAnnualJobOpening>string</ProjectedAnnualJobOpening>
        <ProjectedEmployment>string</ProjectedEmployment>
        <Quartitle>string</Quartitle>
        <Rank>1</Rank>
        <SocCode>string</SocCode>
        <StateAbbrev>string</StateAbbrev>
        <StateFips>string</StateFips>
        <StateName>string</StateName>
        <TypicalEducation>string</TypicalEducation>
      </OccupationReport>
    </Occupations>
    <RecordCount>1</RecordCount>
  </OccupationsList>
</OccupationsReports>