コンテンツにスキップ
commentor API
Esc
↑↓移動↵開く⌘Jプレビュー

タグとアーカイブを変える

タグを足す・外す、アーカイブする・戻す。少なくとも 1 つの項目を送る。アーカイブはオーナーだけが変えられる。

PATCH/api/reviews/{reviewId}/meta
Authorization
AuthorizationBearer token · headerrequired

管理用トークン。題名・タグ・アーカイブ・共有先を変える、文書を削除するのに使う。

or
AuthorizationBearer token · headerrequired

本人用の個人トークン。発行時に選んだ範囲の操作を、本人の名義で行う。読み取りと本人のトークン操作は、範囲を問わず使える。

Path parameters
reviewIdstringrequired

文書の ID。文書の URL /reviews/<reviewId> の末尾と同じ。

Request body
requiredapplication/json
addTagsstring[]
removeTagsstring[]
archivedboolean
Responses
200

変えた。

reviewManagedReview

管理の操作の応答。本文とコメントは含まない。

Show properties
reviewIdstring
titlestring
tagsstring[]
archivedTsinteger | null

アーカイブした時刻(UNIX 時間のミリ秒)。アーカイブしていなければ null。

accessModestring
Allowed:linkrestricted
allowedUsersobject[]

招待した人。

Show properties
Array of object
emailstring
rolestring
Allowed:editorviewer
400

タグの形が違う(invalid_tags)か、変える項目が無い(meta_empty)。

errorstringrequired

エラーの種類を表す短いコード。対処を分けるときはこの値を見る。

statusintegerrequired

HTTP ステータスと同じ値。

currentRevisioninteger

409 comments revision conflict のとき、文書の今の commentsRevision。

latestVersionIdstring

409 stale_target_version のとき、文書の最新版の ID。

401

トークンが無いか、この文書を読む権限が無い。

errorstringrequired

エラーの種類を表す短いコード。対処を分けるときはこの値を見る。

statusintegerrequired

HTTP ステータスと同じ値。

currentRevisioninteger

409 comments revision conflict のとき、文書の今の commentsRevision。

latestVersionIdstring

409 stale_target_version のとき、文書の最新版の ID。

403

このトークンでは使えない操作か、対象に対する権限が無い。使えるトークンは各操作の Authorization の欄を見る。

errorstringrequired

エラーの種類を表す短いコード。対処を分けるときはこの値を見る。

statusintegerrequired

HTTP ステータスと同じ値。

currentRevisioninteger

409 comments revision conflict のとき、文書の今の commentsRevision。

latestVersionIdstring

409 stale_target_version のとき、文書の最新版の ID。

Request
curl -X PATCH 'https://comment-review.fsmarketing.workers.dev/api/reviews/review_example01/meta' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
  "addTags": [
    "LP"
  ],
  "archived": false
}'
Response
{
  "review": {
    "reviewId": "string",
    "title": "string",
    "tags": [
      "string"
    ],
    "archivedTs": 0,
    "accessMode": "link",
    "allowedUsers": [
      {
        "email": "string",
        "role": "editor"
      }
    ]
  }
}