Skip to content

Commit

Permalink
Added show job API method
Browse files Browse the repository at this point in the history
  • Loading branch information
Victor Castell committed Sep 12, 2015
1 parent 3e960fc commit 85aa57e
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 0 deletions.
41 changes: 41 additions & 0 deletions docs/docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,47 @@ HTTP/1.1 201 Created
}
```

### Job Show

Show job.

```
GET /v1/jobs/{job_name}
```


#### Curl Example

```bash
$ curl -n dkron-node:8080/v1/jobs/$JOB_NAME
```


#### Response Example

```
HTTP/1.1 200 OK
```

```json
{
"name": "cron_job",
"schedule": "0 30 * * * *",
"command": "/usr/bin/date",
"owner": "John Doe",
"owner_email": "[email protected]",
"run_as_user": "johndoe",
"success_count": 20,
"error_count": 5,
"last_success": "0001-01-01T00:00:00Z",
"last_error": "0001-01-01T100:00:00Z",
"disabled": false,
"tags": {
"role": "web"
}
}
```

### Job Delete

Delete job.
Expand Down
7 changes: 7 additions & 0 deletions static/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,13 @@
]
}
},
{
"description": "Show job.",
"href": "/v1/jobs/{(%23%2Fdefinitions%2Fjob%2Fdefinitions%2Fname)}",
"method": "GET",
"rel": "show",
"title": "Show"
},
{
"description": "Delete job.",
"href": "/v1/jobs/{(%23%2Fdefinitions%2Fjob%2Fdefinitions%2Fname)}",
Expand Down

0 comments on commit 85aa57e

Please sign in to comment.