Skip to Content

Submit Skills,Knowledge and Abilities

POST
/v1/skillsmatcher/{userId}
Parameters
string


api token is required field
string


userId is required field
body is required field
string

ex: rank or outlook or annualwages or typicaleducation or occupationtitle
Default sort is rank

string

ex: ASC or DESC

integer


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();
        }
    }
}


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>