# API 无法提供类别描述

**URL:** <https://meta.discourse.org/t/no-description-in-a-category-via-api/277473>\
**Category:** Migration\
**Tags:** rest-api\
**Created:** [2023 年9 月 1 日 08:58 UTC](https://meta.discourse.org/t/no-description-in-a-category-via-api/277473 "2023-09-01T08:58:09Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

作者： ![FLucas](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/flucas/32/317231_2.png) [@FLucas](https://meta.discourse.org/u/FLucas)\
发布日期： [2023 年9 月 1 日 08:58 UTC](https://meta.discourse.org/t/no-description-in-a-category-via-api/277473/1 "2023-09-01T08:58:09Z")

</div>

您好，

我仍在将数据从旧应用程序导入到我们的新 Discourse。  
我无法通过以下 API 调用创建带有描述的类别：

```plaintext
curl -X POST "https://site-discourse/categories.json" \
-H "Api-Key: api-key" \
-H "Api-Username: api-username" \
-d "name=categorie test" \
-d "description=Description De La Categorie"

```

类别已创建，但没有描述。

我收到以下响应：

```plaintext
{"category":{"id":21,"name":"categorie test",[...],"slug":"categorie-test",[...] **,"description":null** ,"description_text":null,"description_excerpt":null,"topic_url":"/t/a-propos-de-la-categorie-categorie-test/12286", [...]}

```

感谢您的帮助。

---

_[View the full topic](https://meta.discourse.org/t/no-description-in-a-category-via-api/277473)._
