WorkflowDataAPIプラグイン

「WorkflowDataAPIプラグイン」はMovable TypeのWorkflowプラグインをDataAPIに対応させるためのプラグインです。
Workflowプラグインとセットでご利用ください。

主な機能

制約事項

動作確認環境

ライセンス・価格

MT7全グレード共通 107,800円/1インストールMT(消費税込)

銀行振り込みによるお支払いも可能です。振り込み先につきましてはお問い合わせのページからご連絡ください。※振込み手数料はご負担願います。

注:PayPalでのお支払い時にプラグインのダウンロードはできません(場合によってはお支払い後に404 Not Foundになるかもしれませんが入金は正常に完了しています)。入金を確認後、製品版をメールにてお送り致します(入金確認と送付は手作業のためすぐにお送りできないことがあります)。プラグイン送付はPayPalからの支払受領通知をもとに行っていますがまれに通知が届かないことがあります。数日経ってもプラグインが送付されない場合、大変お手数ですがお問い合わせのページからお問い合わせ願えますでしょうか。

2022.05.05 v1.00 初版
2022.12.15 v1.01 カテゴリセットのデータが取得できない不具合を修正

インストール

ダウンロードアーカイブを展開したpluginsフォルダにある「WorkflowDataAPI」フォルダをMovable Typeのpluginsディレクトリにアップロードします。アップロード後、システム管理画面の「ツール」→「プラグイン」で「WorkflowDataAPI~」が表示されていればインストール完了です。

API

注:仕様は予告なしに変更する場合があります。

記事の取得

GET
/sites/:site_id/workflow_entries/:entry_id

Response 200

ヘッダ
Content-Type: application/json

ボディ(サンプル)

{
    "allow_comments": "0",
    "allow_pings": "0",
    "assets": [{
        "100": 76,
        "asset_id": "2",
        "asset_name": "bug-pbmt-white.png",
        "asset_thumb": "http://133.242.151.32/MT7-R5005/first_weblog/assets_c/2022/02/bug-pbmt-white-thumb-100xauto-2.png",
        "asset_type": "image"
    }, {
        "100": 76,
        "asset_id": "3",
        "asset_name": "bug-pbmt-black.png",
        "asset_thumb": "http://133.242.151.32/MT7-R5005/first_weblog/assets_c/2022/02/bug-pbmt-black-thumb-100xauto-3.png",
        "asset_type": "image"
    }],
    "author": {
        "display_name": "writer",
        "id": "2",
        "name": "writer"
    },
    "authored_on": "20220505132657",
    "basename": "aaabbbccc789",
    "blog_id": "1",
    "categories": [{
        "basename": "ddd",
        "fields": [],
        "id": "52",
        "label": "ddd",
        "path": []
    }, {
        "basename": "cat",
        "fields": [],
        "id": "43",
        "label": "cat",
        "path": []
    }, {
        "basename": "aaa",
        "fields": [],
        "id": "14",
        "label": "AAA",
        "path": []
    }, {
        "basename": "bbb",
        "fields": [],
        "id": "13",
        "label": "BBB",
        "path": ["14"]
    }],
    "class": "entry",
    "comment_count": "0",
    "convert_breaks": "richtext",
    "created_on": "20220506164020",
    "customfields": [{
        "basename": "cftextarea",
        "value": "aaa123456"
    }, {
        "basename": "cfcheckbox",
        "value": "1"
    }, {
        "basename": "cfimage",
        "value": ""
    }],
    "excerpt": "excerpt789",
    "id": "484",
    "is_workflow": "0",
    "keywords": "key789",
    "modified_on": "20220506201540",
    "order": {
        "max": "2",
        "user": "2"
    },
    "republish": "0",
    "selected_categories": ["43", "13"],
    "status": "2",
    "tags": "ddd,eee",
    "text": "test789",
    "text_more": "foo789",
    "title": "SixApart123",
    "unpublished_on": null
}

コンテンツデータの取得

GET
/sites/:site_id/contentTypes/:content_type_id/workflow_data/:content_data_id

Response 200

ヘッダ
Content-Type: application/json

ボディ(サンプル)

