Skip to content

Commit

Permalink
Merge pull request #551 from mwasn/patch-1
Browse files Browse the repository at this point in the history
Fixes #540 - Document Search Endpoint
  • Loading branch information
Peter Kolloch committed Sep 16, 2015
2 parents ce44ce1 + da52288 commit 88522b5
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions docs/docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ All examples in this section assume that you've found a running leader at `chron

- [Leaders](#leaders)
- [Listing Jobs](#listing-jobs)
- [Searching for a Job](#searching-for-a-job)
- [Deleting a Job](#deleting-a-job)
- [Deleting All Tasks for a Job](#deleting-all-tasks-for-a-job)
- [Manually Starting a Job](#manually-starting-a-job)
Expand Down Expand Up @@ -49,6 +50,21 @@ Interesting fields in the hashes are:

If there is a `parents` field there will be no `schedule` field, and vice-versa.

## Searching for a Job

Get the job definition by searching for the following attributes by using the search endpoint:

* `name`: Name of a job.
* `command`: Command to execute.
* `any`: Search term contained in `name` or `command`.
*
* Endpoint: __/scheduler/jobs/search__
* Method: __GET__
* Example: `curl -L -X GET chronos-node:8080/scheduler/jobs/search?name=request_event_counter_hourly`
* Response: HTTP 204

Search term and the desired job attribute will be converted to lower case. It will then be checked if the job attribute contains the term.

## Deleting a Job

Get a job name from the job listing above.
Expand Down

0 comments on commit 88522b5

Please sign in to comment.