Contents

Unpublish a content

Craft Cross CMSのコンテンツを非公開にします。

Required Scope

APIの実行に必要なScopeです。

beta.cms.content.unpublish

Required Role

管理画面でScopeを追加する際に必要な権限です。

Craft Cross CMS > CMSの編集
post/v2beta/cms/content/unpublish

Request

  • Base URL
    https://api.karte.io
  • URL
    https://api.karte.io/v2beta/cms/content/unpublish
  • Auth
    HTTP bearer

Headers

x-karte-apistring

今後利用する可能性のある予約語です。現在は設定不要です。

authorizationstring

認証情報を含むトークンです。"Authorization" ヘッダーに Bearer <token> の形式で設定してください。

content-typestring

リクエストのコンテンツタイプを指定します。通常は application/json を使用してください。

Request body

modelIdstring required

コンテンツが所属するモデルのID

contentIdstring required

コンテンツのID

kickHookV2boolean

この操作でHook V2のトリガーを発火するかどうか。(参照)

Example request

{
  "modelId": "6347f05d5d18d4536af5f336",
  "contentId": "6109f05d5d18d6006af5f385",
  "kickHookV2": true
}

Response

A successful response.

idstring required

コンテンツのIDです。

Example response

{
  "id": "6109f05d5d18d6006af5f385",
  "title": "title1",
  "body": {
    "text": "Rich Text",
    "html": "<h1>Rich Text</h1>",
    "json": {
      "type": "doc",
      "content": [
        {
          "type": "heading",
          "attrs": {
            "level": 1
          },
          "content": [
            {
              "type": "text",
              "text": "RichText"
            }
          ]
        }
      ]
    }
  },
  "sys": {
    "customOrder": 15,
    "modelId": "6347f05d5d18d4536af5f336",
    "raw": {
      "createdAt": "2025-04-06T00:18:26.810Z",
      "createdBy": "6757a6444bf949f948348941",
      "updatedAt": "2025-04-06T08:39:45.628Z",
      "updatedBy": "6757a6444bf949f948348941",
      "firstPublishedAt": "2025-04-06T00:18:26.810Z",
      "publishedAt": "2025-04-06T08:39:45.628Z",
      "contentId": "6109f05d5d18d6006af5f385",
      "revisionId": "67ce733b3640300ad776d80e",
      "publishedRevisionId": "67ce733b3640300ad776d80e"
    }
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.