---
title: "大量編集ジョブコレクション"
slug: "mass-edit-job-collection-1523355"
abstract: ""
---
# 大量編集ジョブコレクション

大量編集ジョブコレクションリソースには、システム内に存在するすべての大量編集ジョブが含まれています。このリソースは新しい大量編集ジョブの投稿にも使用されます。対応手法: **GET**、**HEAD**、**POST**

## GET /api/massedits{?state,skip,take}

システム内のすべての大量編集ジョブのコレクションを含む[Mass Editジョブコレクション](https://doc.sitecore.com/ch/ja/developers/cloud-dev/mass-edit-job-collection.html "Mass edit job collection") オブジェクトを返します。

オプションとして、指定された状態に合致するジョブのみを返 **す状態フィルター** を追加することもできます。

## チャンク

1つのチャンクに収まるジョブ数を超えた場合、次のチャンクを取得するためのリンクが含まれます。

## 測距

**take**パラメータを使って指定されたジョブ数(最大100)を返します。**スキップ**パラメータを使って、どのジョブ範囲が返されるかをさらに判定します。

例示リクエスト:

GET http://<hostname>/api/massedits?state=Pending
Host: hostname
Accept: application/json

例回答:

HTTP/1.1 200 OK
Content-Length: content lengtha
Content-Type: application/json; charset=utf-8
ETag: "hash string"

{
 "items": 
 ... Mass Edit Job Objects
 ,
 "next",{
 "href":"http://<hostname>/api/massedits?skip=25"
 },
 "returned\_items":25,
 "self":{
 "href":"http://<hostname>/api/massedits"
 },
 "total\_items":78
}

## POST /api/massedits

大量編集ジョブを作成します。本文には完全な [「Create Mass Edit Job Request」オブジェクト](https://doc.sitecore.com/ch/ja/developers/cloud-dev/create-mass-edit-job-request.html "Create mass edit job request") が求められます。成功は**201 Created**レスポンスで示され、**Location**ヘッダーには新たに作成されたリソースのURLが記載されています。 **MassEdits**エンドポイントを使って、レンディションの更新や公開リンクの作成を行います。すべての例で応答は同じです。

標準的な大量編集の例:

POST http://<hostname>/api/massedits

{
 "selectionPool": "SelectionPool.Content",
 "subPoolId": null,
 "definitionName": "M.Asset",
 "operations":
 {
 "type":"SetProperty",
 "property":"AssetName",
 "culture":"en-US",
 "value":"New name for this asset."
 },
 {
 "type":"SetProperty",
 "property":"AssetTitle",
 "value":{
 "en-US":"New name for this asset.",
 "nl-BE":"De naam voor dit nieuwe asset."
 }
 },
 {
 "type":"ClearRelation",
 "relation":"AssetToAssetType",
 "role":"Child"
 },
 {
 "type":"AddRelation",
 "relation":"AssetToAssetType",
 "role":"Child",
 "value":
 {
 "href":"http://<hostname>/api/entities/14"
 },
 {
 "href":"http://<hostname>/api/entities/15"
 }
 
 },
 {
 "type":"RemoveRelation",
 "relation":"AssetToAssetType",
 "role":"Child",
 "value":
 {
 "href":"http://<hostname>/api/entities/16"
 }
 
 }
 
}

リフレッシュのリクエスト例:

POST http://<hostname>/api/massedits

{
 "selectionPool": "SelectionPool.Content",
 "subPoolId": null,
 "definitionName": "M.Asset",
 "operations": {
 "type": "RefreshRenditions",
 "value": {
 "renditions": ,
 "failed\_only": false,
 "refresh\_history": false,
 "refresh\_subfiles": false,
 "refresh\_user\_renditions": false
 }
 }
}

大量公開リンク作成の例:

POST http://<hostname>/api/massedits

{
 "selectionPool": "SelectionPool.Content",
 "subPoolId": null,
 "definitionName": "M.Asset",
 "operations": 
 {
 "type": "CreatePublicLinks",
 "value": 
 {
 "rendition": "downloadOriginal",
 "expirationDate": null
 }
 
 }
 
}

例回答:

HTTP/1.1 201 Created
Location: http://<hostname>/api/massedits/5549