스토어프론트 호스팅
GitHub App 설치 확인
GitHub App 설치 화면에서 돌아온 `installation_id`·`code`와 발급받은 `state`로 그 사용자가 접근할 수 있는 설치인지 확인하고 상점에 묶는다. 응답은 그 설치의 저장소다. 접근할 수 없으면 403 `GIT_INSTALLATION_FORBIDDEN`, state가 이 상점·사용자의 쓰지 않은 값이 아니면 400 `GIT_CONNECT_STATE_INVALID`
POST
GitHub App 설치 화면에서 돌아온 installation_id·code와 발급받은 state로 그 사용자가 접근할 수 있는 설치인지 확인하고 상점에 묶는다. 응답은 그 설치의 저장소다. 접근할 수 없으면 403 GIT_INSTALLATION_FORBIDDEN, state가 이 상점·사용자의 쓰지 않은 값이 아니면 400 GIT_CONNECT_STATE_INVALID
accessTokenheader
AuthorizationBearer <JWT>Sayren 계정 토큰(로그인 토큰 또는 개인 액세스 토큰, RFC 9068 JWT)
X-Store-Id*string대상 상점 id. 토큰의 상점 범위 밖이면 403 STORE_NOT_GRANTED, 없으면 400 STORE_ID_REQUIRED다
application/json- body
installationId*integerRange
0 < valuecode*string설치 화면이 돌려준 GitHub 사용자 인증 코드(한 번만 쓴다)
Length
1 <= length <= 200state*string설치 화면으로 보내기 전에 받은 연결 state(POST …/git/installations/state, 한 번만 쓴다)
Length
1 <= length <= 200성공
application/json- response
meta*data*array<>error*|nullcurl -X POST 'https://api.sayren.io/v1/storefront/site/git/installations' \
-H 'X-Store-Id: string' \
-H 'Content-Type: application/json' \
-d '{
"installationId": 1,
"code": "string",
"state": "string"
}'Example Response
{
"meta": {
"status": 200,
"code": "OK",
"message": "OK",
"isSuccess": true
},
"data": [
{
"repoId": 0,
"fullName": "string",
"defaultBranch": "string"
}
],
"error": null
}