Skip to content

Commit 88522b5

Browse files
author
Peter Kolloch
committed
Merge pull request #551 from mwasn/patch-1
Fixes #540 - Document Search Endpoint
2 parents ce44ce1 + da52288 commit 88522b5

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

docs/docs/api.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ All examples in this section assume that you've found a running leader at `chron
1010

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

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

53+
## Searching for a Job
54+
55+
Get the job definition by searching for the following attributes by using the search endpoint:
56+
57+
* `name`: Name of a job.
58+
* `command`: Command to execute.
59+
* `any`: Search term contained in `name` or `command`.
60+
*
61+
* Endpoint: __/scheduler/jobs/search__
62+
* Method: __GET__
63+
* Example: `curl -L -X GET chronos-node:8080/scheduler/jobs/search?name=request_event_counter_hourly`
64+
* Response: HTTP 204
65+
66+
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.
67+
5268
## Deleting a Job
5369

5470
Get a job name from the job listing above.

0 commit comments

Comments
 (0)