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

스토어프론트 버전 발행

이미 그 버전이 발행돼 있으면 바꾸지 않고 200이다. `expectedPublishedVersionId`를 주면 지금 발행 버전이 같을 때만 바꾼다

POST
/v1/storefront/site/versions/{versionId}/publish

이미 그 버전이 발행돼 있으면 바꾸지 않고 200이다. expectedPublishedVersionId를 주면 지금 발행 버전이 같을 때만 바꾼다

Authorization

accessToken
headerAuthorizationBearer <JWT>

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

Path Parameters

versionId*string

Header Parameters

X-Store-Id*string

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

Request Body

application/json
  1. body
expectedPublishedVersionId?|

화면에서 본 발행 버전 id (발행 전이었으면 null). 생략하면 확인하지 않는다

Response Body

성공

application/json
  1. response
meta*
data*
error*|null
Example Request
curl -X POST 'https://api.sayren.io/v1/storefront/site/versions/string/publish' \
  -H 'X-Store-Id: string' \
  -H 'Content-Type: application/json' \
  -d '{}'
Example Response
{
  "meta": {
    "status": 200,
    "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
}