All URIs are relative to http://localhost/api/v1
Method | HTTP request | Description |
---|---|---|
create_or_update_job | PATCH /jobs | |
delete_job | DELETE /jobs/{id_or_uri} | |
get_job | GET /jobs/{id_or_uri} | |
list_jobs | GET /jobs |
JobResponse create_or_update_job(job)
Creates or Updates a single job
# load the gem
require 'triglav_client'
# setup authorization
TriglavClient.configure do |config|
# Configure API key authorization: api_key
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = TriglavClient::JobsApi.new
job = TriglavClient::JobRequest.new # JobRequest | Job parameters
begin
result = api_instance.create_or_update_job(job)
p result
rescue TriglavClient::ApiError => e
puts "Exception when calling JobsApi->create_or_update_job: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
job | JobRequest | Job parameters |
- Content-Type: application/json
- Accept: application/json
delete_job(id_or_uri)
Deletes single job
# load the gem
require 'triglav_client'
# setup authorization
TriglavClient.configure do |config|
# Configure API key authorization: api_key
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = TriglavClient::JobsApi.new
id_or_uri = "id_or_uri_example" # String | ID or URI of job to fetch
begin
api_instance.delete_job(id_or_uri)
rescue TriglavClient::ApiError => e
puts "Exception when calling JobsApi->delete_job: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
id_or_uri | String | ID or URI of job to fetch |
nil (empty response body)
- Content-Type: application/json
- Accept: application/json
JobResponse get_job(id_or_uri)
Returns a single job
# load the gem
require 'triglav_client'
# setup authorization
TriglavClient.configure do |config|
# Configure API key authorization: api_key
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = TriglavClient::JobsApi.new
id_or_uri = "id_or_uri_example" # String | ID or URI of job to fetch
begin
result = api_instance.get_job(id_or_uri)
p result
rescue TriglavClient::ApiError => e
puts "Exception when calling JobsApi->get_job: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
id_or_uri | String | ID or URI of job to fetch |
- Content-Type: application/json
- Accept: application/json
Array<JobEachResponse> list_jobs
Returns all jobs
# load the gem
require 'triglav_client'
# setup authorization
TriglavClient.configure do |config|
# Configure API key authorization: api_key
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = TriglavClient::JobsApi.new
begin
result = api_instance.list_jobs
p result
rescue TriglavClient::ApiError => e
puts "Exception when calling JobsApi->list_jobs: #{e}"
end
This endpoint does not need any parameter.
- Content-Type: application/json
- Accept: application/json