Difference between revisions of "REST API:packageDeploy Status Resource"

From LongJump Support Wiki
imported>Aeric
m (Text replace - '<tt><nowiki>https://{domain}/networking' to '<tt>{{platformURL}}')
imported>Aeric
 
Line 3: Line 3:
;Method:GET
;Method:GET
   
   
;URI:<tt>{{platformURL}}/rest/status/packageDeploy/{jobId}</nowiki></tt>
;URI:<tt>{{platformURL}}/rest/status/packageDeploy/{jobId}</tt>


;Response:
;Response:
Line 39: Line 39:
;Method:GET
;Method:GET


;URI:<tt>{{platformURL}}/rest/status/packageDeploy?{query_parameters}</nowiki></tt>
;URI:<tt>{{platformURL}}/rest/status/packageDeploy?{query_parameters}</tt>


{{:REST API:Dynamic Search}}
{{:REST API:Dynamic Search}}

Latest revision as of 22:02, 30 March 2012

Get Package Deployment Status

Method
GET
URI
https://na.longjump.com/networking/rest/status/packageDeploy/{jobId}
Response
<platform>
    <packageDeploy>
	<date_created>2011-01-08T14:24:03Z</date_created>
	<created_id type="USER" 
	  uri="https://{domain}/networking/rest/user/qwe123rty456" 
	  displayValue="Smith Bob">qwe123rty456</created_id>
  <id>zig789fez098</id>
	<packageName>Order Processing</packageName>
	<totalDeployments>2</totalDeployments>
	<successfulDeployments>2</successfulDeployments>
	<failedDeployments>0</failedDeployments>
	<summary>
1096387182;;Tenant1;;1;;N/A||1254445340;;Tenant2;;1;;N/A||
	</summary>
	<statusCode>4</statusCode>
	<status>Deployment Completed</status>
	<processStartDate>2011-01-09T02:00:00Z</processStartDate>
	<processEndDate>2011-01-09T02:00:03Z</processEndDate>
    </packageDeploy>

    <message>
        <code>0</code>
        <description>Success</description>
    </message>
</platform>
See also: REST API:Error Codes

Dynamic Search for Package Deployment Status Records

Method
GET
URI
https://na.longjump.com/networking/rest/status/packageDeploy?{query_parameters}
Query Parameters
  • fieldList - A comma-separated list of field names to retrieve
  • The asterisk (*) wildcard specifies all fields
  • Use the REST API:field Resource to get a complete list of fields
  • Field lists for database views need to specify the object's alias, as well as the field name.
  • filter - Filtering criteria to filter the records
  • pageSize - Number of records to retrieve from the result set in order to make a "page".
  • page - Number of the logical page in a database result set. The first page is page "zero" (0).
Page zero is returned by default, so appending &pageSize=1 to your query returns a single record.
  • getTotalRecordCount returns the number of total records.
    Causes the following structure to be returned, where N is the total number of records:
<platform> 
   ...
   <message>
      <code>0</code>
      <description>Success</description>
   </message>

   <!-- added by the query param -->
   <totalRecordCount>N</totalRecordCount> 
</platform>
  • sortBy - Field name for primary sort
    Ex: &sortBy=name
  • sortOrder - Sort order of the primary field, either "asc" or "desc" (ascending or descending)
    Ex: &sortOrder="desc"
  • sortBy2 - Field name for secondary sort
  • sortOrder2 - Sort order of the second field, either "asc" or "desc" (ascending or descending)
For more information, see: Specifying Query Parameters in REST APIs
Sample Search
?fieldList=packageName,id,status,processEndDate
(Field names are in the Fields section.)
Response
<platform>
    <status>
        <packageDeploy>
            <id>far987bar6544</id>
            <packageName>Inventory Management</packageName>
            <status>Deployment Completed</status>
            <processEndDate>2011-01-09T12:01:03Z</processEndDate>
        </packageDeploy>
    </status>
	
    <status>
        <packageDeploy>
            <id>zig789fez098</id>
            <packageName>Order Processing</packageName>
            <status>Deployment Completed</status>
            <processEndDate>2011-01-09T12:01:58Z</processEndDate>
        </packageDeploy>
    </status>
	 
    <message>
        <code>0</code>
        <description>Success</description>
    </message>
    <recordCount>2</recordCount>
</platform>
See also: REST API:Error Codes

Fields

Name Type Description
id String ID of the scheduled package-deployment job
packageName String Name of the package that was deployed.
totalDeployments String Number of deployments attempted
successfulDeployments String Number of deployments that succeeded
failedDeployments String Number that failed
summary String A string showing the results of all deployments, following the pattern:
{tenant1 ID};; {tenant1 name};; 1;; N/A ||
{tenant2 ID};; {tenant2 name};; 0;; {failure message}

where:
  • Records are separated by ||
  • Fields are separated by ;;
  • 1 is the success code, followed by "N/A" (not applicable)
  • 0 is the failure code, followed by a failure message
statusCode String Status code. (See table below)
status String Status message. (See table below)
objectName String Object into which data is imported
processStartDate Date Date and time the import started, in UTC Format
processEndDate String Date and time the import completed, in UTC Format
date_created Date Date and time the import job was submitted, in UTC Format
created_id Lookup ID of the User who created the job
 

Scheduled jobs may be in one of the following states. (Constants are defined in com.platform.api.CONSTANTS.STATUS)

statusCode
(int)
status
(String)

Description
IN_PROCESS_QUEUE "In process queue" Job has been accepted by the scheduler.
STARTED "Started" Job is currently being processed.
COMPLETED "Completed" Job finished.
WAITING_TO_BE_STOPPED "Waiting to be stopped" Job started, but user has issued a STOP request.
Processing is continuing until an appropriate stopping-point is reached. (Note: The STOP operation is not available for all jobs.)
STOPPED "Stopped" Job was stopped by user.