Skip to content

Latest commit

 

History

History
318 lines (234 loc) · 28.5 KB

File metadata and controls

318 lines (234 loc) · 28.5 KB

Jobs

Overview

Available Operations

createJobJobsPost

Create Job

Example Usage

import { GalileoGenerated } from "galileo-generated";

const galileoGenerated = new GalileoGenerated();

async function run() {
  const result = await galileoGenerated.jobs.createJobJobsPost({
    apiKeyHeader: process.env["GALILEOGENERATED_API_KEY_HEADER"] ?? "",
  }, {
    projectId: "<value>",
    runId: "<value>",
  });

  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

import { GalileoGeneratedCore } from "galileo-generated/core.js";
import { jobsCreateJobJobsPost } from "galileo-generated/funcs/jobsCreateJobJobsPost.js";

// Use `GalileoGeneratedCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const galileoGenerated = new GalileoGeneratedCore();

async function run() {
  const res = await jobsCreateJobJobsPost(galileoGenerated, {
    apiKeyHeader: process.env["GALILEOGENERATED_API_KEY_HEADER"] ?? "",
  }, {
    projectId: "<value>",
    runId: "<value>",
  });
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("jobsCreateJobJobsPost failed:", res.error);
  }
}

run();

Parameters

Parameter Type Required Description
request models.CreateJobRequest ✔️ The request object to use for the request.
security operations.CreateJobJobsPostSecurity ✔️ The security requirements to use for the request.
options RequestOptions Used to set various options for making HTTP requests.
options.fetchOptions RequestInit Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retries RetryConfig Enables retrying HTTP requests under certain failure conditions.

Response

Promise<models.CreateJobResponse>

Errors

Error Type Status Code Content Type
errors.HTTPValidationError 422 application/json
errors.GalileoGeneratedDefaultError 4XX, 5XX */*

getJobJobsJobIdGet

Get a job by id.

Example Usage

import { GalileoGenerated } from "galileo-generated";

const galileoGenerated = new GalileoGenerated();

async function run() {
  const result = await galileoGenerated.jobs.getJobJobsJobIdGet({
    apiKeyHeader: process.env["GALILEOGENERATED_API_KEY_HEADER"] ?? "",
  }, {
    jobId: "<value>",
  });

  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

import { GalileoGeneratedCore } from "galileo-generated/core.js";
import { jobsGetJobJobsJobIdGet } from "galileo-generated/funcs/jobsGetJobJobsJobIdGet.js";

// Use `GalileoGeneratedCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const galileoGenerated = new GalileoGeneratedCore();

async function run() {
  const res = await jobsGetJobJobsJobIdGet(galileoGenerated, {
    apiKeyHeader: process.env["GALILEOGENERATED_API_KEY_HEADER"] ?? "",
  }, {
    jobId: "<value>",
  });
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("jobsGetJobJobsJobIdGet failed:", res.error);
  }
}

run();

Parameters

Parameter Type Required Description
request operations.GetJobJobsJobIdGetRequest ✔️ The request object to use for the request.
security operations.GetJobJobsJobIdGetSecurity ✔️ The security requirements to use for the request.
options RequestOptions Used to set various options for making HTTP requests.
options.fetchOptions RequestInit Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retries RetryConfig Enables retrying HTTP requests under certain failure conditions.

Response

Promise<models.JobDB>

Errors

Error Type Status Code Content Type
errors.HTTPValidationError 422 application/json
errors.GalileoGeneratedDefaultError 4XX, 5XX */*

getJobsForProjectRunProjectsProjectIdRunsRunIdJobsGet

Get all jobs by for a project and run.

Returns them in order of creation from newest to oldest.

Example Usage

import { GalileoGenerated } from "galileo-generated";

const galileoGenerated = new GalileoGenerated();

