मुखपृष्ठ / API से Diff बदलावों की निगरानी

API से Diff बदलावों की निगरानी

API से Diff बदलावों की निगरानी. HTTP अनुरोध, पैरामीटर, उत्तर के स्कीमा और Labrika में काम का क्रम।

इस पृष्ठ पर

परिवर्तन निगरानी

यह API निगरानी प्रोजेक्ट, जाँच का इतिहास और अलग-अलग पेजों के बदलाव उपलब्ध कराता है। परिणामों का उपयोग अपने डैशबोर्ड, निर्यात या प्रकाशन से पहले जाँच के लिए करें।

पहले प्रोजेक्ट प्राप्त करें, उसके इतिहास से रिपोर्ट चुनें और उसकी पंक्तियाँ लोड करें। पेज की पंक्ति से url_md5 कॉपी करें। last उस प्रोजेक्ट की नवीनतम पूर्ण रिपोर्ट चुनता है; दोहराए जा सकने वाले निर्यात के लिए निश्चित report_id उपयोग करें।
स्कोप
  • diff-projects:read
  • diff-reports:read
  • diff_project_id प्राप्त करने के लिए /public-api/v1/diff-projects से शुरू करें।
  • रिपोर्ट इतिहास: /public-api/v1/diff-projects/{diff_project_id}/reports।
  • नवीनतम रिपोर्ट: report_id की जगह last भेजें।
  • /public-api/v1/diff-projects/{diff_project_id}/reports/{report_id}/rows में include_state=true से पृष्ठ की स्थिति और फ़ाइल उपलब्धता की जानकारी जुड़ती है।
प्रोजेक्ट, रिपोर्ट और पंक्तियों की सूचियाँ data में मिलती हैं। जब तक pagination.has_more का मान true हो, pagination.next_offset को offset के रूप में भेजें। limit: 1–10000, डिफ़ॉल्ट 1000; offset: 0 या अधिक, डिफ़ॉल्ट 0।
GET /public-api/v1/diff-projects

वर्तमान उपयोगकर्ता के निगरानी प्रोजेक्ट लौटाता है। अगले अनुरोधों में data[].diff_project_id उपयोग करें।

GET /public-api/v1/diff-projects/{diff_project_id}/reports

जाँच का इतिहास लौटाता है: report_id, स्थिति, निर्माण समय, पेजों और चेतावनियों की संख्या।

GET /public-api/v1/diff-projects/{diff_project_id}/report-graph

समय के साथ निगरानी परिणाम दिखाने के लिए प्रोजेक्ट की जाँच के इतिहास का चार्ट डेटा।

GET /public-api/v1/diff-projects/{diff_project_id}/reports/{report_id}/rows

चुनी गई जाँच के पेज और मिले बदलाव लौटाता है। report_id में इतिहास का पहचानकर्ता या last दें।

पैरामीटर
पैरामीटर प्रकार विवरण
include_state boolean true से title, description, h1, ट्रैक किए गए टैग, फ़ाइलें और अन्य स्थिति फ़ील्ड जुड़ते हैं।
limit / offset integer पृष्ठों में पंक्तियाँ प्राप्त करना। limit का अधिकतम मान 10,000 है।
has_alert boolean सक्रिय अलर्ट वाली पंक्तियाँ फ़िल्टर करता है।
GET /public-api/v1/diff-projects/{diff_project_id}/reports/{report_id}/pages/{url_md5}

चुनी गई रिपोर्ट के लिए दर्ज पृष्ठ का विस्तृत डेटा।

स्थिति सहित पंक्तियाँ
curl
curl --fail-with-body --silent --show-error --location \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --header 'Accept: application/json' \
  'https://app.labrika.com/public-api/v1/diff-projects/PROJECT_ID/reports/last/rows?include_state=true&limit=1000&offset=0'
