Newer Version Available
PackagePushRequest
Supported Calls
create(), describeSObjects(), query(), retrieve(), update(), upsert()
Fields
| Field Name | Details |
|---|---|
| PackageVersionId |
|
| ScheduledStartTime |
|
| Status |
|
Usage
Suppose that you want to push version 3.4.6 of your package to all orgs. You’ve already identified the orgs eligible for the upgrade by using MetadataPackageVersion. Now let’s write some code to create a push request, which holds a push job for each eligible org.
This code sample uses the Web Services Connector (WSC).
Or, if you’re using REST API, submit a POST request to the PackagePushRequest sObject endpoint, as in the following example. SOAP API is also supported.
As your next step, create a push job for each eligible subscriber you want to upgrade using PackagePushJob.
Scheduling the Push Upgrade
To signal that the push upgrade is ready to be processed, change the status of the push request to Pending. If you didn’t set a ScheduledStartTime, the push upgrade starts immediately after you change the status.
If you’re using REST API, submit a PATCH request to the PackagePushRequest sObject endpoint, as in the following example. SOAP API is also supported.
Checking the Status of a Push Request
You can also check the status of a job by querying the PackagePushJob’s Status field.
Aborting a Push Request
You can abort a package push request by changing its status to Canceled.
You can abort a package push request only if its status is Created or Pending. If the abort succeeds, all associated push jobs are also canceled. If you try to abort when the current PackagePushRequest status is Canceled, Succeeded, Failed, or In Progress, the abort does not occur, and an error message is returned.