Skip to content

Latest commit

 

History

History
178 lines (140 loc) · 8.09 KB

JobsApi.md

File metadata and controls

178 lines (140 loc) · 8.09 KB

JobsApi

All URIs are relative to https://api.merge.dev/api/ats/v1

Method HTTP request Description
jobsList GET /jobs
jobsRetrieve GET /jobs/{id}

jobsList

PaginatedJobList jobsList(xAccountToken, code, createdAfter, createdBefore, cursor, includeDeletedData, includeRemoteData, modifiedAfter, modifiedBefore, pageSize, remoteFields, remoteId, status)

Returns a list of `Job` objects.

Example

// Import classes:
import merge_ats_client.ApiClient;
import merge_ats_client.ApiException;
import merge_ats_client.Configuration;
import merge_ats_client.auth.*;
import merge_ats_client.models.*;
import merge_ats_client.api.JobsApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://api.merge.dev/api/ats/v1");
    
    // Configure API key authorization: tokenAuth
    ApiKeyAuth tokenAuth = (ApiKeyAuth) defaultClient.getAuthentication("tokenAuth");
    tokenAuth.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //tokenAuth.setApiKeyPrefix("Token");

    JobsApi apiInstance = new JobsApi(defaultClient);
    String xAccountToken = "xAccountToken_example"; // String | Token identifying the end user.
    String code = "code_example"; // String | If provided, will only return jobs with this code.
    OffsetDateTime createdAfter = OffsetDateTime.now(); // OffsetDateTime | If provided, will only return objects created after this datetime.
    OffsetDateTime createdBefore = OffsetDateTime.now(); // OffsetDateTime | If provided, will only return objects created before this datetime.
    String cursor = "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw"; // String | The pagination cursor value.
    Boolean includeDeletedData = true; // Boolean | Whether to include data that was marked as deleted by third party webhooks.
    Boolean includeRemoteData = true; // Boolean | Whether to include the original data Merge fetched from the third-party to produce these models.
    OffsetDateTime modifiedAfter = OffsetDateTime.now(); // OffsetDateTime | If provided, will only return objects modified after this datetime.
    OffsetDateTime modifiedBefore = OffsetDateTime.now(); // OffsetDateTime | If provided, will only return objects modified before this datetime.
    Integer pageSize = 56; // Integer | Number of results to return per page.
    String remoteFields = "status"; // String | Which fields should be returned in non-normalized form.
    String remoteId = "remoteId_example"; // String | The API provider's ID for the given object.
    String status = "status_example"; // String | If provided, will only return jobs with this status. Options: ('OPEN', 'CLOSED', 'DRAFT', 'ARCHIVED', 'PENDING')
    try {
      PaginatedJobList result = apiInstance.jobsList(xAccountToken, code, createdAfter, createdBefore, cursor, includeDeletedData, includeRemoteData, modifiedAfter, modifiedBefore, pageSize, remoteFields, remoteId, status);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling JobsApi#jobsList");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
xAccountToken String Token identifying the end user.
code String If provided, will only return jobs with this code. [optional]
createdAfter OffsetDateTime If provided, will only return objects created after this datetime. [optional]
createdBefore OffsetDateTime If provided, will only return objects created before this datetime. [optional]
cursor String The pagination cursor value. [optional]
includeDeletedData Boolean Whether to include data that was marked as deleted by third party webhooks. [optional]
includeRemoteData Boolean Whether to include the original data Merge fetched from the third-party to produce these models. [optional]
modifiedAfter OffsetDateTime If provided, will only return objects modified after this datetime. [optional]
modifiedBefore OffsetDateTime If provided, will only return objects modified before this datetime. [optional]
pageSize Integer Number of results to return per page. [optional]
remoteFields String Which fields should be returned in non-normalized form. [optional] [enum: status]
remoteId String The API provider's ID for the given object. [optional]
status String If provided, will only return jobs with this status. Options: ('OPEN', 'CLOSED', 'DRAFT', 'ARCHIVED', 'PENDING') [optional] [enum: ARCHIVED, CLOSED, DRAFT, OPEN, PENDING]

Return type

PaginatedJobList

Authorization

tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 -

jobsRetrieve

Job jobsRetrieve(xAccountToken, id, includeRemoteData, remoteFields)

Returns a `Job` object with the given `id`.

Example

// Import classes:
import merge_ats_client.ApiClient;
import merge_ats_client.ApiException;
import merge_ats_client.Configuration;
import merge_ats_client.auth.*;
import merge_ats_client.models.*;
import merge_ats_client.api.JobsApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://api.merge.dev/api/ats/v1");
    
    // Configure API key authorization: tokenAuth
    ApiKeyAuth tokenAuth = (ApiKeyAuth) defaultClient.getAuthentication("tokenAuth");
    tokenAuth.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //tokenAuth.setApiKeyPrefix("Token");

    JobsApi apiInstance = new JobsApi(defaultClient);
    String xAccountToken = "xAccountToken_example"; // String | Token identifying the end user.
    UUID id = new UUID(); // UUID | 
    Boolean includeRemoteData = true; // Boolean | Whether to include the original data Merge fetched from the third-party to produce these models.
    String remoteFields = "status"; // String | Which fields should be returned in non-normalized form.
    try {
      Job result = apiInstance.jobsRetrieve(xAccountToken, id, includeRemoteData, remoteFields);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling JobsApi#jobsRetrieve");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
xAccountToken String Token identifying the end user.
id UUID
includeRemoteData Boolean Whether to include the original data Merge fetched from the third-party to produce these models. [optional]
remoteFields String Which fields should be returned in non-normalized form. [optional] [enum: status]

Return type

Job

Authorization

tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 -