Publish Content to Optimizely CMS

Publish Content to Optimizely CMS · GPT アクション

Blog Post API

Create, edit, list and search blog posts.

  • GET /api/gpt/SearchBlogPostsSearchBlogPosts

    Search for blog posts

  • GET /api/gpt/GetAllBlogPostsGetAllBlogPosts

    Get all blog posts

  • GET /api/gpt/GetLatestBlogPostGetLatestBlogPost

    Get latest blog post

  • POST /api/gpt/CreateBlogPostCreateBlogPost

    Create a new blog post, and return information about URL and contentLinkId needed to make future updates.

  • POST /api/gpt/UpdateTitleUpdateTitle

    Update the title for the blog post identified with the provided contentLinkId.

  • POST /api/gpt/UpdateMainBodyUpdateMainBody

    Update the main body for the blog post identified with the provided contentLinkId.

  • POST /api/gpt/UpdateTeaserTextUpdateTeaserText

    Update the teaser text for the blog post identified with the provided contentLinkId.

元の API スキーマ
{
  "openapi": "3.1.0",
  "info": {
    "title": "Blog Post API",
    "description": "Create, edit, list and search blog posts.",
    "version": "v1.0.0"
  },
  "servers": [
    {
      "url": "https://www.gulla.net"
    }
  ],
  "paths": {
    "/api/gpt/SearchBlogPosts": {
      "get": {
        "description": "Search for blog posts",
        "operationId": "SearchBlogPosts",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "description": "The search query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "deprecated": false
      }
    },
    "/api/gpt/GetAllBlogPosts": {
      "get": {
        "description": "Get all blog posts",
        "operationId": "GetAllBlogPosts",
        "deprecated": false
      }
    },
    "/api/gpt/GetLatestBlogPost": {
      "get": {
        "description": "Get latest blog post",
        "operationId": "GetLatestBlogPost",
        "deprecated": false
      }
    },
    "/api/gpt/CreateBlogPost": {
      "post": {
        "description": "Create a new blog post, and return information about URL and contentLinkId needed to make future updates.",
        "operationId": "CreateBlogPost",
        "parameters": [
          {
            "name": "title",
            "in": "query",
            "description": "The title, name or heading",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "mainBody",
            "in": "query",
            "description": "The main body, or article text content, should be html code.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "teaserText",
            "in": "query",
            "description": "The list item text, teaser text, should be a short text introducing the blog post",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "deprecated": false
      }
    },
    "/api/gpt/UpdateTitle": {
      "post": {
        "description": "Update the title for the blog post identified with the provided contentLinkId.",
        "operationId": "UpdateTitle",
        "parameters": [
          {
            "name": "contentLinkId",
            "in": "query",
            "description": "The id that indentifies the blog post to update",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "title",
            "in": "query",
            "description": "The new title",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "deprecated": false
      }
    },
    "/api/gpt/UpdateMainBody": {
      "post": {
        "description": "Update the main body for the blog post identified with the provided contentLinkId.",
        "operationId": "UpdateMainBody",
        "parameters": [
          {
            "name": "contentLinkId",
            "in": "query",
            "description": "The id that indentifies the blog post to update",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "mainBody",
            "in": "query",
            "description": "The new main body",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "deprecated": false
      }
    },
    "/api/gpt/UpdateTeaserText": {
      "post": {
        "description": "Update the teaser text for the blog post identified with the provided contentLinkId.",
        "operationId": "UpdateTeaserText",
        "parameters": [
          {
            "name": "contentLinkId",
            "in": "query",
            "description": "The id that indentifies the blog post to update",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "teaserText",
            "in": "query",
            "description": "The new teaser text",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "deprecated": false
      }
    }
  },
  "components": {
    "schemas": {}
  }
}