JavaScript
async function main () {
  const response = await fetch("https://app.labrika.com/public-api/v1/diff-projects/PROJECT_ID/reports/last/rows?include_state=true&limit=1000&offset=0", {
    method: "GET",
    headers: {
      "Authorization": "Bearer YOUR_API_KEY",
      "Accept": "application/json",
    },
    signal: AbortSignal.timeout(30_000),
  })

  if (!response.ok) {
    const responseText = await response.text()
    throw new Error(`HTTP ${response.status}: ${responseText}`)
  }

  const responseText = await response.text()
  const data = responseText && response.headers.get("content-type")?.includes("application/json") ? JSON.parse(responseText) : responseText

  console.log(data)
}

main().catch(error => {
  console.error(error)
  process.exitCode = 1
})
Python
import json
import requests

url = "https://app.labrika.com/public-api/v1/diff-projects/PROJECT_ID/reports/last/rows?include_state=true&limit=1000&offset=0"
headers = {
    "Authorization": "Bearer YOUR_API_KEY",
    "Accept": "application/json",
}

response = requests.request(
    "GET",
    url,
    headers=headers,
    timeout=30,
)
response.raise_for_status()
print(json.dumps(response.json(), ensure_ascii=False, indent=2) if response.content and "application/json" in response.headers.get("Content-Type", "") else response.text)
PHP
<?php

$curl = curl_init('https://app.labrika.com/public-api/v1/diff-projects/PROJECT_ID/reports/last/rows?include_state=true&limit=1000&offset=0');

if ($curl === false) {
    throw new RuntimeException('Unable to initialize cURL');
}

curl_setopt_array($curl, [
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer YOUR_API_KEY',
        'Accept: application/json',
    ],
]);

$response = curl_exec($curl);

if ($response === false) {
    $message = curl_error($curl);
    curl_close($curl);
    throw new RuntimeException('Network error: ' . $message);
}

$status = curl_getinfo($curl, CURLINFO_RESPONSE_CODE);
$contentType = curl_getinfo($curl, CURLINFO_CONTENT_TYPE) ?: '';
curl_close($curl);

if ($status < 200 || $status >= 300) {
    throw new RuntimeException("HTTP $status: $response");
}

if ($response !== '' && str_contains($contentType, 'application/json')) {
    print_r(json_decode($response, true, 512, JSON_THROW_ON_ERROR));
} else {
    echo $response;
}
Go
package main

import (
	"context"
	"fmt"
	"io"
	"net/http"
	"os"
	"time"
)

func main() {
	ctx, cancel := context.WithTimeout(context.Background(), 30 * time.Second)
	defer cancel()

	request, err := http.NewRequestWithContext(ctx, http.MethodGet, "https://app.labrika.com/public-api/v1/diff-projects/PROJECT_ID/reports/last/rows?include_state=true&limit=1000&offset=0", nil)
	if err != nil {
		panic(err)
	}

	request.Header.Set("Authorization", "Bearer YOUR_API_KEY")
	request.Header.Set("Accept", "application/json")

	client := &http.Client{Timeout: 30 * time.Second}
	response, err := client.Do(request)
	if err != nil {
		panic(err)
	}
	defer response.Body.Close()

	if response.StatusCode < http.StatusOK || response.StatusCode >= http.StatusMultipleChoices {
		errorBody, readErr := io.ReadAll(response.Body)
		if readErr != nil {
			panic(readErr)
		}
		panic(fmt.Sprintf("HTTP %d: %s", response.StatusCode, errorBody))
	}

	if _, err := io.Copy(os.Stdout, response.Body); err != nil {
		panic(err)
	}
}
Google Apps Script
function callLabrikaPublicAPI() {
  const response = UrlFetchApp.fetch("https://app.labrika.com/public-api/v1/diff-projects/PROJECT_ID/reports/last/rows?include_state=true&limit=1000&offset=0", {
    method: "get",
    headers: {
      "Authorization": "Bearer YOUR_API_KEY",
      "Accept": "application/json",
    },
    followRedirects: false,
    muteHttpExceptions: true,
  });
  const status = response.getResponseCode();
  if (status < 200 || status >= 300) {
    throw new Error('HTTP ' + status + ': ' + response.getContentText());
  }
  Logger.log(response.getContentText());
}

विषय सूची पर वापस जाएँ

API विधि संदर्भ — Diff

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

