# API 공통 가이드

## 📢 API 공통 가이드 개요

이 API는 외부 시스템에서 지도 및 플레이스 정보를 등록, 조회, 수정, 삭제할 수 있도록 제공하는 API입니다. API 사용을 위해서는 별도 인증키(API Key)가 필요하며, JSON 포맷 기반으로 통신합니다.

{% hint style="info" %}
&#x20;본 API는 품질 향상과 기능 개선을 위해 지속적으로 업데이트되며, 이 과정에서 일부 기능이 변경되거나 제공이 종료될 수 있습니다.
{% endhint %}

***

## 📃 API 공통 가이드 구성

API 공통 가이드의 내용은 다음과 같습니다.

* Place
  * Place UID List 호출
  * Place UID별 Details 호출
  * Place UID별 Details 수정
* Map
  * Project  geojson 호출
  * 층 별 geojson 호출
  * Place별 map color 수정
  * 출발/도착 경로 안내

***

## 🔗 Base URL

Growspace API의 URL은 다음과 같은 형식을 따릅니다.

```json
https://space.api-freegrow.com
```

***

## 🔐 API 인증

API 사용을 위해서는 발급받은 API Key를 요청 헤더에 포함해야 합니다.\
API Key는 아래 절차에 따라 발급할 수 있습니다.

<details>

<summary> ✅ API KEY 발급 절차</summary>

<figure><img src="https://1682291364-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSPnsSZPuUFprU86X3bNu%2Fuploads%2FxtZPhfrVZ7q4MceIcb06%2FAPI%20KEY.png?alt=media&#x26;token=b8a0a984-4be7-47b3-97b1-61f740554da6" alt=""><figcaption></figcaption></figure>

1. 서비스 로그인 또는 회원가입
   * 계정이 없는 경우 먼저 회원가입을 진행해 주세요.
   * 로그인 후, 홈 화면 페이지로 이동됩니다.
2. 프로젝트 선택
3. 우측 상단의 프로필 메뉴 클릭
   * 프로젝트 상세 페이지 우측 상단에 있는 프로필 아이콘을 클릭합니다.
   * 나타나는 메뉴에서 **\[API Key Generate]** 메뉴를 클릭하면 API Key가 자동 발급됩니다.
   * 발급된 키는 화면에 표시되며, 복사하여 사용할 수 있습니다.
   * 단, 인증키 재 발급시, 기존 인증키는 사용할 수 없습니다.

</details>

<details>

<summary>🔑 API 인증 방식 </summary>

API 요청 시, 아래와 같이 `api-key` 헤더에 API KEY를 포함해야 합니다.

```json
api-key : {YOUR_API_KEY}
```

예시 :

```json
curl -X GET https://space.api-freegrow-test.com
  -H "{YOUR_API_KEY}"
```

</details>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://freegrow-1.gitbook.io/product-docs-kr/ko-growspace-studio-api/api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
