Quick Start
title: "Quick Start"
description: "Quick Start Guide for Flashduty Open API."
date: "2024-11-20T10:00:00+08:00"
url: "https://developer-en.flashcat.cloud/en/flashduty/open-api/quickstart"
Open API is used to access and operate FlashDuty's entity data, such as viewing and managing configurations. Using the API is essentially the same as performing operations through the FlashDuty Console after logging in.
:::tip
If you want to push alerts from your own monitoring system to FlashDuty, please refer to Quick Start.
:::
How to Access
Request URL
All APIs only accept HTTPS protocol access, and there is only one Endpoint:
api.flashcat.cloud
Headers
Most requests use the POST method and pass parameters using JSON Payload. In this case, don't forget to set the Content-Type header.
Content-Type: application/json
Character Encoding
All APIs use UTF-8 encoding.
Authentication
All Open APIs use APP Key for authentication. You can obtain an APP Key by following these steps:
- Log in to the FlashDuty Console
- Go to
Account Settings - APP Key
page, enter a name, and click the add button to complete creation
:::caution
Each APP Key represents an independent user and has all operation permissions of that user. Please store it securely and avoid leakage.
:::
Usage Example
Simply pass the APP Key as a query string parameter. If your APP Key is 5e8fbfcdbf14d00696153, the request URL would be:
https://api.flashcat.cloud/path?app_key=5e8fbfcdbf14d00696153
Response Structure
Almost all request responses are in JSON format and follow this structure:
Field Name | Required | Type | Description |
---|---|---|---|
request_id | Yes | string | Request ID for trace tracking |
error | No | Error | Error description, returned only when an error occurs |
data | No | interface{} | Data content, can be any format, refer to API definition for details |
Error:
Field Name | Required | Type | Description |
---|---|---|---|
code | Yes | string | Error code, see Code for enumeration values |
message | No | string | Error description |
Code:
Error Code | HTTP Status | Description |
---|---|---|
InvalidParameter | 400 | Parameter error |
InvalidContentType | 400 | Content-Type not supported |
MethodNotAllowed | 400 | HTTP Method not supported |
Unauthorized | 401 | Authentication failed |
AccessDenied | 403 | Authorization failed |
RequestTooFrequently | 429 | Request too frequent |
RouteNotFound | 404 | Request Method+Path not matched |
ResourceNotFound | 400 | Account hasn't purchased resource, please proceed to billing center |
NoLicense | 400 | Account has insufficient subscription license, please upgrade or purchase subscription in billing center |
InternalError | 500 | Internal or unknown error |