All docs This doc
Skip to end of metadata
Go to start of metadata


Overview

The following operations allow you to work with Jobs. Click an operation name to see details on how to use it.  

For a sample proxy service that illustrates how to work with jobs, see Sample configuration.

Operation

Description

viewJobs

The Jobs APIs provide access to view jobs and job data

Operation details

This section provides details on each of the operations.

View jobs

This allows to view jobs and job data.

viewJobs
<linkedin.viewJobs>
	<id>{$ctx:id}</id>
    <fieldSelectors>{$ctx:fieldSelectors}</fieldSelectors>
</linkedin.viewJobs>
Properties: 
  • id: Required - The unique ID for the suggested company.
  • fieldSelectors: Field selectors are specified after the resource identifiers and path components of a resource, prefixed by a colon, contained within parentheses, and separated by commas. Fields will be returned in the order specified. When URL-encoding your resource URLs, ensure that the parentheses used in selectors remain unescaped. Remember, each field you select adds computation time to your API request. It's best to be very specific as to what fields you want returned in each API call you make.
Sample request

Following is a sample REST request that can be handled by the viewJobs operation.

Sample request for viewJobs
{
	"apiUrl":"https://api.linkedin.com",
	"accessToken":"AQUTf-7ouUMipARXfNVowT6ikytQsmVdf3VIo648_iksSI4uBeAv5aqlmpoL0_m4nZ3bG8nyK7wqZRyJKqLTsOAHLDnGpqGf0tFb8F4pSy_dtbJoaFGuIdoD8PjipKpyIorZXgR1wjpyynowzEJ9YX9Poj6AXbRWTRsnKpRNZzwEQB4YAv8",
	"id":"1337",
	"fieldSelectors":"company"
}

Related LinkedIn documentation

http://developer.linkedin.com/documents/job-search-api

Sample configuration

Following is a sample proxy service that illustrates how to connect to LinkedIn with the init operation and use the viewJobs operation. The sample request for this proxy can be found in viewJobs sample request.You can use this sample as a template for using other operations in this category.

As a best practice, create a separate sequence for handling the response payload for errors. In the following sample, this sequence is "faultHandlerSeq".

Sample Proxy
<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse"
       name="viewJobs"
       transports="https,http"
       statistics="disable"
       trace="disable"
       startOnLoad="true">
   <target>
      <inSequence>
         <property name="accessToken" expression="json-eval($.accessToken)"/>
         <property name="apiUrl" expression="json-eval($.apiUrl)"/>
         <property name="id" expression="json-eval($.id)"/>
         <property name="fieldSelectors" expression="json-eval($.fieldSelectors)"/>
         <linkedin.init>
            <apiUrl>{$ctx:apiUrl}</apiUrl>
            <accessToken>{$ctx:accessToken}</accessToken>
         </linkedin.init>
         <linkedin.viewJobs>
            <id>{$ctx:id}</id>
            <fieldSelectors>{$ctx:fieldSelectors}</fieldSelectors>
         </linkedin.viewJobs>
		 <property name="messageType" value="application/json" scope="axis2"/>
         <filter source="$axis2:HTTP_SC" regex="^[^2][0-9][0-9]">
            <then>
               <property name="ERROR_CODE" expression="$axis2:HTTP_SC"/>
               <switch source="$axis2:HTTP_SC">
                  <case regex="401">
                     <property name="ERROR_MESSAGE" value="Unauthorized"/>
                     <property name="error_description" expression="json-eval($.message)"/>
                  </case>
                  <case regex="403">
                     <property name="ERROR_MESSAGE" value="Forbidden"/>
                     <property name="error_description" expression="json-eval($.message)"/>
                  </case>
                  <case regex="404">
                     <property name="ERROR_MESSAGE" value="Not Found"/>
                  </case>
                  <case regex="400">
                     <property name="ERROR_MESSAGE" value="Bad Request"/>
                     <property name="error_description" expression="json-eval($.message)"/>
                  </case>
               </switch>
               <sequence key="faultHandlerSeq"/>
            </then>
         </filter>
         <respond/>
      </inSequence>
      <outSequence>
         <send/>
      </outSequence>
   </target>
   <description/>
</proxy>
                                
  • No labels