मुखपृष्ठ / अलर्ट: API मेथड और एक्सपोर्ट

अलर्ट: API मेथड और एक्सपोर्ट

निगरानी के अलर्ट, सारांश, समय-श्रृंखलाएँ और आँकड़े पाएँ। संदर्भ में CSV एक्सपोर्ट और उससे जुड़े पैरामीटर भी दिए गए हैं।

इस पेज पर

विषय-सूची से विधि चुनें। HTTP विधि, पथ, अनुमतियाँ, अनिवार्य पैरामीटर और अनुरोध बॉडी जाँचें। schema, properties और $ref वाले JSON ब्लॉक अनुबंध बताते हैं; उन्हें तैयार अनुरोध बॉडी की तरह न भेजें। अनुरोध उदाहरण और उत्तर स्कीमा अलग चिन्हित हैं।

GET /public-api/v1/diff-projects/{id}/alerts

पैरामीटर

संबंधित डेटा मॉडल: CacheControl · RateLimitLimit · RateLimitRemaining · RateLimitResetAt · RetryAfter · XRequestID · DiffAlertListResponse · ErrorResponse · XID

id (path)

{
  "required": true,
  "schema": {
    "$ref": "#/components/schemas/XID"
  }
}

trigger_code (query)

{
  "schema": {
    "type": "string"
  }
}

created_from (query)

{
  "schema": {
    "type": "string",
    "format": "date-time"
  }
}

created_to (query)

{
  "schema": {
    "type": "string",
    "format": "date-time"
  }
}

limit (query)

{
  "schema": {
    "type": "integer",
    "minimum": 1,
    "maximum": 10000,
    "default": 1000
  }
}

offset (query)

{
  "schema": {
    "type": "integer",
    "minimum": 0,
    "default": 0
  }
}

url_md5 (query)

{
  "schema": {
    "type": "string",
    "pattern": "^[a-fA-F0-9]{32}$"
  }
}

email (query)

{
  "schema": {
    "type": "string",
    "maxLength": 255
  }
}

trigger_group (query)

{
  "schema": {
    "type": "string"
  }
}

include_raw (query)

{
  "schema": {
    "type": "boolean"
  }
}

प्रतिक्रियाएँ

200

अलर्ट।

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DiffAlertListResponse"
      }
    }
  }
}

default

कुंजी अनुपस्थित या अमान्य होने पर सीमा हेडर प्रति IP विफल प्रयासों को दर्शाते हैं। प्रमाणीकरण के बाद वे कुंजी या खाते की सीमा दर्शाते हैं। पहले से रोक या काउंटर अनुपलब्ध होने पर हेडर अनुपस्थित हो सकते हैं। X-RateLimit-Reset सेकंड में Unix समय है; 429 पर Retry-After सेकंड में प्रतीक्षा है।

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    },
    "X-RateLimit-Limit": {
      "$ref": "#/components/headers/RateLimitLimit"
    },
    "X-RateLimit-Remaining": {
      "$ref": "#/components/headers/RateLimitRemaining"
    },
    "X-RateLimit-Reset": {
      "$ref": "#/components/headers/RateLimitResetAt"
    },
    "Cache-Control": {
      "$ref": "#/components/headers/CacheControl"
    },
    "Retry-After": {
      "$ref": "#/components/headers/RetryAfter"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/ErrorResponse"
      }
    }
  }
}

GET /public-api/v1/diff-projects/{id}/reports/{report_id}/alerts

पैरामीटर

संबंधित डेटा मॉडल: CacheControl · RateLimitLimit · RateLimitRemaining · RateLimitResetAt · RetryAfter · XRequestID · DiffAlertListResponse · ErrorResponse · XID

id (path)

{
  "required": true,
  "schema": {
    "$ref": "#/components/schemas/XID"
  }
}

report_id (path)

रिपोर्ट का xid या शाब्दिक मान last। last केवल इस पथ पैरामीटर में स्वीकार किया जाता है।

{
  "required": true,
  "schema": {
    "type": "string",
    "minLength": 4,
    "maxLength": 64,
    "pattern": "^([A-Za-z0-9_-]+|last)$"
  }
}

trigger_code (query)

{
  "schema": {
    "type": "string"
  }
}

limit (query)

{
  "schema": {
    "type": "integer",
    "minimum": 1,
    "maximum": 10000,
    "default": 1000
  }
}