{
    "approvers": [{
        "id": "3",
        "name": "manager"
    }],
    "author": {
        "display_name": "writer",
        "id": "2",
        "name": "writer"
    },
    "authored_on": "20220407205922",
    "blog_id": "1",
    "content_type_id": "2",
    "created_on": "20220506172642",
    "ct_unique_id": "2cfe89e066d43b3aebc977062cbe144f74bfdea4",
    "fields": [{
        "can_edit": 1,
        "data_type": "varchar",
        "field_html": null,
        "id": "7",
        "options": {
            "description": "",
            "display": "default",
            "initial_value": "",
            "label": "\u540d\u524d",
            "max_length": "255",
            "min_length": "0",
            "required": "1"
        },
        "order": "1",
        "type": "single_line_text",
        "type_label": "\u30c6\u30ad\u30b9\u30c8",
        "unique_id": "41e3f15450b86de3e8293cb7caae12207b224a50",
        "value": "aaa123456"
    }, {
        "can_edit": 1,
        "data_type": "double",
        "field_html": null,
        "id": "8",
        "options": {
            "decimal_places": "0",
            "description": "",
            "display": "default",
            "initial_value": "",
            "label": "\u4fa1\u683c",
            "max_value": "2147483647",
            "min_value": "-2147483648",
            "required": "0"
        },
        "order": "2",
        "type": "number",
        "type_label": "\u6570\u5024",
        "unique_id": "2fbc573fe072e9e3cf8b1004978ccde773f88f6d",
        "value": "777888"
    }, {
        "can_edit": 1,
        "content_data_loop": [],
        "data_type": "integer",
        "field_html": null,
        "id": "18",
        "options": {
            "description": "",
            "display": "default",
            "label": "\u30b3\u30f3\u30c6\u30f3\u30c4\u30bf\u30a4\u30d7",
            "max": "",
            "min": "",
            "multiple": "0",
            "required": "0",
            "source": "4"
        },
        "order": "3",
        "type": "content_type",
        "type_label": "\u30b3\u30f3\u30c6\u30f3\u30c4\u30bf\u30a4\u30d7",
        "unique_id": "46a4c2fee15bd63694fe89f40120b2e9883a1f98",
        "value": []
    }, {
        "can_edit": 1,
        "data_type": "varchar",
        "field_html": null,
        "id": "30",
        "options": {
            "description": "",
            "display": "default",
            "label": "\u30c1\u30a7\u30c3\u30af\u30dc\u30c3\u30af\u30b9",
            "max": "",
            "min": "",
            "multiple": "1",
            "required": "0",
            "values": [{
                "checked": "checked=\"checked\"",
                "l": "\u3042\u3042\u3042",
                "v": "aaa"
            }, {
                "l": "\u3044\u3044\u3044",
                "v": "bbb"
            }]
        },
        "order": "4",
        "type": "checkboxes",
        "type_label": "\u30c1\u30a7\u30c3\u30af\u30dc\u30c3\u30af\u30b9",
        "unique_id": "c61ac04110c70a921acb9655a9b7c34c04176a9b",
        "value": ["aaa"]
    }, {
        "asset_loop": [{
            "asset_blog_id": "1",
            "asset_dimensions": "80 x 61 \u30d4\u30af\u30bb\u30eb",
            "asset_file_name": "bug-pbmt-black.png",
            "asset_file_size": "1.6 KB",
            "asset_id": "3",
            "asset_label": "bug-pbmt-black.png",
            "asset_preview_height": "61",
            "asset_preview_url": "/cgi-bin/MT7-R5005/mt.cgi?__mode=thumbnail_image&width=80&ts=20220214215934&blog_id=1&id=3&height=61",
            "asset_preview_width": null,
            "asset_type": "image"
        }],
        "can_edit": 1,
        "data_type": "integer",
        "field_html": null,
        "id": "31",
        "options": {
            "allow_upload": "0",
            "description": "",
            "display": "default",
            "label": "\u753b\u50cf",
            "max": "",
            "min": "",
            "multiple": "0",
            "required": "0"
        },
        "order": "5",
        "type": "asset_image",
        "type_label": "\u753b\u50cf\u30a2\u30bb\u30c3\u30c8",
        "unique_id": "d267b1a7308b1ebe44d92f4ca0fb511778eeaadd",
        "value": ["3"]
    }],
    "id": "99",
    "identifier": "7d9d9046f91aa8ada69f82fb4f8f62007d6f779d",
    "is_workflow": "0",
    "label": "test123456",
    "modified_on": "20220506203737",
    "object_label": "\u5546\u54c1",
    "object_type": "content_data",
    "order": {
        "max": "2",
        "user": "1"
    },
    "republish": "0",
    "status": "10",
    "unique_id": "11d27e441eab12e651dfcf39b83189684f47567e",
    "unpublished_on": null
}

