Get list of jobs associated with a job request

get/jobRequests/{jobRequestId}/jobs
Internal-Use Only

Returns a collection of application/vnd.sas.job.execution.job resources that were submitted using the specified job request. Standard paging, filtering, and sorting options are specified in the Parameters section.

Request Samples

1

Response Samples

1{
2 "links": [
3 {
4 "method": "GET",
5 "rel": "collection",
6 "href": "/jobExecution/jobRequests/3c6338bf-a2a0-4d2a-89d2-22d64ffb69e4/jobs",
7 "uri": "/jobExecution/jobRequests/3c6338bf-a2a0-4d2a-89d2-22d64ffb69e4/jobs",
8 "type": "application/vnd.sas.collection",
9 "itemType": "application/vnd.sas.job.execution.job"
10 },
11 {
12 "method": "GET",
13 "rel": "self",
14 "href": "/jobExecution/jobRequests/3c6338bf-a2a0-4d2a-89d2-22d64ffb69e4/jobs?sortBy=creationTimeStamp:descending&start=0&limit=10",
15 "uri": "/jobExecution/jobRequests/3c6338bf-a2a0-4d2a-89d2-22d64ffb69e4/jobs?sortBy=creationTimeStamp:descending&start=0&limit=10",
16 "type": "application/vnd.sas.collection",
17 "itemType": "application/vnd.sas.job.execution.job"
18 },
19 {
20 "method": "GET",
21 "rel": "up",
22 "href": "/jobExecution/jobRequests/3c6338bf-a2a0-4d2a-89d2-22d64ffb69e4/",
23 "uri": "/jobExecution/jobRequests/3c6338bf-a2a0-4d2a-89d2-22d64ffb69e4/",
24 "type": "application/vnd.sas.job.execution.job"
25 },
26 {
27 "method": "POST",
28 "rel": "submitJob",
29 "href": "/jobExecution/jobRequests/3c6338bf-a2a0-4d2a-89d2-22d64ffb69e4/jobs",
30 "uri": "/jobExecution/jobRequests/3c6338bf-a2a0-4d2a-89d2-22d64ffb69e4/jobs",
31 "responseType": "application/vnd.sas.job.execution.job"
32 }
33 ],
34 "name": "jobs",
35 "accept": "application/vnd.sas.job.execution.job",
36 "start": 0,
37 "count": 6,
38 "items": [
39 {
40 "creationTimeStamp": "2022-04-12T20:12:32.653Z",
41 "modifiedTimeStamp": "2022-04-12T20:12:54.053Z",
42 "createdBy": "user1",
43 "modifiedBy": "user1",
44 "version": 4,
45 "id": "fd4f8d7c-2fa0-4753-a537-45deb08e3fe2",
46 "jobRequest": {
47 "creationTimeStamp": "2022-04-11T21:36:15.155Z",
48 "modifiedTimeStamp": "2022-04-11T21:36:15.155Z",
49 "createdBy": "sas.catalog",
50 "modifiedBy": "sas.catalog",
51 "version": 3,
52 "id": "3c6338bf-a2a0-4d2a-89d2-22d64ffb69e4",
53 "name": "List Catalogs",
54 "jobDefinition": {
55 "creationTimeStamp": "0001-01-01T00:00:00.000Z",
56 "modifiedTimeStamp": "0001-01-01T00:00:00.000Z",
57 "version": 1,
58 "name": "List Catalogs",
59 "type": "Compute",
60 "parameters": [],
61 "code": "%macro web_list_catalogs(library);\n\t%let library=%upcase(&library);\n proc sql ;\n create table work.catalogs as select memname as Catalog, memtype as \n Type, engine as Engine from sashelp.vmember where \n libname=\"&library\" and memtype=\"CATALOG\";\n run;\n title \"Catalogs in &library\";\n\n proc print data=work.catalogs;\n run;\n%mend;\n\n%web_list_catalogs(SASHELP);\n",
62 "properties": []
63 },
64 "arguments": {
65 "_contextName": "SAS Job Execution compute context"
66 },
67 "properties": [],
68 "createdByApplication": "jobExecution",
69 "links": [
70 {
71 "method": "GET",
72 "rel": "self",
73 "href": "/jobExecution/jobRequests/3c6338bf-a2a0-4d2a-89d2-22d64ffb69e4",
74 "uri": "/jobExecution/jobRequests/3c6338bf-a2a0-4d2a-89d2-22d64ffb69e4",
75 "type": "application/vnd.sas.job.execution.job.request"
76 }
77 ]
78 },
79 "state": "completed",
80 "endTimeStamp": "2022-04-12T20:12:54.053Z",
81 "heartbeatTimeStamp": "2022-04-12T20:12:33.797Z",
82 "submittedByApplication": "jobExecution",
83 "heartbeatInterval": 600,
84 "elapsedTime": 21400,
85 "results": {
86 "COMPUTE_CONTEXT": "SAS Studio compute context",
87 "#LN00007": "/files/files/98e4ae4b-76ce-40c6-9404-e786ba4a913c",
88 "#LN00006": "/files/files/746ae002-c220-4525-ab0f-d832a165169c",
89 "35F69210-3CCB-A043-9D00-7532BDB6465D.log.txt": "/files/files/e5508264-58c0-4ad4-aa1e-8798e0c42435",
90 "COMPUTE_JOB": "35F69210-3CCB-A043-9D00-7532BDB6465D",
91 "COMPUTE_SESSION": "30ac3ff7-8b32-4210-8c1f-85aecaf0f0d3-ses0000 ended."
92 },
93 "logLocation": "/files/files/3d597573-e225-45cf-9b53-47ac4b2501c6",
94 "links": [
95 {
96 "method": "GET",
97 "rel": "self",
98 "href": "/jobExecution/jobs/fd4f8d7c-2fa0-4753-a537-45deb08e3fe2",
99 "uri": "/jobExecution/jobs/fd4f8d7c-2fa0-4753-a537-45deb08e3fe2",
100 "type": "application/vnd.sas.job.execution.job"
101 },
102 {
103 "method": "GET",
104 "rel": "state",
105 "href": "/jobExecution/jobs/fd4f8d7c-2fa0-4753-a537-45deb08e3fe2/state",
106 "uri": "/jobExecution/jobs/fd4f8d7c-2fa0-4753-a537-45deb08e3fe2/state",
107 "type": "text/plain"
108 },
109 {
110 "method": "PUT",
111 "rel": "update",
112 "href": "/jobExecution/jobs/fd4f8d7c-2fa0-4753-a537-45deb08e3fe2",
113 "uri": "/jobExecution/jobs/fd4f8d7c-2fa0-4753-a537-45deb08e3fe2",
114 "type": "application/vnd.sas.job.execution.job",
115 "responseType": "application/vnd.sas.job.execution.job"
116 },
117 {
118 "method": "DELETE",
119 "rel": "delete",
120 "href": "/jobExecution/jobs/fd4f8d7c-2fa0-4753-a537-45deb08e3fe2",
121 "uri": "/jobExecution/jobs/fd4f8d7c-2fa0-4753-a537-45deb08e3fe2"
122 },
123 {
124 "method": "PUT",
125 "rel": "updateState",
126 "href": "/jobExecution/jobs/fd4f8d7c-2fa0-4753-a537-45deb08e3fe2/state",
127 "uri": "/jobExecution/jobs/fd4f8d7c-2fa0-4753-a537-45deb08e3fe2/state",
128 "type": "text/plain"
129 },
130 {
131 "method": "POST",
132 "rel": "updateHeartbeatTimeStamp",
133 "href": "/jobExecution/jobs/fd4f8d7c-2fa0-4753-a537-45deb08e3fe2/heartbeatTimeStamp",
134 "uri": "/jobExecution/jobs/fd4f8d7c-2fa0-4753-a537-45deb08e3fe2/heartbeatTimeStamp",
135 "type": "text/plain"
136 },
137 {
138 "method": "GET",
139 "rel": "jobRequest",
140 "href": "/jobExecution/jobRequests/3c6338bf-a2a0-4d2a-89d2-22d64ffb69e4",
141 "uri": "/jobExecution/jobRequests/3c6338bf-a2a0-4d2a-89d2-22d64ffb69e4",
142 "type": "application/vnd.sas.job.execution.job.request"
143 },
144 {
145 "method": "GET",
146 "rel": "log",
147 "href": "/files/files/3d597573-e225-45cf-9b53-47ac4b2501c6",
148 "uri": "/files/files/3d597573-e225-45cf-9b53-47ac4b2501c6"
149 }
150 ]
151 }
152 ],
153 "limit": 10,
154 "version": 2
155}

