跳转到主要内容
POST
/
schedule
/
update
更新值班表
curl --request POST \
  --url 'https://api.flashcat.cloud/schedule/update?app_key=' \
  --header 'Content-Type: application/json' \
  --data '
{
  "layers": [
    {
      "layer_name": "<string>",
      "mode": 0,
      "layer_start": 123,
      "groups": [
        {
          "group_name": "<string>",
          "members": [
            {
              "role_id": 123,
              "person_ids": [
                123
              ]
            }
          ]
        }
      ],
      "fair_rotation": true,
      "handoff_time": 123,
      "layer_end": 123,
      "restrict_mode": 0,
      "restrict_periods": [
        {
          "restrict_start": 123,
          "restrict_end": 123
        }
      ],
      "day_mask": {
        "repeat": [
          0
        ]
      },
      "rotation_unit": "hour",
      "rotation_value": 123
    }
  ],
  "schedule_id": 123,
  "description": "<string>",
  "notify": {
    "advance_in_time": 123,
    "fixed_time": {
      "cycle": "day",
      "start": "<string>"
    },
    "by": {
      "follow_preference": true,
      "personal_channels": [
        "email"
      ]
    },
    "webhooks": [
      {
        "type": "feishu",
        "settings": {
          "token": "<string>",
          "alias": "<string>",
          "integration_id": 123,
          "chat_ids": [
            "<string>"
          ],
          "sign_secret": "<string>"
        }
      }
    ]
  },
  "schedule_name": "<string>",
  "team_id": 123
}
'
{
  "error": {
    "code": "0",
    "message": ""
  }
}

授权

app_key
string
query
必填

请求体

application/json
layers
规则 · object[]
必填
schedule_id
integer
必填
description
string
必填
notify
值班轮转通知 · object
schedule_name
string
team_id
integer

响应

200 - application/json
error
object
必填