offset (query)

{
  "schema": {
    "type": "integer",
    "minimum": 0,
    "default": 0
  }
}

url_md5 (query)

{
  "schema": {
    "type": "string",
    "pattern": "^[a-fA-F0-9]{32}$"
  }
}

email (query)

{
  "schema": {
    "type": "string",
    "maxLength": 255
  }
}

trigger_group (query)

{
  "schema": {
    "type": "string"
  }
}

include_raw (query)

{
  "schema": {
    "type": "boolean"
  }
}

प्रतिक्रियाएँ

200

अलर्ट।

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DiffAlertListResponse"
      }
    }
  }
}

default

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    },
    "X-RateLimit-Limit": {
      "$ref": "#/components/headers/RateLimitLimit"
    },
    "X-RateLimit-Remaining": {
      "$ref": "#/components/headers/RateLimitRemaining"
    },
    "X-RateLimit-Reset": {
      "$ref": "#/components/headers/RateLimitResetAt"
    },
    "Cache-Control": {
      "$ref": "#/components/headers/CacheControl"
    },
    "Retry-After": {
      "$ref": "#/components/headers/RetryAfter"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/ErrorResponse"
      }
    }
  }
}

GET /public-api/v1/diff-projects/{id}/alerts/summary

पैरामीटर

संबंधित डेटा मॉडल: CacheControl · RateLimitLimit · RateLimitRemaining · RateLimitResetAt · RetryAfter · XRequestID · DiffAlertSummaryResponse · ErrorResponse · XID

id (path)

{
  "required": true,
  "schema": {
    "$ref": "#/components/schemas/XID"
  }
}

created_from (query)

{
  "schema": {
    "type": "string",
    "format": "date-time"
  }
}

created_to (query)

{
  "schema": {
    "type": "string",
    "format": "date-time"
  }
}

url_md5 (query)

{
  "schema": {
    "type": "string",
    "pattern": "^[a-fA-F0-9]{32}$"
  }
}

email (query)

{
  "schema": {
    "type": "string",
    "maxLength": 255
  }
}

trigger_code (query)

{
  "schema": {
    "type": "string"
  }
}

trigger_group (query)

{
  "schema": {
    "type": "string"
  }
}

include_raw (query)

{
  "schema": {
    "type": "boolean"
  }
}

प्रतिक्रियाएँ

200

अलर्ट का सारांश।

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DiffAlertSummaryResponse"
      }
    }
  }
}

default

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    },
    "X-RateLimit-Limit": {
      "$ref": "#/components/headers/RateLimitLimit"
    },
    "X-RateLimit-Remaining": {
      "$ref": "#/components/headers/RateLimitRemaining"
    },
    "X-RateLimit-Reset": {
      "$ref": "#/components/headers/RateLimitResetAt"
    },
    "Cache-Control": {
      "$ref": "#/components/headers/CacheControl"
    },
    "Retry-After": {
      "$ref": "#/components/headers/RetryAfter"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/ErrorResponse"
      }
    }
  }
}

GET /public-api/v1/diff-projects/{id}/reports/{report_id}/alerts/summary

पैरामीटर

संबंधित डेटा मॉडल: CacheControl · RateLimitLimit · RateLimitRemaining · RateLimitResetAt · RetryAfter · XRequestID · DiffAlertSummaryResponse · ErrorResponse · XID

id (path)

{
  "required": true,
  "schema": {
    "$ref": "#/components/schemas/XID"
  }
}

report_id (path)

रिपोर्ट का xid या शाब्दिक मान last। last केवल इस पथ पैरामीटर में स्वीकार किया जाता है।

{
  "required": true,
  "schema": {
    "type": "string",
    "minLength": 4,
    "maxLength": 64,
    "pattern": "^([A-Za-z0-9_-]+|last)$"
  }
}

url_md5 (query)

{
  "schema": {
    "type": "string",
    "pattern": "^[a-fA-F0-9]{32}$"
  }
}

email (query)

{
  "schema": {
    "type": "string",
    "maxLength": 255
  }
}

trigger_code (query)

{
  "schema": {
    "type": "string"
  }
}

trigger_group (query)

{
  "schema": {
    "type": "string"
  }
}

include_raw (query)

{
  "schema": {
    "type": "boolean"
  }
}

प्रतिक्रियाएँ

200

