Flashcat API (English)
API referenceDocs中文
API referenceDocs中文
  1. Schedule Management
  • Open API
    • Quick Start
    • About Pagination
    • Member Management
      • Invite members
      • Delete member
      • Reset information
      • Member list
    • Team Management
      • Team list
      • Basic information
      • Delete team
      • Team upsert
    • Schedule Management
      • Preview schedule
        POST
      • Update schedule
        POST
      • Enable schedule
        POST
      • Disable schedule
        POST
      • Create schedule
        POST
      • Delete schedule
        POST
      • View schedule details
        POST
      • Get schedule information by ID list
        POST
      • View schedule list
        POST
      • Personal schedule calendar
        POST
      • Role information
        GET
    • Information Retrieval
      • Channel
      • Member
      • Team
    • Preference Settings
      • View preference settings
      • Modify preference settings
    • Channel
      • Escalation Rules
        • Enable rule
        • Disable rule
        • Delete rule
        • Rule list
        • Rule details
        • Create rule
        • Update rule
      • Subscription Rules
        • Enable rule
        • Disable rule
        • Delete rule
        • Rule list
        • Create rule
        • Update rule
      • Drop Rules
        • Enable rule
        • Disable rule
        • Delete rule
        • Rule list
        • Create rule
        • Update rule
      • Silence Rules
        • Enable rule
        • Disable rule
        • Delete rule
        • Rule list
        • Rule details
        • Inner conditions
      • Inhibit Rules
        • Disable rule
        • Delete rule
        • Rule list
        • See creation interface for filters explanation
        • Channel ID
        • Rule name
      • Match conditions
      • Delete rule
      • See creation interface for filters explanation
      • Enable rule
      • Update rule
      • Rule ID
      • Rule name
      • Sort
      • Delete rule
      • See creation interface for filters explanation
      • Name by integration
      • Robot list
    • Template Management
      • Name
      • Enable rule
      • Delete rule
      • See creation interface for filters explanation
      • Channel ID
      • Rule name
      • Required when updating
      • Update rule
    • Incident Management
      • Group View
        • Channel
        • Rule name
        • Inner conditions
        • Channel
      • Match conditions
      • Enable rule
      • Disable rule
      • Delete rule
      • Rule list
      • See creation interface for filters explanation
      • Create rule
      • Rule description
      • Update rule
      • Channel
      • Match conditions
      • Match conditions
      • Update rule
      • Channel
      • Rule ID
      • Inner conditions
      • Enable rule
      • Rule list
      • Rule details
      • Rule name
      • Rule description
      • Match conditions
      • Rule description
      • See creation interface for filters explanation
      • Disable rule
      • Rule description
    • Alert Management
      • Group View
        • Required when updating
        • Rule name
        • Inner conditions
        • Disable rule
      • Alert Info
      • Close Alert
      • Alert List By Card
      • Alert List
      • Alert List By ID
      • Event List
      • Feed
      • Merge Incident
    • Change Management
      • Inner conditions
    • Insights (old)
      • Channel
      • Match conditions
      • Rule ID
      • Enable rule
      • Name
      • Disable rule
      • Rule name
      • Name
      • See creation interface for filters explanation
    • Custom Fields
      • Enable rule
      • Disable rule
      • See creation interface for filters explanation
      • Channel ID
      • Channel
    • Service Calendar
      • Match conditions
      • Delete rule
      • Update rule
      • Required when updating
      • Rule details
      • Required when updating
      • Inner conditions
      • Channel
    • Label Enhancement
      • Mapping
        • Rule name
        • Rule list
        • Rule description
        • Match conditions
        • Rule ID
        • Rule description
        • Inner conditions
        • Enable rule
        • Disable rule
        • Rule description
      • Enable rule
      • Delete rule
    • Alert Processing
      • Create rule
      • Rule name
    • Integration Routing
      • Required when updating
      • Rule description
      • Match conditions
    • License Management
      • Create rule
    • Insights
      • Team Metrics
      • Responder Metrics Export
      • Incident List
      • Responder Metrics
      • Account Metrics
      • Channel Metrics Export
      • Team Metrics Export
      • Incident Export
      • Alert Top
      • Cahnnel Metrics
  • Event API
    • Quick Start
    • Alert Event
    • Change Event
  • Webhook
    • Quick Start
    • Custom Actions
    • Alert Webhook
    • Incident Webhook
  1. Schedule Management

Update schedule

POST
/schedule/update

Request