async function run() {
  const result = await galileoGenerated.jobs.getJobsForProjectRunProjectsProjectIdRunsRunIdJobsGet({
    apiKeyHeader: process.env["GALILEOGENERATED_API_KEY_HEADER"] ?? "",
  }, {
    projectId: "<value>",
    runId: "<value>",
  });

  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

import { GalileoGeneratedCore } from "galileo-generated/core.js";
import { jobsGetJobsForProjectRunProjectsProjectIdRunsRunIdJobsGet } from "galileo-generated/funcs/jobsGetJobsForProjectRunProjectsProjectIdRunsRunIdJobsGet.js";

// Use `GalileoGeneratedCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const galileoGenerated = new GalileoGeneratedCore();

async function run() {
  const res = await jobsGetJobsForProjectRunProjectsProjectIdRunsRunIdJobsGet(galileoGenerated, {
    apiKeyHeader: process.env["GALILEOGENERATED_API_KEY_HEADER"] ?? "",
  }, {
    projectId: "<value>",
    runId: "<value>",
  });
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("jobsGetJobsForProjectRunProjectsProjectIdRunsRunIdJobsGet failed:", res.error);
  }
}

run();

Parameters

Parameter Type Required Description
request operations.GetJobsForProjectRunProjectsProjectIdRunsRunIdJobsGetRequest ✔️ The request object to use for the request.
security operations.GetJobsForProjectRunProjectsProjectIdRunsRunIdJobsGetSecurity ✔️ The security requirements to use for the request.
options RequestOptions Used to set various options for making HTTP requests.
options.fetchOptions RequestInit Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retries RetryConfig Enables retrying HTTP requests under certain failure conditions.

Response

Promise<models.JobDB[]>

Errors

Error Type Status Code Content Type
errors.HTTPValidationError 422 application/json
errors.GalileoGeneratedDefaultError 4XX, 5XX */*

getLatestJobForProjectRunProjectsProjectIdRunsRunIdJobsLatestGet

Returns the most recently updated job for a run.

Example Usage

import { GalileoGenerated } from "galileo-generated";

const galileoGenerated = new GalileoGenerated();

async function run() {
  const result = await galileoGenerated.jobs.getLatestJobForProjectRunProjectsProjectIdRunsRunIdJobsLatestGet({
    apiKeyHeader: process.env["GALILEOGENERATED_API_KEY_HEADER"] ?? "",
  }, {
    projectId: "<value>",
    runId: "<value>",
  });

  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

import { GalileoGeneratedCore } from "galileo-generated/core.js";
import { jobsGetLatestJobForProjectRunProjectsProjectIdRunsRunIdJobsLatestGet } from "galileo-generated/funcs/jobsGetLatestJobForProjectRunProjectsProjectIdRunsRunIdJobsLatestGet.js";

// Use `GalileoGeneratedCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const galileoGenerated = new GalileoGeneratedCore();

async function run() {
  const res = await jobsGetLatestJobForProjectRunProjectsProjectIdRunsRunIdJobsLatestGet(galileoGenerated, {
    apiKeyHeader: process.env["GALILEOGENERATED_API_KEY_HEADER"] ?? "",
  }, {
    projectId: "<value>",
    runId: "<value>",
  });
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("jobsGetLatestJobForProjectRunProjectsProjectIdRunsRunIdJobsLatestGet failed:", res.error);
  }
}

run();

Parameters

Parameter Type Required Description
request operations.GetLatestJobForProjectRunProjectsProjectIdRunsRunIdJobsLatestGetRequest ✔️ The request object to use for the request.
security operations.GetLatestJobForProjectRunProjectsProjectIdRunsRunIdJobsLatestGetSecurity ✔️ The security requirements to use for the request.
options RequestOptions Used to set various options for making HTTP requests.
options.fetchOptions RequestInit Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retries RetryConfig Enables retrying HTTP requests under certain failure conditions.

Response

Promise<models.JobDB>

Errors

Error Type Status Code Content Type
errors.HTTPValidationError 422 application/json
errors.GalileoGeneratedDefaultError 4XX, 5XX */*