अलर्ट का सारांश।

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DiffAlertSummaryResponse"
      }
    }
  }
}

default

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    },
    "X-RateLimit-Limit": {
      "$ref": "#/components/headers/RateLimitLimit"
    },
    "X-RateLimit-Remaining": {
      "$ref": "#/components/headers/RateLimitRemaining"
    },
    "X-RateLimit-Reset": {
      "$ref": "#/components/headers/RateLimitResetAt"
    },
    "Cache-Control": {
      "$ref": "#/components/headers/CacheControl"
    },
    "Retry-After": {
      "$ref": "#/components/headers/RetryAfter"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/ErrorResponse"
      }
    }
  }
}

GET /public-api/v1/diff-projects/{id}/alerts/timeseries

पैरामीटर

संबंधित डेटा मॉडल: CacheControl · RateLimitLimit · RateLimitRemaining · RateLimitResetAt · RetryAfter · XRequestID · DiffAlertTimeseriesResponse · ErrorResponse · XID

id (path)

{
  "required": true,
  "schema": {
    "$ref": "#/components/schemas/XID"
  }
}

interval (query)

{
  "schema": {
    "type": "string",
    "enum": [
      "hour",
      "day"
    ],
    "default": "day"
  }
}

url_md5 (query)

{
  "schema": {
    "type": "string",
    "pattern": "^[a-fA-F0-9]{32}$"
  }
}

email (query)

{
  "schema": {
    "type": "string",
    "maxLength": 255
  }
}

trigger_code (query)

{
  "schema": {
    "type": "string"
  }
}

trigger_group (query)

{
  "schema": {
    "type": "string"
  }
}

include_raw (query)

{
  "schema": {
    "type": "boolean"
  }
}

from (query)

{
  "schema": {
    "type": "string",
    "format": "date-time"
  }
}

to (query)

{
  "schema": {
    "type": "string",
    "format": "date-time"
  }
}

प्रतिक्रियाएँ

200

अलर्ट की समय शृंखला।

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DiffAlertTimeseriesResponse"
      }
    }
  }
}

default

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    },
    "X-RateLimit-Limit": {
      "$ref": "#/components/headers/RateLimitLimit"
    },
    "X-RateLimit-Remaining": {
      "$ref": "#/components/headers/RateLimitRemaining"
    },
    "X-RateLimit-Reset": {
      "$ref": "#/components/headers/RateLimitResetAt"
    },
    "Cache-Control": {
      "$ref": "#/components/headers/CacheControl"
    },
    "Retry-After": {
      "$ref": "#/components/headers/RetryAfter"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/ErrorResponse"
      }
    }
  }
}

GET /public-api/v1/diff-projects/{id}/alerts/export.csv

पैरामीटर

संबंधित डेटा मॉडल: CacheControl · RateLimitLimit · RateLimitRemaining · RateLimitResetAt · RetryAfter · XRequestID · ErrorResponse · XID

id (path)

{
  "required": true,
  "schema": {
    "$ref": "#/components/schemas/XID"
  }
}

created_from (query)

{
  "schema": {
    "type": "string",
    "format": "date-time"
  }
}

created_to (query)

{
  "schema": {
    "type": "string",
    "format": "date-time"
  }
}

bom (query)

{
  "schema": {
    "type": "boolean",
    "default": true
  }
}

url_md5 (query)

{
  "schema": {
    "type": "string",
    "pattern": "^[a-fA-F0-9]{32}$"
  }
}

email (query)

{
  "schema": {
    "type": "string",
    "maxLength": 255
  }
}

trigger_code (query)

{
  "schema": {
    "type": "string"
  }
}

trigger_group (query)

{
  "schema": {
    "type": "string"
  }
}

include_raw (query)

{
  "schema": {
    "type": "boolean"
  }
}

प्रतिक्रियाएँ

200

स्प्रेडशीट टूल के लिए एन्कोड किया गया CSV निर्यात।

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    },
    "Content-Disposition": {
      "schema": {
        "type": "string"
      }
    }
  },
  "content": {
    "text/csv": {
      "schema": {
        "type": "string"
      }
    }
  }
}

