setAssetsContextState setassetscontextstate

Set or update the publish state for one or more assets. You can set separate publish states for each publish context in a company.

Authorized User Types section-815eb031f85143278c1560c18c5e3431

  • IpsUser
  • IpsAdmin
  • IpsCompanyAdmin
  • TrialSiteAdmin
  • TrialSiteUser
  • ImagePortalAdmin
  • ImagePortalUser
  • ImagePortalContrib
  • ImagePortalContribUser
NOTE
The user must have read access to return the asset.

Parameters section-009b9006de8e4c16ad657c47f28ace9f

Input (setAssetsContextStateParam)

Name
Type
Required
Description
companyHandle
xsd:string
Yes
Handle to the company.
assetsContextHandle
types:AssetsContextStateUpdateArray
Yes
An array of assets and their new publish states.

Output (setAssetsContexStateReturn)

Name
Type
Required
Description
successCount
xsd:int
Yes
The number of assets successfully changed.
warningCount
xsd:int
Yes
The number of warnings generated when the operation attempted to modify assets.
errorCount
xsd:int
Yes
The number of errors generated when the operation attempted to modify assets.
warningDetailArray
types:AssetOperationFaultArray
No
Array of errors generated by assets when the operation attempted to modify them.

Examples section-283a073f3cb14bcda5abed863c538aa4

This code sample sets the publication state of an asset using NotMarkedForPublish.

Request

<setAssetsContextStateParam xmlns="http://www.scene7.com/IpsApi/xsd/2011-11-04">
  <companyHandle>c|301</companyHandle>
  <assetsContextStateUpdateArray>
    <items>
      <assetHandle>a|27007</assetHandle>
      <contextStateUpdateArray>
        <items>
          <contextHandle>pc|3001</contextHandle>
          <publishState>NotMarkedForPublish</publishState>
        </items>
        <items>
          <contextHandle>pc|3002</contextHandle>
          <publishState>MarkedForPublish</publishState>
        </items>
        <items>
          <contextHandle>pc|3003</contextHandle>
          <publishState>NotMarkedForPublish</publishState>
        </items>
        <items>
          <contextHandle>pc|3004</contextHandle>
          <publishState>NotMarkedForPublish</publishState>
        </items>
      </contextStateUpdateArray>
    </items>
    <items>
      <assetHandle>a|27008</assetHandle>
      <contextStateUpdateArray>
        <items>
          <contextHandle>pc|3001</contextHandle>
          <publishState>MarkedForPublish</publishState>
        </items>
        <items>
          <contextHandle>pc|3002</contextHandle>
          <publishState>NotMarkedForPublish</publishState>
        </items>
        <items>
          <contextHandle>pc|3003</contextHandle>
          <publishState>NotMarkedForPublish</publishState>
        </items>
        <items>
          <contextHandle>pc|3004</contextHandle>
          <publishState>MarkedForPublish</publishState>
        </items>
      </contextStateUpdateArray>
    </items>
  </assetsContextStateUpdateArray>
</setAssetsContextStateParam>

Response

<setAssetsContextStateReturn xmlns="http://www.scene7.com/IpsApi/xsd/2011-11-04-beta">
  <successCount>8</successCount>
  <warningCount>0</warningCount>
  <errorCount>0</errorCount>
</setAssetsContextStateReturn>
recommendation-more-help
4e9b9d8c-5839-4215-aa35-01b652869681