Path Parameters

NameTypeRequiredDescription
jobRequestId
string
true

The ID of the job request.

Query Parameters

NameTypeRequiredDescription
filter
string<filter-criteria>
false

Filter criteria for returned jobs. The following queries are examples: Filter by name: /jobExecution/jobRequests/{jobRequestId}/jobs?filter=startsWith(name,'myJob') Filter by createdBy: /jobExecution/jobRequests/{jobRequestId}/jobs?filter=eq(createdBy, 'myUserId')

limit
integer
false

Represents the maximum number of jobs to return in this page of results. The actual number of returned jobs might be less if the collection has been exhausted. The default is 10.

sortBy
string<sort-criteria>
false

Specifies how to sort the returned jobs. The default sort order is descending on the creationTimeStamp field. The following sorts are examples: Sort ascending by ID: /jobExecution/jobRequests/{jobRequestId}/jobs?sortBy=id:ascending Sort descending by ID: /jobExecution/jobRequests/{jobRequestId}/jobs?sortBy=id:descending

start
integer
false

The zero-based index of the first job to return. The default is 0 (zero).

Header Parameters

NameTypeRequiredDescription
Delegate-Domain
string
false

Name of a credential domain of type OAuth2.0. The credential secret is retrieved to impersonate a group-managed service account for the current request.

Responses

StatusMeaningDescription
200OKThe request succeeded. The job requests (if any) are returned in a resource collection.Schema
400Bad RequestThe request was not valid. An invalid request occurs in the following scenarios: <ul> <li>A negative start value is provided.</li> <li>A negative limit value is provided. </li> <li>An unsupported field is specified in the sortBy parameter. </li> </ul> Schema
404Not FoundNo provider exists at the requested path.Schema