इस अनुभाग की विधियाँ

GET /public-api/v1/diff-projects

पैरामीटर

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

limit (query)
{
  "schema": {
    "type": "integer",
    "minimum": 1,
    "maximum": 10000,
    "default": 1000
  }
}
offset (query)
{
  "schema": {
    "type": "integer",
    "minimum": 0,
    "default": 0
  }
}

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

200

Diff परियोजनाएँ।

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DiffProjectListResponse"
      }
    }
  }
}
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

पैरामीटर

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

id (path)
{
  "required": true,
  "schema": {
    "$ref": "#/components/schemas/XID"
  }
}
limit (query)
{
  "schema": {
    "type": "integer",
    "minimum": 1,
    "maximum": 10000,
    "default": 1000
  }
}
offset (query)
{
  "schema": {
    "type": "integer",
    "minimum": 0,
    "default": 0
  }
}
status (query)
{
  "schema": {
    "type": "string",
    "enum": [
      "progress",
      "done",
      "failed"
    ]
  }
}
created_from (query)
{
  "schema": {
    "type": "string",
    "format": "date-time"
  }
}
created_to (query)
{
  "schema": {
    "type": "string",
    "format": "date-time"
  }
}

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

200

Diff रिपोर्ट।

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DiffReportListResponse"
      }
    }
  }
}
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}/report-graph

पैरामीटर

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

id (path)
{
  "required": true,
  "schema": {
    "$ref": "#/components/schemas/XID"
  }
}
limit (query)
{
  "schema": {
    "type": "integer",
    "minimum": 1,
    "maximum": 10000,
    "default": 1000
  }
}
offset (query)
{
  "schema": {
    "type": "integer",
    "minimum": 0,
    "default": 0
  }
}

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

200

Diff रिपोर्ट का ग्राफ़।

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DiffReportGraphResponse"
      }
    }
  }
}
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}/rows

पैरामीटर

संबंधित डेटा मॉडल: CacheControl · RateLimitLimit · RateLimitRemaining · RateLimitResetAt · RetryAfter · XRequestID · DiffReportRowsResponse · 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)$"
  }
}
include_state (query)
{
  "schema": {
    "type": "boolean",
    "default": false
  }
}
limit (query)
{
  "schema": {
    "type": "integer",
    "minimum": 1,
    "maximum": 10000,
    "default": 1000
  }
}
offset (query)
{
  "schema": {
    "type": "integer",
    "minimum": 0,
    "default": 0
  }
}
search (query)
{
  "schema": {
    "type": "string",
    "maxLength": 300
  }
}
url_md5 (query)
{
  "schema": {
    "type": "string",
    "pattern": "^[a-fA-F0-9]{32}$"
  }
}
has_alert (query)
{
  "schema": {
    "type": "boolean"
  }
}
rule_id (query)
{
  "schema": {
    "type": "string"
  }
}
http_status (query)
{
  "schema": {
    "type": "integer",
    "minimum": 100,
    "maximum": 599
  }
}
changed_field (query)
{
  "schema": {
    "type": "string"
  }
}
alert_trigger_code (query)
{
  "schema": {
    "type": "string"
  }
}
alert_trigger_group (query)
{
  "schema": {
    "type": "string"
  }
}

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

200

Diff रिपोर्ट की पंक्तियाँ।

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DiffReportRowsResponse"
      }
    }
  }
}
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}/pages/{url_md5}

पैरामीटर

संबंधित डेटा मॉडल: CacheControl · RateLimitLimit · RateLimitRemaining · RateLimitResetAt · RetryAfter · XRequestID · DiffPageDetailResponse · ErrorResponse · URLMD5 · 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 (path)
{
  "required": true,
  "schema": {
    "$ref": "#/components/schemas/URLMD5"
  }
}

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

200

Diff पृष्ठ का विवरण।

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DiffPageDetailResponse"
      }
    }
  }
}
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"
      }
    }
  }
}

विषय सूची पर वापस जाएँ

URL और बदलावों की निगरानी के नियम

