opensearch-project / job-scheduler

Run periodic jobs on the cluster from your plugin
Apache License 2.0
20 stars 71 forks source link

Update the job-scheduler plugin documentation with the list of supported API's #648

Open prudhvigodithi opened 2 weeks ago

prudhvigodithi commented 2 weeks ago

Is your feature request related to a problem?

The job-scheduler plugin has the following API's which are added as part of the extensions effort.

Related issues

https://github.com/opensearch-project/opensearch-sdk-java/issues/274 https://github.com/opensearch-project/opensearch-sdk-java/issues/370

Related PR's

https://github.com/opensearch-project/job-scheduler/pull/289 https://github.com/opensearch-project/job-scheduler/pull/312

Get Job Details :

curl -XPUT localhost:9200/_plugins/_job_scheduler/_get/_job_details --data '{"job_index":"<job_index_name>","job_type":"<job_type>","job_parameter_action":"<job_parameter_action_name>","job_runner_action":"<job_runner_action_name>","extension_unique_id":"<extension_unique_id>"}' -H "Content-Type:application/json"

Update Job Details :

curl -XPUT localhost:9200/_plugins/_job_scheduler/_get/_job_details/{<documentId>} --data '{"job_index":"<job_index_name>","job_type"<job_type>","job_parameter_action":"<job_parameter_action_name>","job_runner_action":"<job_runner_action_name>","extension_unique_id":"<extension_unique_id>"}' -H "Content-Type:application/json"

Get Lock :

curl -XGET localhost:9200/_plugins/_job_scheduler/_lock/ --data '{"job_id":"<job_id>","job_index_name":"<job_index_name>","lock_duration_seconds":"<lock_duration_seconds>"}' -H "Content-Type:application/json"

Release Lock :

curl -XPUT localhost:9200/_plugins/_job_scheduler/_release_lock/{<lock_id>}

What solution would you like? The API's should be documented in https://opensearch.org/docs/latest/monitoring-your-cluster/job-scheduler/index/ and in https://opensearch-project.github.io/opensearch-api-specification/.

prudhvigodithi commented 2 weeks ago

[Triage] Adding @joshpalis @saratvemulapalli @dbwiddis @kaituo @vibrantvarun @cwperks @dblock @getsaurabh02

cwperks commented 2 weeks ago

These endpoints only make sense in the context of extensions so I think any documentation of these APIs should exist with extensions developer documentation like DESIGN.md of the opensearch-sdk-java repo.

These endpoints replace existing transport actions for out-of-process extensions.