Submit Skills,Knowledge and Abilities

Submit Skills,Knowledge and Abilities

Submit Skills,Knowledge and Abilities

Two Skills Matcher APIs provide developers with the ability to create their own user interface for something like our Skills Matcher. Submit Skills API provides information about occupations that match a user's ratings of their levels in 40 different skills.  This Web API works in conjunction with the Get Skills API. You can see these APIs at work in the Skills Matcher tool on CareerOneStop.

About this data

Skills Matcher Web APIs are based on data from the Occupational Information Network (O*NET) taxonomy, created by the Department of Labor for cross-agency use by federal, state and local government entities. Data information can be found here.

Resource URL

https://api.careeronestop.org/v1/skillsmatcher/{userId}

Example Code

using System;

using System.Net.Http;

using System.Net.Http.Headers;

using System.Threading.Tasks;

using System.Text;

using System.Collections.Specialized;

using System.Linq;

namespace CareerOneStopAPISample

{

    class Program

    {

        static void Main(string[] args)

        {

            CreateRequest().Wait();

        }

        private static async Task CreateRequest()

        {

            var qs = new NameValueCollection();

            qs["sortColumn"] = "value";                        

            qs["sortOrder"] = "value";                        

            qs["eduFilterValue"] = "value";                        

            

            var uri = new UriBuilder(Uri.UriSchemeHttps, "api.careeronestop.org")

            {

                Path = "/v1/skillsmatcher/{userId}",

                Query = string.Join("&", qs.AllKeys.Select(key => key + "=" + Uri.EscapeUriString(qs[key])))

            };

            

            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"));

                using (var request = new HttpRequestMessage(HttpMethod.Post, uri.Uri))

                {

                    var json = Newtonsoft.Json.JsonConvert.SerializeObject(typeof(SKAValues)));

                    request.Content = new StringContent(json, Encoding.UTF8, "application/json");

                    var response = await http.SendAsync(request);

                    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.HttpPost;

import org.apache.http.client.utils.URIBuilder;

import org.apache.http.entity.StringEntity;

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/skillsmatcher/{userId}")

                .setParameter("sortColumn", "value")

                .setParameter("sortOrder", "value")

                .setParameter("eduFilterValue", "value")

        .build();

    CloseableHttpResponse response = null;

    HttpPost httpPost = null;

    StringEntity json = new StringEntity("json string");

            

    try {

        CloseableHttpClient httpClient = HttpClients.createDefault();

        httpPost = new HttpPost(uri);

        httpGet.setHeader("Content-Type","application/json");

        httpGet.setHeader("Authorization", "Bearer API Token");

        httpPost.setEntity(json);

        response = httpClient.execute(httpPost);

        HttpEntity entity = response.getEntity();

        System.out.println(EntityUtils.toString(entity));

    }

    finally {

        if(httpPost != null) httpPost.releaseConnection();

        if(response != null) response.close();

        }

    }

}

Request Parameters

Refer to the following table for a list of the required and optional request parameters. All parameter names and values are case sensitive. Important: You must provide all required parameters. Submitting an empty request does not return all possible results; an empty request returns an error.

Parameter Name Value Required? Description
API Token
String
Yes
This value is the unique API Token provided during the CareerOneStop Web API registration process.
userId
String
Yes This value is the unique UserID provided during the CareerOneStop Web API registration process.
body
Object
Yes
This is key value pair of skills Question and Answers. Please find the example api-explorer.
sortColumn    
String
No
This Value is for sorting the columns. Valid Values are: Rank, Outlook, Annualwages, Typicaleducation and Occupationtitle
sortOrder
String
No
Use this parameter to set the ordering of the result. Valid Values are ASC, DES.
eduFilterValue
String
No
This is a filter to limit the records based on the selected education level.

Response Structure

{

  "SKARankList": [

    {

      "OnetCode": "string",

      "Score": 2.1,

      "Rank": 3,

      "Outlook": "string",

      "AnnualWages": 5.0,

      "TypicalEducation": "string",

      "OccupationTitle": "string",

      "EduCode": 8.0

    }

  ],

  "EduClassList": [

    {

      "EduCode": 1.0,

      "EduTitle": "string",

      "Count": 3

    }

  ],

  "RecordCount": 1,

  "FilterValue": 2

}
<SKAResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/XPAND.CareerOneStop.WebApi.ViewModels">

  <EduClassList>

    <EduClass>

      <Count>3</Count>

      <EduCode>1</EduCode>

      <EduTitle>string</EduTitle>

    </EduClass>

  </EduClassList>

  <FilterValue>2</FilterValue>

  <RecordCount>1</RecordCount>

  <SKARankList>

    <SKARank>

      <AnnualWages>5</AnnualWages>

      <EduCode>8</EduCode>

      <OccupationTitle>string</OccupationTitle>

      <OnetCode>string</OnetCode>

      <Outlook>string</Outlook>

      <Rank>3</Rank>

      <Score>2.1</Score>

      <TypicalEducation>string</TypicalEducation>

    </SKARank>

  </SKARankList>

</SKAResult>

Response Parameters

Name Description Type
    SKARankList
SKA Rank List Object
    OnetCode
Onet Code String
    Score
Score Decimal
    Rank
Rank Number 
    Outlook Outlook String
    AnnualWages Annual Wages Decimal
    TypicalEducation Typical Education String
    OccupationTitle Occupation Title String
    Educode
Edu code Decimal
    EduClassList Edu Class List Object
    EduCode
Edu Code Decimal
    EduTitle Edu Title String
    Count Count Number
    RecordCount
Record Count Number
    FilterValue
Filter Value Number

Errors

Error/Status Code Description
 200
OK / Success. The request went through successfully and there is a response body.
 400
Bad Request (Request was invalid or missing parameters)
 401    
Unauthorized. This error occurs specifically when authentication is required and has failed or has not yet been provided correctly. (ex: Invalid API Token)
 404
This error will be shown in two scenarios 1) Not found - (An error occurred) and 2) Not found - (No data available)
 500
Internal Server Error. This error will occur when there is something critically wrong in the API call.