URL और नियम केवल भविष्य की रिपोर्ट को प्रभावित करते हैं। पुरानी रिपोर्टों में विश्लेषण के समय गणना किया गया डेटा बना रहता है।

409 rule_in_use: यह नियम स्वचालित URL जोड़, आयात और API में उपयोग होता है। इसे हटाने से पहले नए पेजों के लिए दूसरा नियम चुनकर सहेजें।

स्कोप
  • GET → diff-urls:read, diff-rules:read
  • POST / PATCH / DELETE → diff-urls:write, diff-rules:write
  • POST /public-api/v1/diff-projects/{diff_project_id}/urls?dry_run=true URL को सहेजे बिना सत्यापित करता है।
  • बड़ी संख्या में URL आयात करने के लिए Idempotency-Key की अनुशंसा की जाती है।
  • POST में alert_rule_id न देने या null भेजने पर URL सूची की सेटिंग का वर्तमान नए पेजों वाला नियम स्थायी रूप से दिया जाता है। null वाला PATCH चुने हुए URL को यह वर्तमान नियम स्पष्ट रूप से देता है। बाद में सेटिंग बदलने से मौजूदा पेज नहीं बदलते; मौजूदा URL का POST दोहराने पर पुराना नियम बना रहता है। चयन सहेजा न हो तो 409 default_rule_not_configured मिलता है।
  • URL हटाने से पिछली रिपोर्ट की ऐतिहासिक पंक्तियाँ नहीं हटतीं।
  • नियम केवल तभी हटाया जा सकता है जब वह डिफ़ॉल्ट न हो और कोई URL स्पष्ट रूप से उसे सौंपा न गया हो।

URL: urls में अधिकतम 1000 पूर्ण HTTP/HTTPS पते हो सकते हैं। url_md5 सामान्यीकृत API परिणाम से लें; मूल इनपुट से उसकी गणना न करें। alert_rule_id छोड़े जाने या null होने पर प्रोजेक्ट का नियम लागू होता है; effective_rule_id लागू नियम और uses_default_rule हमेशा false होता है। dry_run=true URL सेव नहीं करता: would_create_count और errors देखें। बैच असाइनमेंट 1–10000 url_md5s स्वीकार करता है। पेजिनेशन: limit 1–10000 (डिफ़ॉल्ट 1000), offset 0 से।

नियम: name में 1–32 वर्ण; parsing_javascript, screenshot_desktop, screenshot_mobile और available boolean हैं। screenshot_delay: एक दशमलव स्थान के साथ 1–10 सेकंड; percent_diff_html/text/meta: 0–100%; load_time_more: 0.1–10 सेकंड; min_page_size/max_page_size: 0–10000000 बाइट, न्यूनतम अधिकतम से बड़ा नहीं होना चाहिए। expected_http_status के मान rules/expected-http-statuses से लें। tracked_tags: अधिकतम 6 आइटम, अद्वितीय number 1–6, mode css या regex, pattern अधिकतम 1000 वर्ण। missing_html/appearing_html: अधिकतम 20 स्ट्रिंग, प्रत्येक 1000 वर्ण। वैकल्पिक थ्रेशोल्ड null स्वीकार करते हैं।

नियम बनाने पर data के साथ 201, PATCH पर data के साथ 200 और DELETE पर बिना बॉडी 204 मिलता है। PATCH संपादन योग्य सेटिंग बदलता है: name सहित वे सभी मान भेजें जिन्हें रखना है। छोड़े गए boolean false हो जाते हैं, ऐरे खाली और वैकल्पिक मान null हो जाते हैं। पहले GET से नियम लें। प्रोजेक्ट का डिफ़ॉल्ट नियम और URL को स्पष्ट रूप से सौंपे गए नियम हटाए नहीं जा सकते।

URL सत्यापन
http/httpsकेवल पूर्ण HTTP/HTTPS URL समर्थित हैं।
IDNअंतरराष्ट्रीय डोमेन नाम समर्थित हैं और उन्हें Punycode में सामान्यीकृत किया जाता है।
domain_blockedउत्पाद की अवरोध सूची ने डोमेन को अवरुद्ध किया है।
unsafe_urlSSRF सुरक्षा ने URL अस्वीकार किया है।