default

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    },
    "X-RateLimit-Limit": {
      "$ref": "#/components/headers/RateLimitLimit"
    },
    "X-RateLimit-Remaining": {
      "$ref": "#/components/headers/RateLimitRemaining"
    },
    "X-RateLimit-Reset": {
      "$ref": "#/components/headers/RateLimitResetAt"
    },
    "Cache-Control": {
      "$ref": "#/components/headers/CacheControl"
    },
    "Retry-After": {
      "$ref": "#/components/headers/RetryAfter"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/ErrorResponse"
      }
    }
  }
}

GET /public-api/v1/diff-projects/{id}/alerts/metrics

पैरामीटर

संबंधित डेटा मॉडल: CacheControl · RateLimitLimit · RateLimitRemaining · RateLimitResetAt · RetryAfter · XRequestID · ErrorResponse · XID

id (path)

{
  "required": true,
  "schema": {
    "$ref": "#/components/schemas/XID"
  }
}

created_from (query)

{
  "schema": {
    "type": "string",
    "format": "date-time"
  }
}

created_to (query)

{
  "schema": {
    "type": "string",
    "format": "date-time"
  }
}

url_md5 (query)

{
  "schema": {
    "type": "string",
    "pattern": "^[a-fA-F0-9]{32}$"
  }
}

email (query)

{
  "schema": {
    "type": "string",
    "maxLength": 255
  }
}

trigger_code (query)

{
  "schema": {
    "type": "string"
  }
}

trigger_group (query)

{
  "schema": {
    "type": "string"
  }
}

include_raw (query)

{
  "schema": {
    "type": "boolean"
  }
}

प्रतिक्रियाएँ

200

केवल कम कार्डिनैलिटी वाले लेबल के साथ Prometheus टेक्स्ट प्रारूप।

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    }
  },
  "content": {
    "text/plain": {
      "schema": {
        "type": "string"
      }
    }
  }
}

default

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    },
    "X-RateLimit-Limit": {
      "$ref": "#/components/headers/RateLimitLimit"
    },
    "X-RateLimit-Remaining": {
      "$ref": "#/components/headers/RateLimitRemaining"
    },
    "X-RateLimit-Reset": {
      "$ref": "#/components/headers/RateLimitResetAt"
    },
    "Cache-Control": {
      "$ref": "#/components/headers/CacheControl"
    },
    "Retry-After": {
      "$ref": "#/components/headers/RetryAfter"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/ErrorResponse"
      }
    }
  }
}

GET /public-api/v1/diff-projects/{id}/reports/{report_id}/alerts/metrics

पैरामीटर

संबंधित डेटा मॉडल: CacheControl · RateLimitLimit · RateLimitRemaining · RateLimitResetAt · RetryAfter · XRequestID · ErrorResponse · XID

id (path)

{
  "required": true,
  "schema": {
    "$ref": "#/components/schemas/XID"
  }
}

report_id (path)

रिपोर्ट का xid या शाब्दिक मान last। last केवल इस पथ पैरामीटर में स्वीकार किया जाता है।

{
  "required": true,
  "schema": {
    "type": "string",
    "minLength": 4,
    "maxLength": 64,
    "pattern": "^([A-Za-z0-9_-]+|last)$"
  }
}

url_md5 (query)

{
  "schema": {
    "type": "string",
    "pattern": "^[a-fA-F0-9]{32}$"
  }
}

email (query)

{
  "schema": {
    "type": "string",
    "maxLength": 255
  }
}

trigger_code (query)

{
  "schema": {
    "type": "string"
  }
}

trigger_group (query)

{
  "schema": {
    "type": "string"
  }
}

include_raw (query)

{
  "schema": {
    "type": "boolean"
  }
}

प्रतिक्रियाएँ

200

केवल कम कार्डिनैलिटी वाले लेबल के साथ Prometheus टेक्स्ट प्रारूप।

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    }
  },
  "content": {
    "text/plain": {
      "schema": {
        "type": "string"
      }
    }
  }
}

default

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    },
    "X-RateLimit-Limit": {
      "$ref": "#/components/headers/RateLimitLimit"
    },
    "X-RateLimit-Remaining": {
      "$ref": "#/components/headers/RateLimitRemaining"
    },
    "X-RateLimit-Reset": {
      "$ref": "#/components/headers/RateLimitResetAt"
    },
    "Cache-Control": {
      "$ref": "#/components/headers/CacheControl"
    },
    "Retry-After": {
      "$ref": "#/components/headers/RetryAfter"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/ErrorResponse"
      }
    }
  }
}