Execution Resource
The execution resource gives you access to view and manipulate the execution entity using the CloudRest API.
The following actions are available through the execution resource.
Create Execution
Create an execution object in preparation for job execution.
Use the PUT method for this action.
URL
https://datacloud2.pervasive.com/EntityAPIService/REST/execution?provisioningid={id}&s={sessionId}
Parameters
Example
Request
PUT https://datacloud2.pervasive.com/EntityAPIService/REST/execution?s=49bfe32d-df30-4797-a8b1-96da5c1b5609&provisioningid=12349
HTTP/1.1
Host: datacloud2.pervasive.com
Content-Length: 0
Response
Header
HTTP/1.1 200 OK
Content-Type: application/xml
Date: Thu, 10 Nov 2011 21:06:00 GMT
Server: Sun GlassFish Enterprise Server v2.1.1
X-Powered-By: Servlet/2.5
Content-Length: 0
Connection: keep-alive
Start Execution
Start an execution referenced by ID.
Use the POST method for this action.
URL
https://datacloud2.pervasive.com/EntityAPIService/REST/execution/{executionid}/start?s={sessionId}
Parameters
Example
Request
POST https://datacloud2.pervasive.com/EntityAPIService/REST/execution/ff893b0e-1dee-44f7-94dc-937afd837595/start?s=45495b9d-4228-4d98-9997-d3c353fb3ff1
HTTP/1.1
Host: datacloud2.pervasive.com
Response
Header
HTTP/1.1 200 OK
Content-Type: application/xml
Date: Wed, 16 Nov 2011 10:49:03 GMT
Server: Sun GlassFish Enterprise Server v2.1.1
X-Powered-By: Servlet/2.5
Content-Length: 0
Connection: keep-alive
Stop Execution
Stop an execution referenced by ID.
Use the POST method for this action.
URL
https://datacloud2.pervasive.com/EntityAPIService/REST/execution/{executionid}/stop?s={sessionId}
Parameters
Example
Request
POST https://datacloud2.pervasive.com/EntityAPIService/REST/execution/ff893b0e-1dee-44f7-94dc-937afd837595/stop?s=45495b9d-4228-4d98-9997-d3c353fb3ff1
HTTP/1.1
Host: datacloud2.pervasive.com
Response
Header
HTTP/1.1 200 OK
Content-Type: application/xml
Date: Wed, 16 Nov 2011 10:54:49 GMT
Server: Sun GlassFish Enterprise Server v2.1.1
X-Powered-By: Servlet/2.5
Content-Length: 0
Connection: keep-alive
List Executions
List the executions associated with the current user and specified provisioning.
Use the GET method for this action.
URL
https://datacloud2.pervasive.com/EntityAPIService/REST/execution?start={start}&max={max}&provisioningid={id}&s={sessionId}
The following response types are available via the optional Accept header in your request:
• application/xml (default)
• application/json
• text/xml
Parameters
Example
Request
GET https://datacloud2.pervasive.com/EntityAPIService/REST/execution?max=5&start=0&s=49bfe32d-df30-4797-a8b1-96da5c1b5609&provisioningid=12349
HTTP/1.1
Host: datacloud2.pervasive.com
Response
Header
HTTP/1.1 200 OK
Content-Type: application/xml
Date: Thu, 10 Nov 2011 20:40:29 GMT
Server: Sun GlassFish Enterprise Server v2.1.1
X-Powered-By: Servlet/2.5
Content-Length: 2317
Connection: keep-alive
application/xml
<Execution xmlns:ns2="http://datasolutions.pervasive.com/api/entity">
<item id="4daedca2-41f4-45e8-bc87-687c92ae0518">
<owner id="171">testuser</owner>
<currentTime>2011-11-10T20:40:29.412Z</currentTime>
<parameters>
<parameter secure="true" key="key"/>
</parameters>
<provisioning>12349</provisioning>
<scheduledTime>2011-11-10T16:06:45.095Z</scheduledTime>
</item>
.
.
.
</Execution>
application/json
{"item": [
{
"@id": "4daedca2-41f4-45e8-bc87-687c92ae0518",
"owner": {
"@id": "171",
"$": "testuser"
},
"currentTime": "2011-11-10T20:42:22.042Z",
"parameters": {
"parameter": {
"@secure": "true",
"@key": "key"
}},
"provisioning": "12349",
"scheduledTime": "2011-11-10T16:06:45.095Z"
},
{
"@id": "89d594c5-132c-4e53-8064-d592c31592dd",
"owner": {
"@id": "171",
"$": "testuser"
},
"currentTime": "2011-11-10T20:42:22.046Z",
"finishTime": "2011-10-20T12:39:56.589Z",
"logFile": "provisioning/12349/log/89d594c5-132c-4e53-8064-d592c31592dd",
"parameters": null,
"provisioning": "12349",
"scheduledTime": "2011-10-20T12:33:39.433Z",
"server": "ip-10-84-67-142.ec2.internal",
"startTime": "2011-10-20T12:36:21.042Z"
}
]}
text/xml
<Execution>
<item id="4daedca2-41f4-45e8-bc87-687c92ae0518">
<owner id="171">testuser</owner>
<currentTime>2011-11-10T20:40:30.668Z</currentTime>
<parameters>
<parameter secure="true" key="key"/>
</parameters>
<provisioning>12349</provisioning>
<scheduledTime>2011-11-10T16:06:45.095Z</scheduledTime>
</item>
.
.
.
</Execution>
Find Execution
Return an execution by ID.
Use the GET method for this action.
URL
https://datacloud2.pervasive.com/EntityAPIService/REST/execution/{executionid}?s={sessionId}
The following response types are available via the optional Accept header in your request:
• application/xml (default)
• application/json
• text/xml
Parameters
Example
Request
GET https://datacloud2.pervasive.com/EntityAPIService/REST/execution/4daedca2-41f4-45e8-bc87-687c92ae0518?s=49bfe32d-df30-4797-a8b1-96da5c1b5609 HTTP/1.1
Host: datacloud2.pervasive.com
Response
Header
HTTP/1.1 200 OK
Content-Type: application/xml
Date: Thu, 10 Nov 2011 20:46:56 GMT
Server: Sun GlassFish Enterprise Server v2.1.1
X-Powered-By: Servlet/2.5
Content-Length: 418
Connection: keep-alive
application/xml
<Execution id="4daedca2-41f4-45e8-bc87-687c92ae0518" xmlns:ns2="http://datasolutions.pervasive.com/api/entity">
<owner id="171">testuser</owner>
<currentTime>2011-11-10T20:46:56.710Z</currentTime>
<parameters>
<parameter secure="true" key="key"/>
</parameters>
<provisioning>12349</provisioning>
<scheduledTime>2011-11-10T16:06:45.095Z</scheduledTime>
</Execution>
application/json
{
"@id": "4daedca2-41f4-45e8-bc87-687c92ae0518",
"owner": {
"@id": "171",
"$": "testuser"
},
"currentTime": "2011-11-10T20:51:31.341Z",
"parameters": {"parameter": {
"@secure": "true",
"@key": "key"
}},
"provisioning": "12349",
"scheduledTime": "2011-11-10T16:06:45.095Z"
}
text/xml
<Execution id="4daedca2-41f4-45e8-bc87-687c92ae0518">
<owner id="171">testuser</owner>
<currentTime>2011-11-10T20:46:58.656Z</currentTime>
<parameters>
<parameter secure="true" key="key"/>
</parameters>
<provisioning>12349</provisioning>
<scheduledTime>2011-11-10T16:06:45.095Z</scheduledTime>
</Execution>
Edit Execution
Edit an execution object that has not yet been started.
Use the POST method for this action. Supply the complete execution object in the body of your request.
URL
https://datacloud2.pervasive.com/EntityAPIService/REST/execution?s={sessionId}
Parameters
Example
Request
POST https://datacloud2.pervasive.com/EntityAPIService/REST/execution?s=49bfe32d-df30-4797-a8b1-96da5c1b5609 HTTP/1.1
Content-Type: text/xml
Host: datacloud2.pervasive.com
Content-Length: 137
Body
<Execution id="88039b65-33dd-470f-b721-4d883305c085">
<parameters>
<parameter key='mykey1'>myvalue</parameter>
</parameters>
</Execution>
Response
Header
HTTP/1.1 200 OK
Content-Type: application/xml
Date: Thu, 10 Nov 2011 21:02:39 GMT
Server: Sun GlassFish Enterprise Server v2.1.1
X-Powered-By: Servlet/2.5
Content-Length: 0
Connection: keep-alive