# カテゴリ名の可用性を確認。API ダミー実行/カスタムスラッグ？

**URL:** <https://meta.discourse.org/t/check-whether-a-category-name-is-available-api-dry-run-custom-slug/90373>\
**Category:** Feature\
**Created:** [2018 年 6 月 21 日午前 7:46 UTC](https://meta.discourse.org/t/check-whether-a-category-name-is-available-api-dry-run-custom-slug/90373 "2018-06-21T07:46:59Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![ryancey](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ryancey/32/99309_2.png) [@ryancey](https://meta.discourse.org/u/ryancey)\
**Post date:** [2018 年 6 月 22 日午前 8:26 UTC](https://meta.discourse.org/t/check-whether-a-category-name-is-available-api-dry-run-custom-slug/90373/3 "2018-06-22T08:26:48Z")

</div>

In the creation process of my application, creating a Discourse category isn’t the only step. Therefore, to avoid being in a inconsistent state, I prefered not to try to create a category to check wether the name is available or not.

To be specific, I also create a GitLab project derived from the same name the user is giving. What if the Discourse category slug is available but not the GitLab slug? The Discourse category would be created but not the GitLab project. Sure I could remove the just-created category in that case, but that’s a lot of spilled electricity 😉

---

_[View the full topic](https://meta.discourse.org/t/check-whether-a-category-name-is-available-api-dry-run-custom-slug/90373)._