विषय सूची पर वापस जाएँ

API विधि संदर्भ — URLs

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

इस अनुभाग की विधियाँ

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

पैरामीटर

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

id (path)
{
  "required": true,
  "schema": {
    "$ref": "#/components/schemas/XID"
  }
}
limit (query)
{
  "schema": {
    "type": "integer",
    "minimum": 1,
    "maximum": 10000,
    "default": 1000
  }
}
offset (query)
{
  "schema": {
    "type": "integer",
    "minimum": 0,
    "default": 0
  }
}

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

200

निगरानी किए जा रहे URL।

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DiffURLListResponse"
      }
    }
  }
}
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"
      }
    }
  }
}

POST /public-api/v1/diff-projects/{id}/urls

पैरामीटर

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

id (path)
{
  "required": true,
  "schema": {
    "$ref": "#/components/schemas/XID"
  }
}
dry_run (query)
{
  "schema": {
    "type": "boolean",
    "default": false
  }
}
Idempotency-Key (header)
{
  "schema": {
    "type": "string",
    "minLength": 1,
    "maxLength": 255
  }
}

अनुरोध

{
  "required": true,
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DiffURLAddRequest"
      }
    }
  }
}

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

200

URL जोड़ने का परिणाम।

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DiffURLAddResponse"
      }
    }
  }
}
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"
      }
    }
  }
}

DELETE /public-api/v1/diff-projects/{id}/urls/{url_md5}

पैरामीटर

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

id (path)
{
  "required": true,
  "schema": {
    "$ref": "#/components/schemas/XID"
  }
}
url_md5 (path)
{
  "required": true,
  "schema": {
    "$ref": "#/components/schemas/URLMD5"
  }
}

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

204

हटा दिया गया। प्रतिक्रिया बॉडी खाली है।

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    }
  }
}
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"
      }
    }
  }
}

PATCH /public-api/v1/diff-projects/{id}/urls/{url_md5}/rule

पैरामीटर

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

id (path)
{
  "required": true,
  "schema": {
    "$ref": "#/components/schemas/XID"
  }
}
url_md5 (path)
{
  "required": true,
  "schema": {
    "$ref": "#/components/schemas/URLMD5"
  }
}

अनुरोध

{
  "required": true,
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DiffURLRulePatchRequest"
      }
    }
  }
}

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

200

URL को नियम सौंपने का परिणाम।

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DiffURLRulePatchResponse"
      }
    }
  }
}
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"
      }
    }
  }
}

PATCH /public-api/v1/diff-projects/{id}/urls/rule

पैरामीटर

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

id (path)
{
  "required": true,
  "schema": {
    "$ref": "#/components/schemas/XID"
  }
}

अनुरोध

{
  "required": true,
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DiffURLBulkRulePatchRequest"
      }
    }
  }
}

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

200

URL को नियम सौंपने का परिणाम।

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DiffURLRulePatchResponse"
      }
    }
  }
}
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"
      }
    }
  }
}

विषय सूची पर वापस जाएँ

API विधि संदर्भ — Rules

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

इस अनुभाग की विधियाँ

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

पैरामीटर

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

id (path)
{
  "required": true,
  "schema": {
    "$ref": "#/components/schemas/XID"
  }
}
limit (query)
{
  "schema": {
    "type": "integer",
    "minimum": 1,
    "maximum": 10000,
    "default": 1000
  }
}
offset (query)
{
  "schema": {
    "type": "integer",
    "minimum": 0,
    "default": 0
  }
}

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

200

अलर्ट नियम।

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DiffRuleListResponse"
      }
    }
  }
}
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"
      }
    }
  }
}

POST /public-api/v1/diff-projects/{id}/rules

पैरामीटर

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

id (path)
{
  "required": true,
  "schema": {
    "$ref": "#/components/schemas/XID"
  }
}

अनुरोध

{
  "required": true,
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DiffRuleWriteRequest"
      }
    }
  }
}

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

201

अलर्ट नियम।

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DiffRuleResponse"
      }
    }
  }
}
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}/rules/expected-http-statuses

