Skip to Content
Sayren 유저가이드
스토어프론트 호스팅

GitHub App 설치 확인

GitHub App 설치 화면에서 돌아온 `installation_id`·`code`와 발급받은 `state`로 그 사용자가 접근할 수 있는 설치인지 확인하고 상점에 묶는다. 응답은 그 설치의 저장소다. 접근할 수 없으면 403 `GIT_INSTALLATION_FORBIDDEN`, state가 이 상점·사용자의 쓰지 않은 값이 아니면 400 `GIT_CONNECT_STATE_INVALID`

POST
/v1/storefront/site/git/installations

GitHub App 설치 화면에서 돌아온 installation_id·code와 발급받은 state로 그 사용자가 접근할 수 있는 설치인지 확인하고 상점에 묶는다. 응답은 그 설치의 저장소다. 접근할 수 없으면 403 GIT_INSTALLATION_FORBIDDEN, state가 이 상점·사용자의 쓰지 않은 값이 아니면 400 GIT_CONNECT_STATE_INVALID

Authorization

accessToken
headerAuthorizationBearer <JWT>

Sayren 계정 토큰(로그인 토큰 또는 개인 액세스 토큰, RFC 9068 JWT)

Header Parameters

X-Store-Id*string

대상 상점 id. 토큰의 상점 범위 밖이면 403 STORE_NOT_GRANTED, 없으면 400 STORE_ID_REQUIRED다

Request Body

application/json
  1. body
installationId*integer
Range0 < value
code*string

설치 화면이 돌려준 GitHub 사용자 인증 코드(한 번만 쓴다)

Length1 <= length <= 200
state*string

설치 화면으로 보내기 전에 받은 연결 state(POST …/git/installations/state, 한 번만 쓴다)

Length1 <= length <= 200

Response Body

성공

application/json
  1. response
meta*
data*array<>
error*|null
Example Request
curl -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
}