Get job
Content
Resource URL
https://apps.ticketmatic.com/api/1/{accountname}/jobs/{id}
Description
Returns info on a job including the current status.
Example
Request
1use Ticketmatic\Endpoints\Jobs;
2
3$result = Jobs::get($client, $id);
Response
1object(\Ticketmatic\Model\JobResult) (5) {
2 ["id"]=>
3 string(36) "1d57e578-0464-42b5-a0d4-fab45291969e"
4 ["name"]=>
5 string(11) "purgeorders"
6 ["progress"]=>
7 int(0)
8 ["progresstext"]=>
9 string(19) "setting up database"
10 ["status"]=>
11 int(0)
12}
Request
1import (
2 "github.com/ticketmatic/tm-go/ticketmatic"
3 "github.com/ticketmatic/tm-go/ticketmatic/jobs"
4)
5
6result, err := jobs.Get(client, id)
Response
1result := &ticketmatic.JobResult{
2 Id: "1d57e578-0464-42b5-a0d4-fab45291969e",
3 Name: "purgeorders",
4 Progress: 53,
5 Progresstext: "setting up database",
6 Status: 20002,
7}
Request
1GET /api/1/{accountname}/jobs/{id} HTTP/1.1
Response
1HTTP/1.1 200 OK
2Content-Type: application/json
3
4{
5 "id": "1d57e578-0464-42b5-a0d4-fab45291969e",
6 "name": "purgeorders",
7 "progress": 53,
8 "progresstext": "setting up database",
9 "status": 20002
10}
Result fields
Field | Description |
---|---|
id string | Id of the job Example value:"1d57e578-0464-42b5-a0d4-fab45291969e" |
name string | Job name Example value:"purgeorders" |
progress int | Job progress (percentage) Example value:53 |
progresstext string | Current progress of the job as string Example value:"setting up database" |
status int | Status for the job Example value:20002 |
Type reference: JobResult