पैरामीटर

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

id (path)
{
  "required": true,
  "schema": {
    "$ref": "#/components/schemas/XID"
  }
}

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

200

अपेक्षित HTTP स्थिति कोड।

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DiffRuleExpectedHTTPStatusesResponse"
      }
    }
  }
}
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}/rules/{rule_id}

पैरामीटर

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

id (path)
{
  "required": true,
  "schema": {
    "$ref": "#/components/schemas/XID"
  }
}
rule_id (path)
{
  "required": true,
  "schema": {
    "$ref": "#/components/schemas/XID"
  }
}

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

200

अलर्ट नियम।

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DiffRuleResponse"
      }
    }
  }
}
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"
      }
    }
  }
}

PATCH /public-api/v1/diff-projects/{id}/rules/{rule_id}

पैरामीटर

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

id (path)
{
  "required": true,
  "schema": {
    "$ref": "#/components/schemas/XID"
  }
}
rule_id (path)
{
  "required": true,
  "schema": {
    "$ref": "#/components/schemas/XID"
  }
}

अनुरोध

{
  "required": true,
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DiffRuleWriteRequest"
      }
    }
  }
}

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

200

अलर्ट नियम।

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DiffRuleResponse"
      }
    }
  }
}
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"
      }
    }
  }
}

DELETE /public-api/v1/diff-projects/{id}/rules/{rule_id}

पैरामीटर

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

id (path)
{
  "required": true,
  "schema": {
    "$ref": "#/components/schemas/XID"
  }
}
rule_id (path)
{
  "required": true,
  "schema": {
    "$ref": "#/components/schemas/XID"
  }
}

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

204

हटा दिया गया। प्रतिक्रिया बॉडी खाली है।

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    }
  }
}
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"
      }
    }
  }
}

विषय सूची पर वापस जाएँ

वेबसाइट में बदलावों की जाँच शुरू करें

यह अनुभाग बदलावों की निगरानी में नई जाँच शुरू करने का तरीका बताता है। चुने गए प्रोजेक्ट के सभी ट्रैक किए गए URL जाँचे जाते हैं। पहले बैलेंस जाँचें और लागत का अनुमान लें, फिर Idempotency-Key हेडर के साथ अनुरोध भेजें। अनुमान लेने पर राशि नहीं कटती।

स्कोप
  • diff-reports:run
  • /public-api/v1/diff-projects/{diff_project_id}/balance उपलब्ध भुगतान स्रोत लौटाता है।
  • /public-api/v1/diff-projects/{diff_project_id}/reports/cost हस्ताक्षरित cost_estimate_id लौटाता है, जो 10 मिनट तक मान्य है।
  • /public-api/v1/diff-projects/{diff_project_id}/reports/run खाते से शुल्क काटता है और विश्लेषण को कतार में डालता है।
  • केवल पूरी परियोजना का विश्लेषण चल सकता है: scope=all_urls। v1 में चुने हुए URL समर्थित नहीं हैं।
  • दोबारा प्रयास करते समय वही API कुंजी, वही Idempotency-Key और अपरिवर्तित अनुरोध पैरामीटर उपयोग करें।

स्वचालित URL जोड़ना चालू होने पर, /reports/cost पहले URL सूची अपडेट करता है और नए पृष्ठों को परियोजना का सहेजा गया नियम देता है। /reports/run तैयारी दोहराता है; यदि पृष्ठों की संख्या या लागत बदल गई है, तो बिना शुल्क लिए 409 cost_estimate_mismatch लौटाता है। नया लागत अनुमान लें और नए Idempotency-Key के साथ फिर से शुरू करें। मौजूदा URL और उनके नियम बने रहते हैं।

GET/public-api/v1/diff-projects/{diff_project_id}/balance

बैलेंस और उपलब्ध भुगतान विकल्प जाँचता है।

POST/public-api/v1/diff-projects/{diff_project_id}/reports/cost

लागत की गणना करता है। इस चरण में खाते से शुल्क नहीं कटता।

