RESTful API エンドポイント (scheme)

schemeエンドポイントについて

モデルのスキーマを取得します。認証付きリクエストでそのスコープ・モデルに対する権限が必要です。

エンドポイント(entryモデルの例)

/api/v1/スコープID/モデル名/scheme
/api/v1/1/entry/scheme

メソッド

GET

パラメタ

?keys=返却するキー1,返却するキー2

レスポンス(成功時)

{
    "label": "記事",
    "plural": "Entries",
    "version": "2.3",
    "primary": "title",
    "display_system": 1,
    "auditing": 1,
    "order": 10,
    "menu_type": 1,
    "taggable": 1,
    "revisable": 1,
    "start_end": 1,
    "has_assets": 1,
    "template_tags": 1,
    "display_space": 1,
    "has_basename": 1,
    "has_status": 1,
    "assign_user": 1,
    "display_dashboard": 1,
    "allow_comment": 1,
    "default_status": 2,
    "has_uuid": 1,
    "show_activity": 1,
    "column_defs": {
        "id": {
            "type": "int",
            "size": 11,
            "not_null": 1
        },
        "title": {
            "type": "string",
            "size": 255,
            "not_null": 1
        },
        "text": {
            "type": "text"
        },
        "text_format": {
            "type": "string",
            "size": 255
        },
        "assets": {
            "type": "relation"
        },
        "text_more": {
            "type": "text"
        },
        "excerpt": {
            "type": "text"
        },
        "keywords": {
            "type": "string",
            "size": 255
        },
        "categories": {
            "type": "relation"
        },
        "tags": {
            "type": "relation"
        },
        "extra_path": {
            "type": "string",
            "size": 255
        },
        "basename": {
            "type": "string",
            "size": 255,
            "not_null": 1
        },
        "status": {
            "type": "int",
            "size": 11,
            "default": "2"
        },
        "has_deadline": {
            "type": "tinyint",
            "size": 4
        },
        "published_on": {
            "type": "datetime"
        },
        "unpublished_on": {
            "type": "datetime"
        },
        "rev_note": {
            "type": "string",
            "size": 255
        },
        "rev_diff": {
            "type": "text"
        },
        "rev_type": {
            "type": "int",
            "size": 11,
            "not_null": 1,
            "default": "0"
        },
        "user_id": {
            "type": "int",
            "size": 11
        },
        "previous_owner": {
            "type": "int",
            "size": 11
        },
        "rev_changed": {
            "type": "string",
            "size": 255
        },
        "allow_comment": {
            "type": "tinyint",
            "size": 4
        },
        "created_on": {
            "type": "datetime"
        },
        "modified_on": {
            "type": "datetime"
        },
        "created_by": {
            "type": "int",
            "size": 11
        },
        "modified_by": {
            "type": "int",
            "size": 11
        },
        "workspace_id": {
            "type": "int",
            "size": 11,
            "default": "0"
        },
        "rev_object_id": {
            "type": "int",
            "size": 11
        },
        "uuid": {
            "type": "string",
            "size": 255
        }
    },
    "indexes": {
        "PRIMARY": "id",
        "title": "title",
        "keywords": "keywords",
        "extra_path": "extra_path",
        "basename": "basename",
        "status": "status",
        "has_deadline": "has_deadline",
        "published_on": "published_on",
        "unpublished_on": "unpublished_on",
        "rev_note": "rev_note",
        "rev_type": "rev_type",
        "user_id": "user_id",
        "previous_owner": "previous_owner",
        "created_on": "created_on",
        "modified_on": "modified_on",
        "created_by": "created_by",
        "modified_by": "modified_by",
        "workspace_id": "workspace_id",
        "rev_object_id": "rev_object_id",
        "uuid": "uuid"
    },
    "sort_by": {
        "published_on": "descend"
    },
    "relations": {
        "assets": "asset",
        "categories": "category",
        "tags": "tag"
    },
    "autoset": [
        "rev_diff",
        "rev_type",
        "rev_changed",
        "created_on",
        "modified_on",
        "created_by",
        "modified_by",
        "workspace_id",
        "rev_object_id"
    ],
    "unchangeable": [
        "workspace_id",
        "uuid"
    ],
    "translate": [
        "categories"
    ],
    "hide_edit_options": [
        "status",
        "published_on",
        "unpublished_on",
        "user_id"
    ],
    "edit_properties": {
        "id": "hidden",
        "title": "primary",
        "text": "richtext",
        "assets": "relation:asset:label:dialog",
        "text_more": "textarea",
        "excerpt": "textarea",
        "keywords": "text",
        "categories": "relation:category:label:hierarchy",
        "tags": "relation:tag:name:dialog",
        "basename": "text_short",
        "status": "selection",
        "published_on": "datetime",
        "unpublished_on": "datetime",
        "user_id": "relation:user:nickname:dialog",
        "allow_comment": "hidden",
        "uuid": "text_short"
    },
    "list_properties": {
        "id": "number",
        "title": "primary",
        "categories": "reference:category:label",
        "tags": "reference:tag:name",
        "extra_path": "text_short",
        "basename": "text_short",
        "status": "number",
        "has_deadline": "checkbox",
        "published_on": "date",
        "unpublished_on": "date",
        "rev_note": "text",
        "rev_diff": "popover",
        "rev_type": "text_short",
        "user_id": "reference:user:nickname",
        "previous_owner": "reference:user:nickname",
        "rev_changed": "text",
        "modified_on": "datetime",
        "created_by": "reference:user:nickname",
        "modified_by": "reference:user:nickname",
        "workspace_id": "reference:workspace:name"
    },
    "default_list_items": [
        "title",
        "status",
        "published_on",
        "user_id",
        "workspace_id"
    ],
    "options": {
        "text": "20",
        "text_more": "3",
        "status": "Draft,Review,Approval Pending,Reserved,Publish,Ended"
    },
    "column_labels": {
        "extra_path": "Path"
    },
    "max_revisions": 20,
    "im_export": 1,
    "extras": [],
    "disp_edit": {
        "user_id": "relation"
    },
    "labels": {
        "id": "ID",
        "title": "Title",
        "text": "Body",
        "text_format": "Text Format",
        "assets": "Assets",
        "text_more": "More",
        "excerpt": "Excerpt",
        "keywords": "Keywords",
        "categories": "Categories",
        "tags": "Tags",
        "extra_path": "Path",
        "basename": "Basename",
        "status": "Status",
        "has_deadline": "Specify the Deadline",
        "published_on": "Publish Date",
        "unpublished_on": "Unpublish Date",
        "rev_note": "Change Note",
        "rev_diff": "Diff",
        "rev_type": "Type",
        "user_id": "User",
        "previous_owner": "Previous Owner",
        "rev_changed": "Changed",
        "allow_comment": "Accept Comments",
        "created_on": "Date Created",
        "modified_on": "Date Modified",
        "created_by": "Created By",
        "modified_by": "Modified By",
        "workspace_id": "WorkSpace",
        "rev_object_id": "Object ID",
        "uuid": "UUID"
    },
    "locale": {
        "default": {
            "id": "ID",
            "title": "Title",
            "text": "Body",
            "text_format": "Text Format",
            "assets": "Assets",
            "text_more": "More",
            "excerpt": "Excerpt",
            "keywords": "Keywords",
            "categories": "Categories",
            "tags": "Tags",
            "extra_path": "Path",
            "basename": "Basename",
            "status": "Status",
            "has_deadline": "Specify the Deadline",
            "published_on": "Publish Date",
            "unpublished_on": "Unpublish Date",
            "rev_note": "Change Note",
            "rev_diff": "Diff",
            "rev_type": "Type",
            "user_id": "User",
            "previous_owner": "Previous Owner",
            "rev_changed": "Changed",
            "allow_comment": "Accept Comments",
            "created_on": "Date Created",
            "modified_on": "Date Modified",
            "created_by": "Created By",
            "modified_by": "Modified By",
            "workspace_id": "WorkSpace",
            "rev_object_id": "Object ID",
            "uuid": "UUID"
        },
        "ja": {
            "Entry": "記事",
            "Entries": "記事",
            "ID": "ID",
            "Title": "タイトル",
            "Body": "本文",
            "Text Format": "フォーマット",
            "Assets": "アセット",
            "More": "続き",
            "Excerpt": "概要",
            "Keywords": "キーワード",
            "Categories": "カテゴリ",
            "Tags": "タグ",
            "Path": "パス",
            "Basename": "ベースネーム",
            "Status": "ステータス",
            "Specify the Deadline": "公開終了日を指定",
            "Publish Date": "公開日",
            "Unpublish Date": "公開終了日",
            "Change Note": "変更メモ",
            "Diff": "差分",
            "Type": "タイプ",
            "User": "ユーザー",
            "Previous Owner": "直前のユーザー",
            "Changed": "変更",
            "Accept Comments": "コメントを許可",
            "Date Created": "作成日",
            "Date Modified": "更新日",
            "Created By": "作成者",
            "Modified By": "更新者",
            "WorkSpace": "スペース",
            "Object ID": "オブジェクトID",
            "UUID": "UUID"
        }
    },
    "fields": [
        {
            "id": 1,
            "name": "Field",
            "basename": "field",
            "translate": 0,
            "fieldtype_id": {
                "id": 1,
                "name": "Input Text",
                "basename": "text",
                "order": 1
            },
            "label": "    <label for=\"field.<mt:var name=\"field_uniqueid\">\">\n      <mt:var name=\"field_name\" escape>\n      <mt:if name=\"field_required\">\n      <i class=\"fa fa-asterisk required\" aria-hidden=\"true\"><\/i>\n      <span class=\"sr-only\"><mt:trans phrase=\"Required\"><\/span>\n      <\/mt:if>\n    <\/label>",
            "hide_label": 0,
            "content": "    <input id=\"field.<mt:var name=\"field_uniqueid\">\" class=\"form-control watch-changed\" type=\"text\" name=\"value\" value=\"<mt:var name=\"field.value\" escape>\">",
            "options": "",
            "options_labels": "",
            "required": 0,
            "display": 0,
            "translate_labels": 0,
            "multiple": 0,
            "order": 1,
            "workspace_id": 0,
            "created_on": "2021-09-02 20:37:34",
            "modified_on": "2021-09-02 20:37:34",
            "created_by": 1,
            "modified_by": 1
        }
    ]
}

レスポンス・エラー

共通レスポンスエラーについてはこちら を参照ください。

許可されないリクエストメソッド

{
    "status": 400,
    "message": "Method リクエストメソッド not allowed."
}

認証付きリクエストではない、またはログイン中のユーザーがそのモデルに対する権限がない

{
    "status": 403,
    "message": "Permission denied."
}