記事の承認依頼・承認・差し戻し(未公開状態)

PUT
/sites/:site_id/entries/:entry_id

dataボディ(サンプル)

{
            approvers: [ 3 ],
            approve_message: "OKOKOK",
            title: "SixApart123456",
            text: "test789012",
            text_more: "foo789012",
            excerpt: "excerpt789012",
            keywords: "key789",
            status: "4",
            allow_comments: 0,
            allow_pings: 0,
            basename: "aaabbbccc789",
            comment_count: 0,
            convert_breaks: "richtext",
            authored_on: "20220407205922",
            modified_on: "20220418222222",
            assets: [{
                id: 2
            },{
                id: 3
            }],
            categories: [{
                id: 43
            },{
                id: 13
            }],
            tags: "ddd,eee",
            customfields: [{
                basename: "cftextarea",
                value: "aaa123456"
            },{
                basename: "cfcheckbox",
                value: 1
            }]
    }

Response 200

ボディ(サンプル)
注:既存のAPI出力のため、再利用は非推奨です。

{
  "allowComments": false,
  "assets": [
    {
      "blog": {
        "id": "1"
      },
      "class": "image",
      "createdBy": {
        "displayName": "mtbook",
        "userpicUrl": null
      },
      "createdDate": "2022-12-14T22:13:35+09:00",
      "customFields": [],
      "description": null,
      "fileExtension": "jpg",
      "filename": "UB2022091000909285_20220911104211_1.jpg",
      "id": "1",
      "label": "UB2022091000909285_20220911104211_1.jpg",
      "meta": {
        "fileSize": 861872,
        "height": 2602,
        "width": 1952
      },
      "mimeType": "image/jpeg",
      "modifiedDate": "2022-12-14T22:13:35+09:00",
      "parent": null,
      "tags": [],
      "type": "画像",
      "updatable": false,
      "url": "http://133.242.151.32/MT7-R5402/first_weblog/UB2022091000909285_20220911104211_1.jpg"
    },
    {
      "blog": {
        "id": "1"
      },
      "class": "image",
      "createdBy": {
        "displayName": "mtbook",
        "userpicUrl": null
      },
      "createdDate": "2022-12-14T22:13:38+09:00",
      "customFields": [],
      "description": null,
      "fileExtension": "jpg",
      "filename": "UB2022091000909285_20220911104211_2.jpg",
      "id": "2",
      "label": "UB2022091000909285_20220911104211_2.jpg",
      "meta": {
        "fileSize": 853780,
        "height": 2548,
        "width": 1911
      },
      "mimeType": "image/jpeg",
      "modifiedDate": "2022-12-14T22:13:38+09:00",
      "parent": null,
      "tags": [],
      "type": "画像",
      "updatable": false,
      "url": "http://133.242.151.32/MT7-R5402/first_weblog/UB2022091000909285_20220911104211_2.jpg"
    }
  ],
  "author": {
    "displayName": "writer",
    "userpicUrl": null
  },
  "basename": "aaabbbccc789",
  "blog": {
    "id": "1"
  },
  "body": "test789012",
  "categories": [
    {
      "id": 142,
      "label": "cat2",
      "parent": "0"
    },
    {
      "id": 143,
      "label": "cat1",
      "parent": "0"
    }
  ],
  "class": "entry",
  "commentCount": 0,
  "comments": [],
  "createdDate": "2022-12-05T22:40:29+09:00",
  "customFields": [
    {
      "basename": "cftextarea",
      "value": null
    },
    {
      "basename": "cfcheckbox",
      "value": null
    }
  ],
  "date": "2022-04-07T20:59:22+09:00",
  "excerpt": "excerpt789012",
  "format": "richtext",
  "id": 2,
  "keywords": "key789",
  "modifiedDate": "2022-12-14T22:16:44+09:00",
  "more": "foo789012",
  "permalink": "http://133.242.151.32/MT7-R5402/first_weblog/2022/04/aaabbbccc789.html#000002",
  "status": "Publish",
  "tags": [],
  "title": "SixApart123456",
  "unpublishedDate": null,
  "updatable": true
}

