์ด ํ์ด์ง๋ Apigee ๋ฐ Apigee Hybrid์ ์ ์ฉ๋ฉ๋๋ค.
๊ฐ์
์์ฑ์ ๋ฆฌ์์ค์ ๋ฉํ๋ฐ์ดํฐ๋ผ๊ณ ์๊ฐํ๋ฉด ๋ฉ๋๋ค. ์๋ฅผ ๋ค์ด API ๋ฆฌ์์ค์ ๊ฒฝ์ฐ API๊ฐ ๊ณต๊ฐ, ๋น๊ณต๊ฐ ๋๋ ๋ด๋ถ ์๋น ๋์์ธ์ง๋ฅผ ์ง์ ํ๋ Target Users
๋ผ๋ ์์ฑ์ ๊ฐ์ง ์ ์์ต๋๋ค. ์ฌ์ฉ ๊ฐ๋ฅํ ์์ฑ์ ๊ทธ ์ธ์๋ ๋ง์ด ์์ต๋๋ค.
์์ฑ์ ๋ค์๊ณผ ๊ฐ์ ์ ์์ ์ ์ฉํฉ๋๋ค.
- ์์ฑ์ ๊ธฐ์ค์ผ๋ก ๋ฆฌ์์ค ๊ฒ์๊ฒฐ๊ณผ๋ฅผ ํํฐ๋งํ ์ ์์ต๋๋ค. ๋ฐ๋ผ์ ์์ฑ์ด ๋ง์์๋ก ๊ฒ์๊ฒฐ๊ณผ ๋ฒ์๋ฅผ ์ฝ๊ฒ ์ขํ ์ ์์ต๋๋ค.
- ์ปค์คํ ์์ฑ์ ๋ง๋ค๊ณ API ํ๋ธ ๋ฆฌ์์ค์ ์ฐ๊ฒฐํ ์ ์์ต๋๋ค.
API ํ๋ธ์ ์์ฑ์ ๋ค์ ๋ ๊ฐ์ง ์ ํ์ผ ์ ์์ต๋๋ค.
- ์์คํ ์์ฑ: ์์คํ ์์ฑ์ API ํ๋ธ์์ ์ฌ์ ์ ์๋ฉ๋๋ค.
- ์ฌ์ฉ์ ์์ฑ: ์ฌ์ฉ์ ์์ฑ์ ์๊ตฌ์ฌํญ์ ๋ฐ๋ผ ์ฌ์ฉ์๊ฐ ์ ์ํฉ๋๋ค.
API ํ๋ธ๋ ํค-๊ฐ ํ์์ผ๋ก ์์ฑ์ ์ ์ฅํฉ๋๋ค. ์ฌ๊ธฐ์ ํค๋ ์์ฑ์ ์ด๋ฆ์ด๊ณ ๊ฐ์ ์์ฑ์ ํด๋นํ๋ ๊ฐ์ ๋๋ค. ์์ฑ์ ๊ฐ์ ๋ค์ ๋ฐ์ดํฐ ์ ํ์ผ ์ ์์ต๋๋ค.
- ๋ฌธ์์ด
- Enum
- JSON
์์คํ ์์ฑ
์์คํ ์์ฑ์ ๊ฐ ๋ฆฌ์์ค ์ ํ์ ๋ํด API ํ๋ธ์์ ์ฌ์ ์ ์๋ฉ๋๋ค. ์ด๋ฌํ ์์ฑ ๋ชฉ๋ก๊ณผ ํด๋น ๊ฐ ์ ์๋ API ํ๋ธ์ ์ถ์ ๋ฒ์ ๋ณ๋ก ๋ค๋ฅผ ์ ์์ต๋๋ค. ์์คํ ์์ฑ์ ์์๋ ์๋ช ์ฃผ๊ธฐ ๋จ๊ณ, API ๊ท์ ์ค์, API ์ธ์ฆ, SLO ๋ฑ์ด ์์ต๋๋ค. ์ด๋ฌํ ์์ฑ์ ๋ฆฌ์์ค์ ๋ํด ํ์ ๋๋ ์ ํ์ฌํญ์ผ ์ ์์ต๋๋ค. ์์ฑ์ด ๋ฆฌ์์ค์ ๋ํด ํ์์ธ ๊ฒฝ์ฐ ๋ฆฌ์์ค๋ฅผ ๋ฑ๋กํ ๋ ์์ฑ ๊ฐ์ ์ค์ ํด์ผ ํฉ๋๋ค.
Enum
์ ํ ์์คํ
์์ฑ์ ๊ฐ์ ๋ณ๊ฒฝ ๋ถ๊ฐ ๋๋ ๋ณ๊ฒฝ ๊ฐ๋ฅํ ์ ์์ต๋๋ค.
- ๋ณ๊ฒฝ ๋ถ๊ฐ - ๊ธฐ์กด ๊ฐ์ ๋ณ๊ฒฝํ ์ ์์ต๋๋ค. ํ์ง๋ง ์์ฑ์ ์๋ก์ด ๋ณ๊ฒฝ ๊ฐ๋ฅ ๊ฐ์ ์ถ๊ฐํ ์ ์์ต๋๋ค. ์๋ฅผ ๋ค์ด
oas-version
์์ฑ์ ๊ฐ์ด 2.1, 3.0, 3.1์ ๋๋ค. ์ด๋ฌํ ๊ฐ์ ์ ๋ฐ์ดํธํ ์ ์์ง๋ง ์ ์ปค์คํ ๊ฐ์ ์ถ๊ฐํ ์ ์์ต๋๋ค. - ๋ณ๊ฒฝ ๊ฐ๋ฅ - ๊ธฐ์กด ๊ฐ์ ์ถ๊ฐ, ์์ ๋๋ ์ญ์ ํ ์ ์์ต๋๋ค. ์๋ฅผ ๋ค์ด
lifecycle-stage
์์ฑ์ ์ฒ์์Dev
,Stage
,UAT
,Prod
๋ฑ์ ๊ฐ์ ๊ฐ์ง ์ ์์ต๋๋ค. ์ด๋ฌํ ๊ธฐ์กด ๊ฐ์ ์์ ํ๊ณ ์ ๊ฐ์ ์ถ๊ฐํ ์ ์์ต๋๋ค.
์์คํ ์์ฑ ๋ณด๊ธฐ
Console
๋ชจ๋ ์์คํ ์์ฑ์ ๋ณด๋ ค๋ฉด Google Cloud ์ฝ์์์ API ํ๋ธ > ์ค์ ํ์ด์ง๋ก ์ด๋ํฉ๋๋ค. ์์คํ ์์ฑ ํญ์์ ๋ชจ๋ ๊ธฐ์กด ์์คํ ์์ฑ์ ๋ณผ ์ ์์ต๋๋ค.
REST API
๋ฆฌ์์ค์ ๋ชจ๋ ์์คํ
์์ฑ์ ๋ณด๋ ค๋ฉด ๋ค์ API์ GET
์์ฒญ์ ์คํํฉ๋๋ค.
https://apihub.googleapis.com/v1/projects/PROJECT/locations/LOCATION/attributes
API์ ๋ํ ์์ธํ ๋ด์ฉ์ ListAttributes๋ฅผ ์ฐธ์กฐํ์ธ์.
๋ค์ ์์์์๋ ๋ชจ๋ ๋ฆฌ์์ค์ ์์คํ ์์ฑ์ ๊ฐ์ ธ์ค๊ธฐ ์ํ API ํธ์ถ์ ๋ณด์ฌ์ค๋๋ค.
curl -H "Authorization: Bearer $(gcloud auth print-access-token)" \ -H "Content-type: application/json" \ -X GET \ https://apihub.googleapis.com/v1/projects/test-project-1/locations/us-central1/attributes?filter=definition_type=SYSTEM_DEFINED
Enum ์ ํ์ ์์คํ ์์ฑ ์์
๋ณ๊ฒฝ ๊ฐ๋ฅ ๊ฐ์ ๋ค์ ์์ ์ ์ํํ ์ ์์ต๋๋ค.
- ์ ๊ฐ ์ถ๊ฐ
- ๊ธฐ์กด ๊ฐ ์ ๋ฐ์ดํธ
- ๊ธฐ์กด ์์ฑ ๊ฐ ์ญ์
์ด ์น์ ์ ์์์์๋ Enum ์ ํ์ ์์คํ ์์ฑ์ ํ์ฉ๋๋ ๊ฐ์ ์ ๋ฐ์ดํธํ๋ ๋ฐฉ๋ฒ์ ๋ณด์ฌ์ค๋๋ค.
Console
์์คํ ์์ฑ์ ๊ฐ์ ์ถ๊ฐํ๋ ค๋ฉด ๋ค์ ๋จ๊ณ๋ฅผ ๋ฐ๋ฅด์ธ์.
Google Cloud ์ฝ์์์ API ํ๋ธ > ์ค์ ํ์ด์ง๋ก ์ด๋ํฉ๋๋ค.
์ด๋ ๊ฒ ํ๋ฉด ์์ฑ ํญ์ ์์คํ ์์ฑ ์น์ ์ ๋ชจ๋ ๊ธฐ์กด ์์คํ ์์ฑ์ด ํ์๋ฉ๋๋ค.
- ๊ฐ์ ์ถ๊ฐํ๋ ค๋ ์์ฑ์์ ์์ ์ ํด๋ฆญํฉ๋๋ค.
๊ทธ๋ฌ๋ฉด ์์ฑ ์์ ์ฐฝ์ด ์ด๋ฆฌ๊ณ ๊ธฐ์กด ์์ฑ ๊ฐ์ด ํ์๋ฉ๋๋ค.
- ์ ๊ฐ์ ์ถ๊ฐํ๋ ค๋ฉด ํญ๋ชฉ ์ถ๊ฐ๋ฅผ ํด๋ฆญํ ํ ์ถ๊ฐํ ์ ๊ฐ์ ์ ๋ ฅํฉ๋๋ค.
- ์ ์ฅ์ ํด๋ฆญํฉ๋๋ค.
REST API
Enum ๋ฐ์ดํฐ ์ ํ์ ์์คํ ์ ์ ์์ฑ์ ํ์ฉ๋๋ ๊ฐ์ ์ ๋ฐ์ดํธํ๋ ค๋ฉด ๋ค์ API์ PATCH ์์ฒญ์ ์คํํฉ๋๋ค.
https://apihub.googleapis.com/v1/projects/PROJECT/locations/LOCATION/attributes/ATTRIBUTE
API์ ๋ํ ์์ธํ ๋ด์ฉ์ UpdateAttribute๋ฅผ ์ฐธ์กฐํ์ธ์.
๋ค์ ์์์์๋ Business unit
์์ฑ ๊ฐ์ ์
๋ฐ์ดํธํ๊ธฐ ์ํ API ํธ์ถ์ ๋ณด์ฌ์ค๋๋ค.
curl -H "Authorization: Bearer $(gcloud auth print-access-token)" \ -H "Content-Type: application/json" \ -d '{"allowed_values": [ { "id": "bu1", "display_name": "Business unit 1", "description": "The API can be used by business unit 1" }, { "id": "bu2", "display_name": "Business unit 2", "description": "The API can be used by business unit 2" }, { "id": "bu3", "display_name": "Business unit 3", "description": "The API can be used by business unit 3" }]}' \ -X PATCH https://apihub.googleapis.com/v1/projects/test-15/locations/us-central1/attributes/system-business-unit?update_mask=allowed_values
API ํ๋ธ๊ฐ UpdateAttribute API์ ์์ฒญ ํ์ด๋ก๋๋ฅผ ์ด๋ป๊ฒ ํด์ํ๋์ง ์ดํดํ๋ ๊ฒ์ด ์ค์ํฉ๋๋ค.
- ํ์ด๋ก๋์ ์ง์ ๋ ๊ฐ์ด ์ด๋ฏธ ์๋ ๊ฒฝ์ฐ API ํ๋ธ๋ ํ์ด๋ก๋์์ ๊ฐ์ด ์ ๋ฐ์ดํธ๋์๋์ง ํ์ธํ ํ ์ ๋ฐ์ดํธ๋ ๊ฒฝ์ฐ ๊ฐ์ ๋ฎ์ด์๋๋ค.
- ํ์ด๋ก๋์์ ๊ฐ์ ์ฌ์ฉํ ์ ์๋ ๊ฒฝ์ฐ API ํ๋ธ๋ ํด๋น ๊ฐ์ ์ญ์ ํด์ผ ํ๋ค๊ณ ํด์ํ๊ณ API ํ๋ธ์์ ๊ฐ์ ์ญ์ ํฉ๋๋ค.
- ํ์ด๋ก๋์์ ์ ๊ฐ์ ์ฌ์ฉํ ์ ์๋ ๊ฒฝ์ฐ API ํ๋ธ๋ ์์ฑ์ ์ ๊ฐ์ ์ถ๊ฐํฉ๋๋ค.
์ฌ์ฉ์ ์ ์ ์์ฑ
์๊ตฌ์ฌํญ์ ๋ฐ๋ผ ๊ฐ๋ฐ์๊ฐ ์ฌ์ฉ์ ์ ์ ์์ฑ์ ์ ์ํฉ๋๋ค.
์ฌ์ฉ์ ์ ์ ์์ฑ ๋ณด๊ธฐ
์ฝ์
๋ชจ๋ ์ฌ์ฉ์ ์ ์ ์์ฑ์ ๋ณด๋ ค๋ฉด Google Cloud ์ฝ์์์ API ํ๋ธ > ์ค์ ํ์ด์ง๋ก ์ด๋ํฉ๋๋ค. ์์ฑ ํญ์ ์ฌ์ฉ์ ์ ์ ์์ฑ ์น์ ์์ ๋ชจ๋ ์ฌ์ฉ์ ์ ์ ์์ฑ์ ๋ณผ ์ ์์ต๋๋ค.
REST API
๋ฆฌ์์ค์ ๋ชจ๋ ์ฌ์ฉ์ ์ ์ ์์ฑ์ ๋ณด๋ ค๋ฉด ๋ค์ API์ GET
์์ฒญ์ ์คํํฉ๋๋ค.
https://apihub.googleapis.com/v1/projects/PROJECT/locations/LOCATION/attributes
API์ ๋ํ ์์ธํ ๋ด์ฉ์ ListAttributes๋ฅผ ์ฐธ์กฐํ์ธ์.
๋ค์ ์์๋ API ๋ฆฌ์์ค์ ์ฌ์ฉ์ ์์ฑ์ ๊ฐ์ ธ์ค๋ API ํธ์ถ์ ๋ณด์ฌ์ค๋๋ค.
curl -H "Authorization: Bearer $(gcloud auth print-access-token)" \ -H "Content-type: application/json" \ -X GET \ https://apihub.googleapis.com/v1/projects/test-project-1/locations/us-central1/attributes?filter=definition_type=USER_DEFINED
์ ์ฌ์ฉ์ ์ ์ ์์ฑ ์ถ๊ฐ
์ฝ์
์ ์ฌ์ฉ์ ์ ์ ์์ฑ์ ์ถ๊ฐํ๋ ค๋ฉด ๋ค์ ๋จ๊ณ๋ฅผ ๋ฐ๋ฅด์ธ์.
Google Cloud ์ฝ์์์ API ํ๋ธ > ์ค์ ํ์ด์ง๋ก ์ด๋ํฉ๋๋ค.
์ด๋ ๊ฒ ํ๋ฉด ์์ฑ ํญ์ ์ฌ์ฉ์ ์์ฑ ์น์ ์ ๋ชจ๋ ์ฌ์ฉ์ ์ ์ ์์ฑ์ด ํ์๋ฉ๋๋ค.
- ์์ฑ ๋ง๋ค๊ธฐ๋ฅผ ํด๋ฆญํฉ๋๋ค.
๊ทธ๋ฌ๋ฉด ์ ์์ฑ ์ถ๊ฐ ์ฐฝ์ด ์ด๋ฆฝ๋๋ค.
- ๋ค์ ์ธ๋ถ์ ๋ณด๋ฅผ ์
๋ ฅํฉ๋๋ค.
- ID: ์์ฑ์ ๊ณ ์ ์๋ณ์๋ฅผ ์
๋ ฅํฉ๋๋ค.
- ์ด ํ๋๋ฅผ ๋น์๋๋ฉด API ํ๋ธ์์ ์๋์ผ๋ก ๊ณ ์ ID๋ฅผ ์์ฑํฉ๋๋ค.
- ๊ฐ์ ์๋์ผ๋ก ์ ๋ ฅํ๋ ค๋ฉด ๋ชจ๋ ์์ฑ์์ ๊ฐ์ด ๊ณ ์ ํด์ผ ํฉ๋๋ค.
- ์ด๋ฆ: ์์ฑ์ ์ด๋ฆ์ ์ ๋ ฅํฉ๋๋ค.
- ์ค๋ช : ํ์ํ ๊ฒฝ์ฐ ์์ฑ ์ค๋ช ์ ์ ๋ ฅํฉ๋๋ค.
- ์ต๋ ํ์ฉ ๊ฐ: 1~20 ์ฌ์ด์ ์ซ์๋ฅผ ์ ๋ ฅํฉ๋๋ค. ์ด ์ค์ ์ ์์ฑ์์ ๊ฐ์ง ์ ์๋ ๊ฐ์ ์ต๋ ๊ฐ์๋ฅผ ์ง์ ํฉ๋๋ค.
- ๋ฆฌ์์ค ์ ํ: ๋ฆฌ์์ค ์ ํ์ ์ ํํฉ๋๋ค.
- ๋ฐ์ดํฐ ์ ํ: ์์ฑ์ ๋ฐ์ดํฐ ์ ํ์ ์ ํํฉ๋๋ค. ๋ฐ์ดํฐ ์ ํ์๋
String
,Enum
,JSON
์ด ์์ต๋๋ค.Enum
๋ฐ์ดํฐ ์ ํ์ด ์ ํ๋ ๊ฒฝ์ฐ + ํญ๋ชฉ ์ถ๊ฐ๋ฅผ ํด๋ฆญํ๊ณ ์์ฑ์ ํ์ฉ๋๋ ๊ฐ์ ์ ๋ ฅํฉ๋๋ค.
- ID: ์์ฑ์ ๊ณ ์ ์๋ณ์๋ฅผ ์
๋ ฅํฉ๋๋ค.
- ๋ง๋ค๊ธฐ๋ฅผ ํด๋ฆญํฉ๋๋ค.
REST API
์ ์ฌ์ฉ์ ์ ์ ์์ฑ์ ์ถ๊ฐํ๋ ค๋ฉด ๋ค์ API์ POST
์์ฒญ์ ์ํํฉ๋๋ค.
https://apihub.googleapis.com/v1/projects/PROJECT/locations/LOCATION/attributes?attribute_id=NEW_ATTRIBUTE_NAME
API์ ๋ํ ์์ธํ ๋ด์ฉ์ CreateAttribute๋ฅผ ์ฐธ์กฐํ์ธ์.
๋ค์ ์์์์๋ attribute-01
์ฌ์ฉ์ ์ ์ ์์ฑ์ ์์ฑํ๊ธฐ ์ํ API ํธ์ถ์ ๋ณด์ฌ์ค๋๋ค.
curl -H "Authorization: Bearer $(gcloud auth print-access-token)" \ -H "Content-Type: application/json" \ -d '{ "display_name" : "custom attribute", "description" : "custom attribute details", "definition_type" : "USER_DEFINED", "scope" : "API", "data_type" : "ENUM", "allowed_values" : [ { "id" : "value-1", "display_name" : "Value 1", "description" : "Value 1 test description", "immutable" : false, }, { "id" : "value-2", "display_name" : "Value 2", "description" : "Value 2 test description", "immutable" : false, }, ], "cardinality" : 4, "mandatory" : false }' \ -X POST https://apihub.googleapis.com/v1/projects/test-15/locations/us-central1/attributes?attribute_id=attribute-01
์ฌ์ฉ์ ์ ์ ์์ฑ ์์
์ฌ์ฉ์ ์ ์ ์์ฑ์์ ๋ค์ ์์ ์ ์ํํ ์ ์์ต๋๋ค.
- ์์ฑ ์ด๋ฆ ์ ๋ฐ์ดํธ
- ์ ์์ฑ ๊ฐ ์ถ๊ฐ
- ๊ธฐ์กด ์์ฑ ๊ฐ ์ญ์
์ฝ์
์ฌ์ฉ์ ์ ์ ์์ฑ์ ์์ ํ๋ ค๋ฉด ๋ค์ ๋จ๊ณ๋ฅผ ๋ฐ๋ฅด์ธ์.
Google Cloud ์ฝ์์์ API ํ๋ธ > ์ค์ ํ์ด์ง๋ก ์ด๋ํฉ๋๋ค.
์ด๋ ๊ฒ ํ๋ฉด ์์ฑ ํญ์ ์ฌ์ฉ์ ์์ฑ ์น์ ์ ๊ธฐ์กด์ ๋ชจ๋ ์ฌ์ฉ์ ์ ์ ์์ฑ์ด ํ์๋ฉ๋๋ค.
- ์์ ํ๋ ค๋ ์์ฑ์์ ์์ ์ ํด๋ฆญํฉ๋๋ค.
๊ทธ๋ฌ๋ฉด ์์ฑ ์์ ์ฐฝ์ด ์ด๋ฆฌ๊ณ ๊ธฐ์กด ์์ฑ ๊ฐ์ด ํ์๋ฉ๋๋ค.
- ์ด๋ฆ, ์ค๋ช , ์ต๋ ํ์ฉ ๊ฐ์ ์์ ํ ์ ์์ต๋๋ค. Enum ์ ํ์ ๊ฒฝ์ฐ ์ ๊ฐ์ ์ถ๊ฐํ ์ ์์ต๋๋ค. Enum ์ ํ์ ์ ๊ฐ์ ์ถ๊ฐํ๋ ค๋ฉด ํญ๋ชฉ ์ถ๊ฐ๋ฅผ ํด๋ฆญํ ํ ์ถ๊ฐํ ์ ๊ฐ์ ์ ๋ ฅํฉ๋๋ค.
- ์ ์ฅ์ ํด๋ฆญํฉ๋๋ค.
REST API
์ฌ์ฉ์ ์ ์ ์์ฑ์ ์์ ํ๋ ค๋ฉด ๋ค์ API์ PATCH
์์ฒญ์ ์คํํฉ๋๋ค.
https://apihub.googleapis.com/v1/projects/PROJECT/locations/LOCATION/attributes/ATTRIBUTE
API์ ๋ํ ์์ธํ ๋ด์ฉ์ UpdateAttribute๋ฅผ ์ฐธ์กฐํ์ธ์.
๋ค์ ์์์์๋ API Visibility
์ฌ์ฉ์ ์ ์ ์์ฑ์ ์
๋ฐ์ดํธํ๊ธฐ ์ํ API ํธ์ถ์ ๋ณด์ฌ์ค๋๋ค.
curl -H "Authorization: Bearer $(gcloud auth print-access-token)" \ -H "Content-Type: application/json" \ -d '{"name": "projects/test-15/locations/us-central1/attributes/API Visibility", display_name" : "API Visibility Updated", "allowedValues": [ { "id": "internal", "displayName": "Internal", "description": "The API is visible internally in an organization" }, { "id": "external", "displayName": "External", "description": "The API is visible externally in an organization" }, { "id": "public", "displayName": "Public", "description": "The API is visible public in an organization" } ]}' \ -X PATCH https://autopush-apihub.sandbox.googleapis.com/v1/projects/common-dev-15/locations/us-central1/attributes/API Visibility?update_mask=display_name,allowed_values
API ํ๋ธ๊ฐ UpdateAttribute API์ ์์ฒญ ํ์ด๋ก๋๋ฅผ ์ด๋ป๊ฒ ํด์ํ๋์ง ์ดํดํ๋ ๊ฒ์ด ์ค์ํฉ๋๋ค.
- ํ์ด๋ก๋์ ์ง์ ๋ ๊ฐ์ด ์ด๋ฏธ ์๋ ๊ฒฝ์ฐ API ํ๋ธ๋ ํ์ด๋ก๋์์ ๊ฐ์ด ์ ๋ฐ์ดํธ๋์๋์ง ํ์ธํ ํ ์ ๋ฐ์ดํธ๋ ๊ฒฝ์ฐ ๊ฐ์ ๋ฎ์ด์๋๋ค.
- ํ์ด๋ก๋์์ ๊ฐ์ ์ฌ์ฉํ ์ ์๋ ๊ฒฝ์ฐ API ํ๋ธ๋ ํด๋น ๊ฐ์ ์ญ์ ํด์ผ ํ๋ค๊ณ ํด์ํ๊ณ API ํ๋ธ์์ ๊ฐ์ ์ญ์ ํฉ๋๋ค.
- ํ์ด๋ก๋์์ ์ ๊ฐ์ ์ฌ์ฉํ ์ ์๋ ๊ฒฝ์ฐ API ํ๋ธ๋ ์์ฑ์ ์ ๊ฐ์ ์ถ๊ฐํฉ๋๋ค.
์ฌ์ฉ์ ์์ฑ์ ๊ธฐ๋ฐ์ผ๋ก ๋ฆฌ์์ค ํํฐ๋ง
์ฌ์ฉ์ ์์ฑ์ ๊ธฐ๋ฐ์ผ๋ก ๋ฆฌ์์ค๋ฅผ ํํฐ๋งํ๋ฉด API๋ฅผ ๊ฒ์ํ๊ณ ๊ด๋ฆฌํ ๋ ๋ ์ ์ฐํ๊ณ ํจ๊ณผ์ ์ผ๋ก ์ ์ดํ ์ ์์ต๋๋ค. ์กฐ์ง๊ณผ ๊ด๋ จ๋ ๊ธฐ์ค์ ๊ธฐ๋ฐ์ผ๋ก ํน์ API๋ฅผ ๋น ๋ฅด๊ฒ ์ฐพ์ ์ ์์ต๋๋ค.
์ฌ์ฉ์ ์์ฑ์ ๊ธฐ๋ฐ์ผ๋ก ๋ฆฌ์์ค๋ฅผ ํํฐ๋งํ๋ ค๋ฉด ๋ค์ API์ GET
์์ฒญ์ ์คํํฉ๋๋ค.
https://apihub.googleapis.com/v1/projects/PROJECT/locations/LOCATION/apis
API์ ๋ํ ์์ธํ ๋ด์ฉ์ ListApis๋ฅผ ์ฐธ์กฐํ์ธ์.
๋ค์ ์์๋ ์ฌ์ฉ์ ์ ์ ์์ฑ ๊ฐ์ธ String
๋ฐ์ดํฐ ์ ํ์ ๊ธฐ๋ฐ์ผ๋ก ๋ฆฌ์์ค๋ฅผ ํํฐ๋งํ๋ API ํธ์ถ์ ๋ณด์ฌ์ค๋๋ค.
curl -H "Authorization: Bearer $(gcloud auth print-access-token)" \ -H "Content-type: application/json" \ -X GET \ https://apihub.googleapis.com/v1/projects/test-project-1/locations/us-central1/apis?filter=attributes.projects/test-project-1/locations/us-central1/attributes/cdcb1260-ed63-4e5b-935d-4394f178da4f.string_values.values:helloworld