docs/JobsApi.md in dkron-rb-1.0.0 vs docs/JobsApi.md in dkron-rb-1.1.0

- old
+ new

@@ -5,17 +5,18 @@ Method | HTTP request | Description ------------- | ------------- | ------------- [**create_or_update_job**](JobsApi.md#create_or_update_job) | **POST** /jobs | [**delete_job**](JobsApi.md#delete_job) | **DELETE** /jobs/{job_name} | [**get_jobs**](JobsApi.md#get_jobs) | **GET** /jobs | +[**restore**](JobsApi.md#restore) | **POST** /restore | [**run_job**](JobsApi.md#run_job) | **POST** /jobs/{job_name} | [**show_job_by_name**](JobsApi.md#show_job_by_name) | **GET** /jobs/{job_name} | [**toggle_job**](JobsApi.md#toggle_job) | **POST** /jobs/{job_name}/toggle | # **create_or_update_job** -> Job create_or_update_job(body) +> Job create_or_update_job(body, opts) Create or updates a new job. @@ -26,13 +27,16 @@ api_instance = Dkron::JobsApi.new body = Dkron::Job.new # Job | Updated job object +opts = { + runoncreate: true # BOOLEAN | If present, regardless of any value, causes the job to be run immediately after being succesfully created or updated. +} begin - result = api_instance.create_or_update_job(body) + result = api_instance.create_or_update_job(body, opts) p result rescue Dkron::ApiError => e puts "Exception when calling JobsApi->create_or_update_job: #{e}" end ``` @@ -40,10 +44,11 @@ ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **body** | [**Job**](Job.md)| Updated job object | + **runoncreate** | **BOOLEAN**| If present, regardless of any value, causes the job to be run immediately after being succesfully created or updated. | [optional] ### Return type [**Job**](Job.md) @@ -117,11 +122,16 @@ require 'dkron-rb' api_instance = Dkron::JobsApi.new opts = { - tags: ['tags_example'] # Array<String> | Filter jobs by tags + metadata: ['metadata_example'], # Array<String> | Filter jobs by metadata + _sort: '_sort_example', # String | Sorting field + _order: '_order_example', # String | Sort order (ASC/DESC) + q: 'q_example', # String | Filter query text + _start: 56, # Integer | Start index + _end: 56 # Integer | End index } begin result = api_instance.get_jobs(opts) p result @@ -132,11 +142,16 @@ ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **tags** | [**Array&lt;String&gt;**](String.md)| Filter jobs by tags | [optional] + **metadata** | [**Array&lt;String&gt;**](String.md)| Filter jobs by metadata | [optional] + **_sort** | **String**| Sorting field | [optional] + **_order** | **String**| Sort order (ASC/DESC) | [optional] + **q** | **String**| Filter query text | [optional] + **_start** | **Integer**| Start index | [optional] + **_end** | **Integer**| End index | [optional] ### Return type [**Array&lt;Job&gt;**](Job.md) @@ -145,9 +160,55 @@ No authorization required ### HTTP request headers - **Content-Type**: application/json + - **Accept**: application/json + + + +# **restore** +> Array&lt;Restore&gt; restore(file) + + + +Restore jobs from json file. + +### Example +```ruby +# load the gem +require 'dkron-rb' + +api_instance = Dkron::JobsApi.new + +file = File.new('/path/to/file.txt') # File | Json file that needs to be restored. + + +begin + result = api_instance.restore(file) + p result +rescue Dkron::ApiError => e + puts "Exception when calling JobsApi->restore: #{e}" +end +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **file** | **File**| Json file that needs to be restored. | + +### Return type + +[**Array&lt;Restore&gt;**](Restore.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: multipart/form-data - **Accept**: application/json # **run_job**