TTS API
Version 1.0.0 - Last updated 2020-09-29 09:03:05 KST
Authentication
API๋ฅผ ํธ์ถํ๋ ค๋ฉด ๊ถํ์ด ์๋ ์ก์ธ์ค ํ ํฐ์ ์ป์ด์ผํฉ๋๋ค. ๋ค์ curl ๋ช ๋ น์ keycloak ์๋ฒ์์ ํ ํฐ์ ํ๋ณดํ๋ ๋ฐฉ๋ฒ์ ๋ณด์ฌ์ค๋๋ค.
To invoke the API you need to obtain an access token with the appropriate permissions. The following curl command shows how a token can be ontained from the keycloak server.
$ curl \
-d "client_id=zeroth-web" \
-d "username=<USERNAME>" \
-d "password=<PASSWORD>" \
-d "grant_type=password" \
"http://keycloak:8080/auth/realms/zeroth/protocol/openid-connect/token"๊ฒฐ๊ณผ๋ JSON ํ์ ๋๋ค. API๋ฅผ ํธ์ถํ๋ ค๋ฉด access_token ์์ฑ์ ๊ฐ์ ์ถ์ถํด์ผํฉ๋๋ค. ๊ทธ๋ฐ ๋ค์ API ์์ฒญ์ Authorization ํค๋์ ๊ฐ์ ํฌํจํ์ฌ API๋ฅผ ํธ์ถ ํ ์ ์์ต๋๋ค.
The result will be a JSON document. To invoke the API you need to extract the value of the access_token property. You can then invoke the API by including the value in the Authorization header of requests to the API.
$ curl \
-H "Authorization: bearer <ACCESS_TOKEN>" \
"http://..."Base_URL
On-Premise : Zeroth EE ์ค์น๋ฒ์ ์ ์ด์ฉํ๋ ๊ฒฝ์ฐ ๊ณ ๊ฐ์ฌ์ ์ ๊ทผ ์ค์ ์ ๋ฐ๋ผ ๋ค๋ฆ ๋๋ค.
Base URL์ http://localhost:8080/ ์ผ๋ก ํํํฉ๋๋ค.
Errors
๊ธฐ์กด HTTP ์๋ต ์ฝ๋๋ฅผ ์ฌ์ฉํ์ฌ API ์์ฒญ์ ์ฑ๊ณต ๋๋ ์คํจ๋ฅผ ๋ํ๋ ๋๋ค.
Codes in the
2xxrange indicate successCodes in the
4xxrange indicate incorrect or incomplete parameters (e.g., a required parameter was omitted, an operation failed with a 3rd party, etc.)Codes in the
5xxrange indicate an error with Zeroth servers (these are rare)
Last updated
Was this helpful?