{
  "scope": "all_urls",
  "force_recheck": false
}
POST/public-api/v1/diff-projects/{diff_project_id}/reports/run

विश्लेषण शुरू करता है। Idempotency-Key हेडर आवश्यक है।

Idempotency-Key: run-report-20260531-001
{
  "cost_estimate_id": "COST_ESTIMATE_ID",
  "payment_option": "auto",
  "scope": "all_urls",
  "force_recheck": false
}
GET/public-api/v1/diff-projects/{diff_project_id}/reports/runs/{run_id}

रन की स्थिति जाँचता है: pending, progress, done, failed।

समय सीमा समाप्त होने या सर्वर त्रुटि के बाद GET /public-api/v1/diff-projects/{diff_project_id}/reports/runs और GET /public-api/v1/diff-projects/{diff_project_id}/reports जाँचें: उत्तर में त्रुटि का अर्थ यह नहीं है कि विश्लेषण शुरू नहीं हुआ। पिछले अनुरोध का परिणाम पता चलने तक समानांतर आरंभ अनुरोध न भेजें और नई idempotency कुंजी उपयोग न करें।

विषय सूची पर वापस जाएँ

API विधि संदर्भ — Runs

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

इस अनुभाग की विधियाँ

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

पैरामीटर

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

id (path)
{
  "required": true,
  "schema": {
    "$ref": "#/components/schemas/XID"
  }
}

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

200

बैलेंस और भुगतान विकल्प।

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DiffBalanceResponse"
      }
    }
  }
}
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"
      }
    }
  }
}

POST /public-api/v1/diff-projects/{id}/reports/cost

लागत का अनुमान लगाने से पहले, परियोजना के सहेजे गए मोड के अनुसार नए URL जोड़ता है और उन्हें चयनित नियम देता है। मौजूदा URL और उनके नियम सुरक्षित रहते हैं। अनुमान क्रेडिट या धन आरक्षित या काटता नहीं है।

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

पैरामीटर

id (path)
{
  "required": true,
  "schema": {
    "$ref": "#/components/schemas/XID"
  }
}

अनुरोध

{
  "required": true,
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DiffCostRequest"
      }
    }
  }
}

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

200

हस्ताक्षरित लागत अनुमान।

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DiffCostResponse"
      }
    }
  }
}
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"
      }
    }
  }
}

POST /public-api/v1/diff-projects/{id}/reports/run

भुगतान से पहले URL दोबारा तैयार करता है। यदि अंतिम लागत या पृष्ठों की संख्या cost_estimate_id से अलग है, तो बिना शुल्क लिए 409 cost_estimate_mismatch लौटाता है। नया अनुमान प्राप्त करें और नए Idempotency-Key के साथ दोबारा प्रयास करें।

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

पैरामीटर

id (path)
{
  "required": true,
  "schema": {
    "$ref": "#/components/schemas/XID"
  }
}
Idempotency-Key (header)
{
  "schema": {
    "type": "string",
    "minLength": 1,
    "maxLength": 255
  }
}

अनुरोध

{
  "required": true,
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DiffRunRequest"
      }
    }
  }
}

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

200

Diff रन।

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DiffRunResponse"
      }
    }
  }
}
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/runs

पैरामीटर

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

id (path)
{
  "required": true,
  "schema": {
    "$ref": "#/components/schemas/XID"
  }
}
limit (query)
{
  "schema": {
    "type": "integer",
    "minimum": 1,
    "maximum": 10000,
    "default": 100
  }
}
offset (query)
{
  "schema": {
    "type": "integer",
    "minimum": 0,
    "default": 0
  }
}

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

200

Diff रन की सूची।

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DiffRunListResponse"
      }
    }
  }
}
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/runs/{run_id}

पैरामीटर

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

id (path)
{
  "required": true,
  "schema": {
    "$ref": "#/components/schemas/XID"
  }
}
run_id (path)
{
  "required": true,
  "schema": {
    "$ref": "#/components/schemas/XID"
  }
}

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

200

Diff रन।

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DiffRunResponse"
      }
    }
  }
}
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"
      }
    }
  }
}

विषय सूची पर वापस जाएँ