aiMOOC

aiMOOC · Actions GPT

moocwiki aiMOOC GPT Action

Publish a validated aiMOOC MediaWiki page generated by the private GPT aiMOOC.

  • POST /api.phpPublish aiMOOC Wikitext to moocwiki.org

    Saves the final MediaWiki wikitext from the GPT aiMOOC codebox as a new moocwiki.org page.

Schéma original API
{
  "openapi": "3.1.0",
  "info": {
    "title": "moocwiki aiMOOC GPT Action",
    "version": "1.0.0",
    "description": "Publish a validated aiMOOC MediaWiki page generated by the private GPT aiMOOC."
  },
  "servers": [
    {
      "url": "https://moocwiki.org/"
    }
  ],
  "paths": {
    "/api.php": {
      "post": {
        "operationId": "publishAiMoocToMoocWiki",
        "summary": "Publish aiMOOC Wikitext to moocwiki.org",
        "description": "Saves the final MediaWiki wikitext from the GPT aiMOOC codebox as a new moocwiki.org page.",
        "x-openai-isConsequential": true,
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "action",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "aimoocgptactionpublish"
              ]
            },
            "description": "MediaWiki API action name."
          },
          {
            "name": "format",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "json"
              ]
            },
            "description": "Response format."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "topic",
                  "wiki_text",
                  "source_gpt"
                ],
                "properties": {
                  "topic": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 180,
                    "description": "The original aiMOOC topic requested by the admin."
                  },
                  "requested_title": {
                    "type": "string",
                    "maxLength": 200,
                    "description": "Desired MediaWiki page title without namespace. The server adds the aiMOOC suffix if needed."
                  },
                  "wiki_text": {
                    "type": "string",
                    "minLength": 120,
                    "maxLength": 95000,
                    "description": "Final MediaWiki wikitext only. Send the content of the codebox, without explanatory text."
                  },
                  "source_gpt": {
                    "type": "string",
                    "enum": [
                      "g-70HqqNES8-aimooc"
                    ],
                    "description": "Fixed GPT identifier for this private GPT aiMOOC action."
                  },
                  "return_to": {
                    "type": "string",
                    "description": "Optional client-side return URL or context."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Publish result from MediaWiki.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "properties": {
                    "aimoocgptactionpublish": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "status": {
                          "type": "string",
                          "enum": [
                            "published"
                          ]
                        },
                        "pageTitle": {
                          "type": "string"
                        },
                        "pageId": {
                          "type": "integer"
                        },
                        "revisionId": {
                          "type": "integer"
                        },
                        "pageUrl": {
                          "type": "string",
                          "format": "uri"
                        },
                        "publisher": {
                          "type": "string"
                        },
                        "validationChecks": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Validation or publishing error."
          },
          "401": {
            "description": "Unauthorized action request."
          }
        }
      }
    }
  },
  "components": {
    "schemas": {},
    "securitySchemes": {
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "Paste the generated GPT Action API key in the GPT editor authentication settings."
      }
    }
  }
}