Body Params application/json
layers
array [object {11}] 
Rule
required
layer_name
string 
Rule name
optional
mode
enum<integer> 
Mode (normal/temporary)
required
Rules with mode=1 are placed after mode=0
Allowed values:
01
groups
array [object {2}] 
Schedule group
optional
rotation_duration
integer 
Schedule cycle
optional
In seconds
>= 3600<= 2592000
fair_rotation
boolean 
Fair rotation switch
optional
handoff_time
integer 
Handover time
optional
Handover time in seconds from Monday 00:00 for weekly schedule cycle
layer_start
integer 
Start time
required
Minimum granularity is half hour
layer_end
integer 
End time
optional
Minimum granularity is half hour
restrict_mode
enum<integer> 
Restriction mode within cycle
optional
0 No restriction 1 Daily 2 Weekly
Allowed values:
012
restrict_periods
array [object {2}] 
Restricted time interval list
optional
day_mask
object 
Date mask
optional
notify
object 
Schedule rotation notifications
optional
advance_in_time
integer 
Advance notification time
optional
In seconds
fixed_time
object 
Fixed time notification
optional
by
object 
Personal notifications
optional
webhooks
array [object {2}] 
Webhook notifications
optional
schedule_id
integer 
required
schedule_name
string 
optional
team_id
integer 
Team ID
optional
description
string 
Notes
required
Example
{
    "layers": [
        {
            "layer_name": "string",
            "mode": 0,
            "groups": [
                {
                    "group_name": "string",
                    "members": [
                        {
                            "role_id": 0,
                            "person_ids": [
                                0
                            ]
                        }
                    ]
                }
            ],
            "rotation_duration": 3600,
            "fair_rotation": true,
            "handoff_time": 0,
            "layer_start": 0,
            "layer_end": 0,
            "restrict_mode": 0,
            "restrict_periods": [
                {
                    "restrict_start": 0,
                    "restrict_end": 0
                }
            ],
            "day_mask": {
                "repeat": [
                    0
                ]
            }
        }
    ],
    "notify": {
        "advance_in_time": 0,
        "fixed_time": {
            "cycle": "day",
            "start": "string"
        },
        "by": {
            "follow_preference": true,
            "personal_channels": [
                "email"
            ]
        },
        "webhooks": [
            {
                "type": "feishu",
                "settings": {
                    "token": "string",
                    "alias": "string",
                    "integration_id": 0,
                    "chat_ids": [
                        "string"
                    ],
                    "sign_secret": "string"
                }
            }
        ]
    },
    "schedule_id": 0,
    "schedule_name": "string",
    "team_id": 0,
    "description": "string"
}

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'http://prod-cn.your-api-server.com/schedule/update' \
--header 'Content-Type: application/json' \
--data-raw '{
    "layers": [
        {
            "layer_name": "string",
            "mode": 0,
            "groups": [
                {
                    "group_name": "string",
                    "members": [
                        {
                            "role_id": 0,
                            "person_ids": [
                                0
                            ]
                        }
                    ]
                }
            ],
            "rotation_duration": 3600,
            "fair_rotation": true,
            "handoff_time": 0,
            "layer_start": 0,
            "layer_end": 0,
            "restrict_mode": 0,
            "restrict_periods": [
                {
                    "restrict_start": 0,
                    "restrict_end": 0
                }
            ],
            "day_mask": {
                "repeat": [
                    0
                ]
            }
        }
    ],
    "notify": {
        "advance_in_time": 0,
        "fixed_time": {
            "cycle": "day",
            "start": "string"
        },
        "by": {
            "follow_preference": true,
            "personal_channels": [
                "email"
            ]
        },
        "webhooks": [
            {
                "type": "feishu",
                "settings": {
                    "token": "string",
                    "alias": "string",
                    "integration_id": 0,
                    "chat_ids": [
                        "string"
                    ],
                    "sign_secret": "string"
                }
            }
        ]
    },
    "schedule_id": 0,
    "schedule_name": "string",
    "team_id": 0,
    "description": "string"
}'

Responses

🟢200成功
application/json
Body
error
object 
required
code
enum<string> 
Error code
required
Allowed values:
InvalidParameterInvalidContentTypeUnauthorizedAccessDeniedMethodNotAllowedRequestTooFrequentlyRequestVerifyRequiredDangerousOperationRequestLockedRouteNotFoundBalanceNotEnoughUndonedOrderExistResourceNotFoundInternalErrorReferenceExist
message
string 
Error description
required
Example
{
    "error": {
        "code": "0",
        "message": ""
    }
}
Previous
Preview schedule
Next
Enable schedule
Built with