Skip to content

Latest commit

 

History

History
363 lines (233 loc) · 9.31 KB

JobMainCallsAPI.md

File metadata and controls

363 lines (233 loc) · 9.31 KB

\JobMainCallsAPI

All URIs are relative to https://api.qovery.com

Method HTTP request Description
DeleteJob Delete /job/{jobId} Delete job
EditJob Put /job/{jobId} Edit job
GetJob Get /job/{jobId} Get job by ID
GetJobStatus Get /job/{jobId}/status Get job status
ListJobCommit Get /job/{jobId}/commit List last job commits

DeleteJob

DeleteJob(ctx, jobId).Execute()

Delete job

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/qovery/qovery-client-go"
)

func main() {
	jobId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Job ID

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	r, err := apiClient.JobMainCallsAPI.DeleteJob(context.Background(), jobId).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `JobMainCallsAPI.DeleteJob``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
jobId string Job ID

Other Parameters

Other parameters are passed through a pointer to a apiDeleteJobRequest struct via the builder pattern

Name Type Description Notes

Return type

(empty response body)

Authorization

ApiKeyAuth, bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

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

EditJob

JobResponse EditJob(ctx, jobId).JobRequest(jobRequest).Execute()

Edit job

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/qovery/qovery-client-go"
)

func main() {
	jobId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Job ID
	jobRequest := *openapiclient.NewJobRequest("Name_example", *openapiclient.NewHealthcheck()) // JobRequest |  (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.JobMainCallsAPI.EditJob(context.Background(), jobId).JobRequest(jobRequest).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `JobMainCallsAPI.EditJob``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `EditJob`: JobResponse
	fmt.Fprintf(os.Stdout, "Response from `JobMainCallsAPI.EditJob`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
jobId string Job ID

Other Parameters

Other parameters are passed through a pointer to a apiEditJobRequest struct via the builder pattern

Name Type Description Notes

jobRequest | JobRequest | |

Return type

JobResponse

Authorization

ApiKeyAuth, bearerAuth

HTTP request headers

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

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

GetJob

JobResponse GetJob(ctx, jobId).Execute()

Get job by ID

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/qovery/qovery-client-go"
)

func main() {
	jobId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Job ID

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.JobMainCallsAPI.GetJob(context.Background(), jobId).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `JobMainCallsAPI.GetJob``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `GetJob`: JobResponse
	fmt.Fprintf(os.Stdout, "Response from `JobMainCallsAPI.GetJob`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
jobId string Job ID

Other Parameters

Other parameters are passed through a pointer to a apiGetJobRequest struct via the builder pattern

Name Type Description Notes

Return type

JobResponse

Authorization

ApiKeyAuth, bearerAuth

HTTP request headers

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

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

GetJobStatus

Status GetJobStatus(ctx, jobId).Execute()

Get job status

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/qovery/qovery-client-go"
)

func main() {
	jobId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Job ID

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.JobMainCallsAPI.GetJobStatus(context.Background(), jobId).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `JobMainCallsAPI.GetJobStatus``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `GetJobStatus`: Status
	fmt.Fprintf(os.Stdout, "Response from `JobMainCallsAPI.GetJobStatus`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
jobId string Job ID

Other Parameters

Other parameters are passed through a pointer to a apiGetJobStatusRequest struct via the builder pattern

Name Type Description Notes

Return type

Status

Authorization

ApiKeyAuth, bearerAuth

HTTP request headers

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

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

ListJobCommit

CommitResponseList ListJobCommit(ctx, jobId).StartId(startId).GitCommitId(gitCommitId).Execute()

List last job commits

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/qovery/qovery-client-go"
)

func main() {
	jobId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Job ID
	startId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Starting point after which to return results (optional)
	gitCommitId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Git Commit ID (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.JobMainCallsAPI.ListJobCommit(context.Background(), jobId).StartId(startId).GitCommitId(gitCommitId).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `JobMainCallsAPI.ListJobCommit``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `ListJobCommit`: CommitResponseList
	fmt.Fprintf(os.Stdout, "Response from `JobMainCallsAPI.ListJobCommit`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
jobId string Job ID

Other Parameters

Other parameters are passed through a pointer to a apiListJobCommitRequest struct via the builder pattern

Name Type Description Notes

startId | string | Starting point after which to return results | gitCommitId | string | Git Commit ID |

Return type

CommitResponseList

Authorization

ApiKeyAuth, bearerAuth

HTTP request headers

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

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