스토어프론트 호스팅
스토어프론트 사이트 만들기
사이트를 만든다. 공개 상태는 오픈 준비 중(`COMING_SOON`)이고 발행 버전이 없다 — 첫 성공 빌드가 발행된다. 슬러그를 생략하면 상점 코드다. `initialSource: NONE`(기본)은 빈 작업 트리로 시작해 첫 소스 업로드(`PUT …/site/source`)가 첫 소스이고, `STARTER`는 sayren 시작 코드의 최신 게시 버전으로 첫 버전을 빌드한다
POST
사이트를 만든다. 공개 상태는 오픈 준비 중(COMING_SOON)이고 발행 버전이 없다 — 첫 성공 빌드가 발행된다. 슬러그를 생략하면 상점 코드다. initialSource: NONE(기본)은 빈 작업 트리로 시작해 첫 소스 업로드(PUT …/site/source)가 첫 소스이고, STARTER는 sayren 시작 코드의 최신 게시 버전으로 첫 버전을 빌드한다
accessTokenheader
AuthorizationBearer <JWT>Sayren 계정 토큰(로그인 토큰 또는 개인 액세스 토큰, RFC 9068 JWT)
X-Store-Id*string대상 상점 id. 토큰의 상점 범위 밖이면 403 STORE_NOT_GRANTED, 없으면 400 STORE_ID_REQUIRED다
application/json- body
initialSource?string첫 소스 (기본 NONE). NONE은 빈 작업 트리로 시작하고 첫 소스 업로드가 첫 소스다. STARTER는 sayren 시작 코드의 최신 게시 버전으로 첫 작업 트리를 만들고 빌드한다
Value in
"NONE""STARTER"slug?string주소 슬러그. 생략하면 상점 코드
Match
^[a-z0-9](?:[a-z0-9-]{1,28}[a-z0-9])$성공
application/json- response
meta*data*error*|nullcurl -X POST 'https://api.sayren.io/v1/storefront/site' \
-H 'X-Store-Id: string' \
-H 'Content-Type: application/json' \
-d '{}'Example Response
{
"meta": {
"status": 201,
"code": "OK",
"message": "OK",
"isSuccess": true
},
"data": {
"siteId": "string",
"versionHistory": true,
"autoPublish": true,
"deployWithoutApproval": true,
"slug": "string",
"hostname": "string",
"url": "string",
"domains": [
{
"hostname": "string",
"kind": "PLATFORM",
"status": "ACTIVE",
"isPrimary": true,
"holdUntil": "string"
}
],
"status": "ACTIVE",
"visibility": "COMING_SOON",
"publishedVersion": {
"versionId": "string",
"number": 1,
"status": "BUILDING",
"published": true,
"publishedAt": "string",
"message": "string",
"source": "TEMPLATE",
"buildId": "string",
"createdByType": "string",
"createdVia": "string",
"gitRef": "string",
"commitSha": "string",
"excludedPaths": [
"string"
],
"mainChanged": true,
"buildCanceled": true,
"createdAt": "string",
"previewable": true
},
"provisioning": {
"status": "SYNCED",
"lastErrorCode": "string",
"syncedAt": "string"
},
"editPreview": {
"hostname": "string"
},
"slugChangesRemaining": 0,
"suspension": {
"reason": "string",
"suspendedAt": "string"
},
"snapshot": {
"url": "string",
"versionId": "string",
"capturedAt": "string"
},
"createdAt": "string",
"updatedAt": "string"
},
"error": null
}