Skip to content

Latest commit

 

History

History
315 lines (186 loc) · 8.42 KB

JobApi.md

File metadata and controls

315 lines (186 loc) · 8.42 KB

\JobApi

All URIs are relative to http://localhost

Method HTTP request Description
CreateJob Post /1.13/jobs
DeleteJob Delete /1.13/jobs/{name}
GetJob Get /1.13/jobs/{name}
JobEnvGet Get /1.16/jobs/{name}/env
JobEnvSet Post /1.13/jobs/{name}/env
JobEnvUnset Delete /1.13/jobs/{name}/env
JobLog Get /1.13/jobs/{name}/log
ListJob Get /1.13/jobs
TriggerJob Post /1.13/jobs/{name}/trigger
UpdateJob Put /1.13/jobs/{name}

CreateJob

CreateJob(ctx, inputJob)

Create a job that runs periodically

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
inputJob InputJob

Return type

(empty response body)

Authorization

Bearer

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

DeleteJob

DeleteJob(ctx, name)

Remove a job

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
name string Name of job

Return type

(empty response body)

Authorization

Bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetJob

JobInfo GetJob(ctx, name)

Get a job that runs periodically

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
name string Name of job

Return type

JobInfo

Authorization

Bearer

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

JobEnvGet

[]EnvVar JobEnvGet(ctx, name, optional)

Get job environment variables.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
name string Job name.
optional *JobEnvGetOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a JobEnvGetOpts struct

Name Type Description Notes

env | optional.String| Environment variable name. |

Return type

[]EnvVar

Authorization

Bearer

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

JobEnvSet

JobEnvSet(ctx, name, envSetData)

Set new environment variable.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
name string Job name.
envSetData EnvSetData Environment variables.

Return type

(empty response body)

Authorization

Bearer

HTTP request headers

  • Content-Type: application/json
  • Accept: application/x-json-stream

[Back to top] [Back to API list] [Back to Model list] [Back to README]

JobEnvUnset

JobEnvUnset(ctx, name, env)

Unset job environment variables.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
name string Job name.
env []string

Return type

(empty response body)

Authorization

Bearer

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

JobLog

JobLog(ctx, name, optional)

Retrieve logs from a job

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
name string Name of job
optional *JobLogOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a JobLogOpts struct

Name Type Description Notes

follow | optional.Bool| attach logs to tty |

Return type

(empty response body)

Authorization

Bearer

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

ListJob

[]Job ListJob(ctx, )

List jobs that runs periodically

Required Parameters

This endpoint does not need any parameter.

Return type

[]Job

Authorization

Bearer

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

TriggerJob

TriggerJob(ctx, name)

Trigger a job

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
name string Name of job

Return type

(empty response body)

Authorization

Bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

[Back to top] [Back to API list] [Back to Model list] [Back to README]

UpdateJob

UpdateJob(ctx, name, inputJob)

Update a job that runs periodically

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
name string Name of job
inputJob InputJob

Return type

(empty response body)

Authorization

Bearer

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]