コンテンツデータの承認依頼・承認・差し戻し(未公開状態)

PUT
/sites/:site_id/contentTypes/:content_type_id/data/:content_data_id

dataボディ(サンプル)

{
            approvers: [ 3 ],
            status: "10",
            authored_on: "20220407205922",
            modified_on: "20220418222222",
            fields: [{
                id: 7,
                type: "single_line_text",
                value: "aaa123456"
            },{
                id: 8,
                type: "number",
                value: "777888"
            },{
                id: 18,
                type: "content_type",
                value: []
            },{
                id: 30,
                type: "checkboxes",
                value: [ "aaa" ]
            },{
                id: 31,
                type: "asset_image",
                value: [ 3 ]
            }],
            label: "test",
            identifier: "7d9d9046f91aa8ada69f82fb4f8f62007d6f779d",
            unique_id: "7d9d9046f91aa8ada69f82fb4f8f62007d6f779d"
    }

Response 200

ボディ(サンプル)
注:既存のAPI出力のため、再利用は非推奨です。

{
  "author": {
    "displayName": "writer",
    "userpicUrl": null
  },
  "basename": "def6decc71301a52e9a760d6d8f7fdc497f54d8",
  "blog": {
    "id": "1"
  },
  "createdDate": "2022-12-13T21:35:04+09:00",
  "data": [
    {
      "data": "test123",
      "id": "7",
      "label": "名前",
      "type": "single_line_text"
    },
    {
      "data": "111",
      "id": "8",
      "label": "価格",
      "type": "number"
    },
    {
      "data": [
        "1"
      ],
      "id": "182",
      "label": "カテゴリ",
      "type": "categories"
    }
  ],
  "date": "2022-05-05T14:35:01+09:00",
  "id": 52,
  "label": "test",
  "modifiedDate": "2022-12-14T21:49:12+09:00",
  "permalink": "http://133.242.151.32/MT7-R5402/first_weblog/author/writer/def6decc71301a52e9a760d6d8f7fdc497f54d8.html",
  "status": "Review",
  "unpublishedDate": null,
  "updatable": true
}

記事の承認依頼・承認・差し戻し(公開状態)

PUT
/sites/:site_id/workflow_entries/:entry_id

dataボディ(サンプル)

{
            approvers: [ 3 ],
            title: "SixApart123",
            text: "test789",
            text_more: "foo789",
            excerpt: "excerpt789",
            keywords: "key789",
            status: "110",
            allow_comments: 0,
            allow_pings: 0,
            basename: "aaabbbccc789",
            comment_count: 0,
            convert_breaks: "richtext",
            authored_on: "20220505132657",
            modified_on: "20220505133727",
            assets: [{
                id: 2
            },{
                id: 3
            }],
            categories: [{
                id: 43
            },{
                id: 13
            }],
            tags: "ddd,eee",
            customfields: [{
                basename: "cftextarea",
                value: "aaa123456"
            },{
                basename: "cfcheckbox",
                value: 1
            }]
    }

Response 200

ボディ(サンプル)

{
  "status": "OK"
}

コンテンツデータの承認依頼・承認・差し戻し(公開状態)

PUT
/sites/:site_id/contentTypes/:content_type_id/workflow_data/:content_data_id

dataボディ(サンプル)

{
            approvers: [ 3 ],
            status: "10",
            authored_on: "20220407205922",
            modified_on: "20220418222222",
            fields: [{
                id: 7,
                type: "single_line_text",
                value: "aaa123456"
            },{
                id: 8,
                type: "number",
                value: "777888"
            },{
                id: 18,
                type: "content_type",
                value: []
            },{
                id: 30,
                type: "checkboxes",
                value: [ "aaa" ]
            },{
                id: 31,
                type: "asset_image",
                value: [ 3 ]
            }],
            label: "test",
            identifier: "7d9d9046f91aa8ada69f82fb4f8f62007d6f779d",
            unique_id: "7d9d9046f91aa8ada69f82fb4f8f62007d6f779d"
    }

Response 200

ボディ(サンプル)

{
  "status": "OK"
}