setAssetsContextState setassetscontextstate

设置或更新一个或多个资源的发布状态。 您可以为公司中的每个发布上下文设置单独的发布状态。

授权用户类型 section-815eb031f85143278c1560c18c5e3431

  • IpsUser
  • IpsAdmin
  • IpsCompanyAdmin
  • TrialSiteAdmin
  • TrialSiteUser
  • ImagePortalAdmin
  • ImagePortalUser
  • ImagePortalContrib
  • ImagePortalContribUser
NOTE
用户必须具有读取权限才能返回资产。

参数 section-009b9006de8e4c16ad657c47f28ace9f

输入(setAssetsContextStateParam)

名称
类型
必需
说明
companyHandle
xsd:string
处理公司。
assetsContextHandle
types:AssetsContextStateUpdateArray
一系列资源及其新发布状态。

输出(setAssetsContexStateReturn)

名称
类型
必需
说明
successCount
xsd:int
已成功更改资源数。
warningcount
xsd:int
操作尝试修改资源时生成的警告数。
errorCount
xsd:int
操作尝试修改资源时生成的错误数。
warningDetailArray
types:AssetOperationFaultArray
操作尝试修改资源时资源生成的错误数组。

示例 section-283a073f3cb14bcda5abed863c538aa4

此代码示例使用NotMarkedForPublish设置资源的发布状态。

请求

<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>

响应

<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