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

  • IpsUser
  • IpsAdmin
  • IpsCompanyAdmin
  • TrialSiteAdmin
  • TrialSiteUser
  • ImagePortalAdmin
  • ImagePortalUser
  • ImagePortalContrib
  • ImagePortalContribUser
NOTE

The user must have read access to return the asset.

Parameters

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

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>

On this page