# API를 사용하여 데이터 탐색기 쿼리를 만드는 방법

**URL:** <https://meta.discourse.org/t/how-to-create-a-data-explorer-query-with-the-apis/284776>\
**Category:** Development\
**Tags:** data-explorer, rest-api\
**Created:** [11월 8, 2023, 4:48오전 UTC](https://meta.discourse.org/t/how-to-create-a-data-explorer-query-with-the-apis/284776 "2023-11-08T04:48:44Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![Tanay\_Suthar](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tanay_suthar/32/332268_2.png) [@Tanay\_Suthar](https://meta.discourse.org/u/Tanay_Suthar)\
**Post date:** [11월 9, 2023, 10:25오전 UTC](https://meta.discourse.org/t/how-to-create-a-data-explorer-query-with-the-apis/284776/6 "2023-11-09T10:25:57Z")

</div>

아래는 POST API 호출을 통해 시도한 쿼리입니다.

> curl -X POST [https://api-discourse-XXXXXXXXXXXXX/admin/plugins/explorer/queries](https://api-discourse-XXXXXXXXXXXXX/admin/plugins/explorer/queries)   
> -H “Content-Type: multipart/form-data;”   
> -H “Api-Key: 46811cc32XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX”   
> -H “Api-Username: abcdefg2”   
> -F ‘query={“name”:“test1234”, “sql”:“SELECT \* FROM topics”}’

그러나 아래와 같은 오류가 발생합니다.

> {“status”:500,“error”:“Internal Server Error”}%

무엇이 문제인지 잘 모르겠습니다.

---

_[View the full topic](https://meta.discourse.org/t/how-to-create-a-data-explorer-query-with-the-apis/284776)._
