Create a job request

post/jobRequests
Internal-Use Only

Creates a new job request. If the Job Request is submitted without an "expiresAfter" setting, it is the client's responsibility to delete the job from the system when it is no longer needed. A delete request can be issued using the job's "delete" link.

Request Samples

1

Response Samples

1{
2 "creationTimeStamp": "2018-03-12T19:37:28.318Z",
3 "modifiedTimeStamp": "2018-03-12T19:37:28.318Z",
4 "createdBy": "user1",
5 "modifiedBy": "user1",
6 "version": 3,
7 "id": "f9c52f58-9639-45ae-b24c-23cfff0b2f5b",
8 "name": "sashelp class distribution",
9 "description": "ods output with age 14 cutoff",
10 "jobDefinitionUri": "/jobDefinitions/definitions/dabd2a63-ae2f-4559-b110-ad989ff642a5",
11 "arguments": {
12 "AGE": "14",
13 "_contextName": "SAS Job Execution compute context"
14 },
15 "properties": [],
16 "createdByApplication": "jobrequestui",
17 "links": [
18 {
19 "method": "GET",
20 "rel": "self",
21 "href": "/jobExecution/jobRequests/f9c52f58-9639-45ae-b24c-23cfff0b2f5b",
22 "uri": "/jobExecution/jobRequests/f9c52f58-9639-45ae-b24c-23cfff0b2f5b",
23 "type": "application/vnd.sas.job.execution.job.request"
24 },
25 {
26 "method": "GET",
27 "rel": "export",
28 "href": "/jobExecution/jobRequests/f9c52f58-9639-45ae-b24c-23cfff0b2f5b",
29 "uri": "/jobExecution/jobRequests/f9c52f58-9639-45ae-b24c-23cfff0b2f5b",
30 "type": "application/vnd.sas.transfer.object"
31 },
32 {
33 "method": "DELETE",
34 "rel": "delete",
35 "href": "/jobExecution/jobRequests/f9c52f58-9639-45ae-b24c-23cfff0b2f5b",
36 "uri": "/jobExecution/jobRequests/f9c52f58-9639-45ae-b24c-23cfff0b2f5b"
37 },
38 {
39 "method": "PUT",
40 "rel": "update",
41 "href": "/jobExecution/jobRequests/f9c52f58-9639-45ae-b24c-23cfff0b2f5b",
42 "uri": "/jobExecution/jobRequests/f9c52f58-9639-45ae-b24c-23cfff0b2f5b",
43 "type": "application/vnd.sas.job.execution.job.request"
44 },
45 {
46 "method": "PUT",
47 "rel": "import",
48 "href": "/jobExecution/jobRequests/f9c52f58-9639-45ae-b24c-23cfff0b2f5b",
49 "uri": "/jobExecution/jobRequests/f9c52f58-9639-45ae-b24c-23cfff0b2f5b",
50 "type": "application/vnd.sas.transfer.object",
51 "responseType": "application/vnd.sas.summary"
52 },
53 {
54 "method": "GET",
55 "rel": "up",
56 "href": "/jobExecution/jobRequests",
57 "uri": "/jobExecution/jobRequests",
58 "type": "application/vnd.sas.collection",
59 "itemType": "application/vnd.sas.job.execution.job.request"
60 },
61 {
62 "method": "GET",
63 "rel": "jobs",
64 "href": "/jobExecution/jobRequests/f9c52f58-9639-45ae-b24c-23cfff0b2f5b/jobs",
65 "uri": "/jobExecution/jobRequests/f9c52f58-9639-45ae-b24c-23cfff0b2f5b/jobs",
66 "type": "application/vnd.sas.collection",
67 "itemType": "application/vnd.sas.job.execution.job"
68 },
69 {
70 "method": "POST",
71 "rel": "submitJob",
72 "href": "/jobExecution/jobRequests/f9c52f58-9639-45ae-b24c-23cfff0b2f5b/jobs",
73 "uri": "/jobExecution/jobRequests/f9c52f58-9639-45ae-b24c-23cfff0b2f5b/jobs",
74 "responseType": "application/vnd.sas.job.execution.job"
75 }
76 ]
77}

Query Parameters

NameTypeRequiredDescription
parentFolderUri
string
false

The URI of the parent folder in which to save the job request.

Request Body

The job request to be created.

The job request.

NameTypeRequiredDescription
id
string
false

The unique identifier for the job request. This is only required for a persisted job request.

name
string
false

The name of the job request.

description
string
false

The description of the job request.

creationTimeStamp
string<date-time>
false

The timestamp when the job request was created. It uses the format YYYY-MM-DDThh:mm:ss.sssZ. This is set only on a persisted job request.

modifiedTimeStamp
string<date-time>
false

The timestamp when the job request was last modified. It uses the format YYYY-MM-DDThh:mm:ss.sssZ. This is set only on a persisted job request.

createdBy
string
false

The name of the user who created the job request. This is set only on a persisted job request.

modifiedBy
string
false

The name of the last user who modified this object. This is set only on a persisted job request

jobDefinitionUri
string
false

The URI of the job definition that is to be executed. Either the jobDefinitionUri or the jobDefinition property must be set in a job request submitted to Job Execution service for execution.

jobDefinition
Job Definition Schema
false

The job definition.

expiresAfter
string
false

The duration of time (in W3C XML duration format) after the completion of the job when the job must be deleted by the Job Execution service. If a value is specified for this property, it overrides any value specified by the provider's /commons/settings endpoint for the job request. For a job request that is embedded in the application/vnd.sas.job.execution.job media type, if a value is not already set for the expiresAfter property, the value is set by the Job Execution service to the provider's value, if one exists.

arguments
object
false

The values of the arguments are name-value pairs specified as a map of string keys and values. Values can be supplied for parameters not defined in the job definition. The maximum name length is 100. Hibernate does not persist a map entry with a null value. Therefore, a persisted Job Request does not contain such entries. For a job request that is embedded in the 'application/vnd.sas.job.execution.job' media type, this value is set by the Job Execution service and contains the complete set of arguments to use in the execution by the provider. Arguments that already exist in the original job request are left unchanged. If there are arguments in the job definition that do not exist in the original job request arguments map, those arguments and any default values, including null values, are added to the arguments map. However, because the Job object is persisted before being sent to the provider, no entries for such null-value arguments in the Job are sent to the provider (because of the Hibernate behavior of not persisting map/collection entries with null values). The Job Execution service also guarantees that any required argument has an associated non-null value.

properties
array [Resource Property]
false

The value of properties are name-value pairs specified as a map of string keys and values. The maximum name length is 100.

createdByApplication
string
false

The application that created the job request. The value is typically from the spring.application.name property. The value is used as the "creator" in the routing key of the Job State Change events, and if it is not present in the job request the value "jobExecution" is used. Valid characters are [a-zA-Z0-9] and the hyphen.

<= 64 characters
links
array [Link]
false

Links that apply to this object. Includes "self", "alternate", "export", "delete", "update", "import", "up", "jobs" and "submitJob".

version
integer
false

The version number of the representation. The current version is 3.

Responses

StatusMeaningDescription
201CreatedThe job request was created.HeadersSchema
400Bad RequestThe request was not valid.Schema