1. CategoryV1alpha1
plugin-hitokoto-hub
  • OverviewV1alpha1
    • 获取概览信息
      GET
  • SentenceV1alpha1
    • 查询句子
      GET
    • 批量创建句子
      POST
    • 从 Excel 导入句子
      POST
    • 搜索句子
      GET
    • listSentence
      GET
    • createSentence
      POST
    • deleteSentence
      DELETE
    • getSentence
      GET
    • patchSentence
      PATCH
    • updateSentence
      PUT
  • CategoryV1alpha1
    • listCategory
      GET
    • createCategory
      POST
    • deleteCategory
      DELETE
    • getCategory
      GET
    • patchCategory
      PATCH
    • updateCategory
      PUT
  • CategoryPublicV1alpha1
    • 获取所有分类
      GET
  • SentencePublicV1alpha1
    • 点赞/取消点赞句子
      GET
    • 随机获取句子
      GET
  • 数据模型
    • AddOperation
    • BatchCreateSentenceResult
    • Category
    • CategoryDistribution
    • CategoryItem
    • CategoryList
    • CategorySpec
    • CategoryStatus
    • CopyOperation
    • ExcelImportRequest
    • JsonPatch
    • LikeResponse
    • Metadata
    • MoveOperation
    • OverviewResponse
    • RemoveOperation
    • ReplaceOperation
    • Sentence
    • SentenceItem
    • SentenceList
    • SentenceSpec
    • SentenceStatus
    • TestOperation
  1. CategoryV1alpha1

createCategory

POST
/apis/hitokotohub.puresky.top/v1alpha1/categories
Create Category

请求参数

Authorization
Basic Auth
在 Header 添加参数
Authorization
,其值为在 Basic 之后拼接空格,以及经过 Base64 编码的 username:password
示例:
Authorization: Basic *****************
JWT Bearer
在 Header 添加参数
Authorization
示例:
Authorization: ********************
or
Body 参数*/*

请求示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location 'http://localhost:8090/apis/hitokotohub.puresky.top/v1alpha1/categories' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: */*' \
--data '{
    "apiVersion": "string",
    "kind": "string",
    "metadata": {
        "annotations": {
            "property1": "string",
            "property2": "string"
        },
        "creationTimestamp": "2019-08-24T14:15:22.123Z",
        "deletionTimestamp": "2019-08-24T14:15:22.123Z",
        "finalizers": [
            "string"
        ],
        "generateName": "string",
        "labels": {
            "property1": "string",
            "property2": "string"
        },
        "name": "string",
        "version": 0
    },
    "spec": {
        "description": "string",
        "name": "string"
    },
    "status": {
        "sentenceCount": 0
    }
}'

返回响应

🟢200
*/*
Response categories created just now
Body*/*

示例
{
    "apiVersion": "string",
    "kind": "string",
    "metadata": {
        "annotations": {
            "property1": "string",
            "property2": "string"
        },
        "creationTimestamp": "2019-08-24T14:15:22.123Z",
        "deletionTimestamp": "2019-08-24T14:15:22.123Z",
        "finalizers": [
            "string"
        ],
        "generateName": "string",
        "labels": {
            "property1": "string",
            "property2": "string"
        },
        "name": "string",
        "version": 0
    },
    "spec": {
        "description": "string",
        "name": "string"
    },
    "status": {
        "sentenceCount": 0
    }
}
修改于 2026-05-04 04:49:00
上一页
listCategory
下一页
deleteCategory
Built with